package com.ruoyi.warehouse.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

public class InRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @Excel(name = "入库ID")
    private Long id;

    @Excel(name = "入库单号")
    private String inNo;

    private Long areaId;

    private Long productId;

    @Excel(name = "入库类型", readConverterExp = "1=生产入库,2=采购入库,3=归还入库,4=退货入库")
    private Integer inType;

    @Excel(name = "入库数量")
    private BigDecimal inNum;

    @Excel(name = "入库状态", readConverterExp = "0=待入库,1=已入库")
    private Integer inStatus;

    @Excel(name = "系统操作人")
    private String operator;

    @Excel(name = "入库人")
    private String inOperator;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "确认入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;

    private String areaCode;

    @Excel(name = "库区名称")
    private String areaName;

    private String productCode;

    @Excel(name = "产品名称")
    private String productName;

    @Excel(name = "品牌")
    private String brand;

    @Excel(name = "类别")
    private String category;

    @Excel(name = "规格型号")
    private String spec;

    @Excel(name = "单位")
    private String unit;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getInNo() { return inNo; }
    public void setInNo(String inNo) { this.inNo = inNo; }

    @NotNull(message = "库区不能为空")
    public Long getAreaId() { return areaId; }
    public void setAreaId(Long areaId) { this.areaId = areaId; }

    @NotNull(message = "产品不能为空")
    public Long getProductId() { return productId; }
    public void setProductId(Long productId) { this.productId = productId; }

    @NotNull(message = "入库类型不能为空")
    public Integer getInType() { return inType; }
    public void setInType(Integer inType) { this.inType = inType; }

    @NotNull(message = "入库数量不能为空")
    @DecimalMin(value = "0.001", message = "入库数量必须大于0")
    public BigDecimal getInNum() { return inNum; }
    public void setInNum(BigDecimal inNum) { this.inNum = inNum; }
    public Integer getInStatus() { return inStatus; }
    public void setInStatus(Integer inStatus) { this.inStatus = inStatus; }
    public String getOperator() { return operator; }
    public void setOperator(String operator) { this.operator = operator; }
    public String getInOperator() { return inOperator; }
    public void setInOperator(String inOperator) { this.inOperator = inOperator; }
    public Date getConfirmTime() { return confirmTime; }
    public void setConfirmTime(Date confirmTime) { this.confirmTime = confirmTime; }
    public String getAreaCode() { return areaCode; }
    public void setAreaCode(String areaCode) { this.areaCode = areaCode; }
    public String getAreaName() { return areaName; }
    public void setAreaName(String areaName) { this.areaName = areaName; }
    public String getProductCode() { return productCode; }
    public void setProductCode(String productCode) { this.productCode = productCode; }
    public String getProductName() { return productName; }
    public void setProductName(String productName) { this.productName = productName; }
    public String getBrand() { return brand; }
    public void setBrand(String brand) { this.brand = brand; }
    public String getCategory() { return category; }
    public void setCategory(String category) { this.category = category; }
    public String getSpec() { return spec; }
    public void setSpec(String spec) { this.spec = spec; }
    public String getUnit() { return unit; }
    public void setUnit(String unit) { this.unit = unit; }
}
