package com.zt.plat.module.qms.resource.material.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 使用记录新增/修改 Request VO")
@Data
public class MaterialUseRecordSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15790")
    private Long id;

    @Schema(description = "物料实例id,", requiredMode = Schema.RequiredMode.REQUIRED, example = "16550")
    @NotNull(message = "物料实例id不能为空")
    private Long infomationId;

    @Schema(description = "是否配置危险品", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer hazardousMakeFlag;

    @Schema(description = "本次数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "本次数量不能为空")
    @Min(value = 0L, message = "数量不能小于0")
    private BigDecimal operationQuantity;

    @Schema(description = "使用日期", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime useDate;

    @Schema(description = "使用人id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22146")
    private Long userId;

    @Schema(description = "使用人", requiredMode = Schema.RequiredMode.REQUIRED, example = "ZT")
    private String userName;

    @Schema(description = "说明")
    private String reason;

    @Schema(description = "监督人id", example = "13958")
    private Long supervisorId;

    @Schema(description = "监督人姓名", example = "李四")
    private String supervisorName;

    @Schema(description = "所属部门")
    private String systemDepartmentCode;

    @Schema(description = "备注")
    private String remark;

}