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

    @Excel(name = "盘点ID")
    private Long id;

    @Excel(name = "盘点单号")
    private String checkNo;

    private Long areaId;
    private Long productId;

    @Excel(name = "账面库存")
    private BigDecimal bookNum;

    @Excel(name = "实际盘点数量")
    private BigDecimal realNum;

    @Excel(name = "差异数量")
    private BigDecimal diffNum;

    @Excel(name = "盘点状态", readConverterExp = "0=待确认,1=盘点生效")
    private Integer checkStatus;

    @Excel(name = "盘点人")
    private String checkUser;

    @Excel(name = "审核人")
    private String confirmUser;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核生效时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date confirmTime;

    @Excel(name = "差异原因")
    private String reason;

    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 getCheckNo() { return checkNo; }
    public void setCheckNo(String checkNo) { this.checkNo = checkNo; }

    @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; }
    public BigDecimal getBookNum() { return bookNum; }
    public void setBookNum(BigDecimal bookNum) { this.bookNum = bookNum; }

    @NotNull(message = "实际盘点数量不能为空")
    @DecimalMin(value = "0.000", message = "实际盘点数量不能小于0")
    public BigDecimal getRealNum() { return realNum; }
    public void setRealNum(BigDecimal realNum) { this.realNum = realNum; }
    public BigDecimal getDiffNum() { return diffNum; }
    public void setDiffNum(BigDecimal diffNum) { this.diffNum = diffNum; }
    public Integer getCheckStatus() { return checkStatus; }
    public void setCheckStatus(Integer checkStatus) { this.checkStatus = checkStatus; }
    public String getCheckUser() { return checkUser; }
    public void setCheckUser(String checkUser) { this.checkUser = checkUser; }
    public String getConfirmUser() { return confirmUser; }
    public void setConfirmUser(String confirmUser) { this.confirmUser = confirmUser; }
    public Date getConfirmTime() { return confirmTime; }
    public void setConfirmTime(Date confirmTime) { this.confirmTime = confirmTime; }
    public String getReason() { return reason; }
    public void setReason(String reason) { this.reason = reason; }
    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; }
}
