package com.ruoyi.app.model;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.*;

/**
 * 猪头生产记录对象 pork_head_produce
 * 
 * @author ruoyi
 * @date 2025-03-19
 */
public class PorkOtherProduce extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

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

    /** 生产时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "生产时间", width = 30)
    private Date produceTime;

    /** 血码 */
    @Excel(name = "血码")
    private String slaughterCode;

    /** 分销批次ID */
    @Excel(name = "分销批次ID")
    private Long distributeBatchId;

    /** 入场批次ID */
    @Excel(name = "入场批次ID")
    private Long entranceBatchId;

    /** 称显重量 */
    @Excel(name = "称显重量")
    private BigDecimal scaleWeight;

    /** 宰后重量 */
    @Excel(name = "宰后重量")
    private BigDecimal finalWeight;

    /** 删除标志 */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    @NotBlank(message = "产品名称不能为空")
    public String getProductName() 
    {
        return productName;
    }

    public void setProduceTime(Date produceTime) 
    {
        this.produceTime = produceTime;
    }

    @NotNull(message = "屠宰时间不能为空")
    public Date getProduceTime() 
    {
        return produceTime;
    }

    public void setSlaughterCode(String slaughterCode) 
    {
        this.slaughterCode = slaughterCode;
    }

    @NotBlank(message = "血码不能为空")
    public String getSlaughterCode() 
    {
        return slaughterCode;
    }

    public void setDistributeBatchId(Long distributeBatchId) 
    {
        this.distributeBatchId = distributeBatchId;
    }

    @NotNull(message = "检疫证号不能为空")  //这里i提示检疫证号，实际是分销批次
    public Long getDistributeBatchId() 
    {
        return distributeBatchId;
    }

    public void setEntranceBatchId(Long entranceBatchId) 
    {
        this.entranceBatchId = entranceBatchId;
    }

    @NotNull(message = "检疫证号不能为空")  //这里i提示检疫证号，实际是入场批次
    public Long getEntranceBatchId() 
    {
        return entranceBatchId;
    }

    public void setScaleWeight(BigDecimal scaleWeight) 
    {
        this.scaleWeight = scaleWeight;
    }

    public BigDecimal getScaleWeight() 
    {
        return scaleWeight;
    }

    public void setFinalWeight(BigDecimal finalWeight) 
    {
        this.finalWeight = finalWeight;
    }

    @NotNull(message = "重量不能为空")
    @DecimalMin(value = "0.01", inclusive = true, message = "重量输入超出设定范围限制（0.01~99999.99）")
    @DecimalMax(value = "99999.99", inclusive = true, message = "重量输入超出设定范围限制（0.01~99999.99）")
    @Digits(integer = 5, fraction = 2, message = "重量输入的整数部分不能超过5位，小数部分不能超过2位")
    public BigDecimal getFinalWeight() 
    {
        return finalWeight;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productName", getProductName())
            .append("produceTime", getProduceTime())
            .append("slaughterCode", getSlaughterCode())
            .append("distributeBatchId", getDistributeBatchId())
            .append("entranceBatchId", getEntranceBatchId())
            .append("scaleWeight", getScaleWeight())
            .append("finalWeight", getFinalWeight())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
