package com.ruoyi.app.domain;

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.NotBlank;
import javax.validation.constraints.Size;

/**
 * 屠宰批次对象 slaughter_batch
 * 
 * @author coede
 * @date 2025-03-19
 */
public class SlaughterBatch extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 屠宰日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "屠宰日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date slaughterTime;

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

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

    /** 销售去向：三选一：1-本县（市、区）、3-本省、5-外省，默认本县（市、区 */
    @Excel(name = "销售去向：三选一：1-本县", readConverterExp = "市=、区")
    private String salePlace;

    /** 肉品合格证 */
    @Excel(name = "肉品合格证")
    private String meatCert;

    /** 动物检疫合格证 */
    @Excel(name = "动物检疫合格证")
    private String animalCert;

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

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

    public Long getId() 
    {
        return id;
    }

    public void setSlaughterTime(Date slaughterTime) 
    {
        this.slaughterTime = slaughterTime;
    }

    public Date getSlaughterTime() 
    {
        return slaughterTime;
    }

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

    public Long getDistributeBatchId() 
    {
        return distributeBatchId;
    }

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

    public Long getEntranceBatchId() 
    {
        return entranceBatchId;
    }

    public void setSalePlace(String salePlace) 
    {
        this.salePlace = salePlace;
    }

    public String getSalePlace() 
    {
        return salePlace;
    }

    public void setMeatCert(String meatCert) 
    {
        this.meatCert = meatCert;
    }

    @NotBlank(message = "肉品品质检验合格证号不能为空")
    @Size(min = 9, max = 9, message = "肉品品质检验合格证号格式输入错误（9位数字）")
    public String getMeatCert() 
    {
        return meatCert;
    }

    public void setAnimalCert(String animalCert) 
    {
        this.animalCert = animalCert;
    }

    @NotBlank(message = "动物检疫合格证号不能为空")
    @Size(min = 10, max = 10, message = "动物检疫合格证号格式输入错误（10位数字）")
    public String getAnimalCert() 
    {
        return animalCert;
    }

    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("slaughterTime", getSlaughterTime())
            .append("distributeBatchId", getDistributeBatchId())
            .append("entranceBatchId", getEntranceBatchId())
            .append("salePlace", getSalePlace())
            .append("meatCert", getMeatCert())
            .append("animalCert", getAnimalCert())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
