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 OutRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    @Excel(name = "出库单号")
    private String outNo;

    private Long areaId;
    private Long productId;

    @Excel(name = "出库类型", readConverterExp = "1=生产出库,2=退货出库,3=销售出库")
    private Integer outType;

    @Excel(name = "出库数量")
    private BigDecimal outNum;

    @Excel(name = "关联单据号")
    private String sourceNo;

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

    @Excel(name = "出库人")
    private String outOperator;

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

    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 getOutNo() { return outNo; }
    public void setOutNo(String outNo) { this.outNo = outNo; }

    @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 getOutType() { return outType; }
    public void setOutType(Integer outType) { this.outType = outType; }

    @NotNull(message = "出库数量不能为空")
    @DecimalMin(value = "0.001", message = "出库数量必须大于0")
    public BigDecimal getOutNum() { return outNum; }
    public void setOutNum(BigDecimal outNum) { this.outNum = outNum; }
    public String getSourceNo() { return sourceNo; }
    public void setSourceNo(String sourceNo) { this.sourceNo = sourceNo; }
    public String getOperator() { return operator; }
    public void setOperator(String operator) { this.operator = operator; }
    public String getOutOperator() { return outOperator; }
    public void setOutOperator(String outOperator) { this.outOperator = outOperator; }
    public Date getOutTime() { return outTime; }
    public void setOutTime(Date outTime) { this.outTime = outTime; }
    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; }
}
