package net.lab1024.sa.admin.module.business.wms.base.item.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.math.BigDecimal;

import lombok.Data;
import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;

/**
 * 物料信息 新建表单
 *
 * @author 霍锦
 * @since  2024-11-25 17:08:18
 * copyright 友仓
 */

@Data
public class ItemAddForm {

    @Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "物料编码 不能为空")
    private String itemCode;

    @Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "物料名称 不能为空")
    private String itemName;

    @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "单位 不能为空")
    private String unit;

    @Schema(description = "物料类型")
    @NotBlank(message = "物料类型 不能为空 ")
    private String itemType;

    @Schema(description = "包装系数")
    @NotNull(message = "包装系数不能为空")
    @DecimalMin(value = "1", message = "包装系数最低1")
    private BigDecimal packFactor;

    @Schema(description = "是否启用")
    @NotNull(message = "启用状态不能为空")
    private Boolean disabledFlag;

    @Schema(hidden = true)
    private Long createUserId;

    @Schema(hidden = true)
    private String createUserName;


}