package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.material;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import jakarta.validation.constraints.*;
|
import lombok.Data;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import java.math.BigDecimal;
|
import java.time.LocalDate;
|
|
/**
|
* 安全生产 - 物资台账新增/修改 Request VO
|
*
|
* @author 超级管理员
|
*/
|
@Schema(description = "管理后台 - 物资台账新增/修改 Request VO")
|
@Data
|
public class SafetyMaterialSaveReqVO {
|
|
private Long id;
|
|
@Schema(description = "物资编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "PM-001")
|
@NotBlank(message = "物资编码不能为空")
|
@Size(max = 64)
|
private String code;
|
|
@Schema(description = "物资名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "10kV 绝缘手套")
|
@NotBlank(message = "物资名称不能为空")
|
@Size(max = 100)
|
private String name;
|
|
@Schema(description = "类别", requiredMode = Schema.RequiredMode.REQUIRED, example = "INSULATING")
|
@NotBlank(message = "物资类别不能为空")
|
@Pattern(regexp = "INSULATING|HAZARD_CHEMICAL|FIRE|PPE|OTHER", message = "物资类别不合法")
|
private String category;
|
|
@Schema(description = "规格型号")
|
@Size(max = 100)
|
private String spec;
|
|
@Schema(description = "计量单位", example = "双")
|
@Size(max = 20)
|
private String unit;
|
|
@Schema(description = "当前库存数量")
|
@DecimalMin(value = "0", message = "库存数量不能为负数")
|
private BigDecimal stockQty;
|
|
@Schema(description = "安全库存")
|
@DecimalMin(value = "0", message = "安全库存不能为负数")
|
private BigDecimal safeStock;
|
|
@Schema(description = "存放位置")
|
@Size(max = 100)
|
private String storageLocation;
|
|
@Schema(description = "有效期至")
|
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
|
private LocalDate expireDate;
|
|
@Schema(description = "有效期月数")
|
@Min(value = 0, message = "有效期月数不能为负数")
|
private Integer validityMonths;
|
|
@Schema(description = "保管人(员工编号,关联 hrm_employee)")
|
private Long managerId;
|
|
@Schema(description = "状态:0-启用,1-停用", example = "0")
|
@NotNull(message = "状态不能为空")
|
private Integer status;
|
|
@Schema(description = "备注")
|
@Size(max = 500)
|
private String remark;
|
|
}
|