package com.ruoyi.app.model;

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 java.util.Date;

/**
 * 吊钩绑定对象 hook_bind
 * 
 * @author coede
 * @date 2025-03-19
 */
public class HookBind extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    //‘0’-未绑定，‘1’-已绑定
    public static final String IS_BIND = "1";

    public static final String NOT_BIND = "0";

    /** ID */
    private Long id;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchNo;

    /** 识别器序列号 */
    @Excel(name = "识别器序列号")
    private String deviceSerial;

    /** 吊钩EPC编号 */
    @Excel(name = "吊钩EPC编号")
    private String epcNo;

    /** 挂钩号 */
    @Excel(name = "吊钩号")
    private String hookNo;

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

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

    /** 是否绑定，0-未绑定，1-已绑定 */
    @Excel(name = "是否绑定，0-未绑定，1-已绑定")
    private String hasBind;

    /** 绑定时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "绑定时间")
    private Date bindTime;

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

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

    public Long getId() 
    {
        return id;
    }

    public void setDeviceSerial(String deviceSerial)
    {
        this.deviceSerial = deviceSerial;
    }

    public String getDeviceSerial()
    {
        return deviceSerial;
    }

    public void setEpcNo(String epcNo)
    {
        this.epcNo = epcNo;
    }

    public String getEpcNo()
    {
        return epcNo;
    }

    public void setHookNo(String hookNo)
    {
        this.hookNo = hookNo;
    }

    public String getHookNo()
    {
        return hookNo;
    }

    public void setBatchNo(String batchNo)
    {
        this.batchNo = batchNo;
    }

    @NotBlank(message = "吊钩号不能为空")
    public String getBatchNo()
    {
        return batchNo;
    }

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

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

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

    public Long getDistributeBatchId() 
    {
        return distributeBatchId;
    }

    public void setHasBind(String hasBind)
    {
        this.hasBind = hasBind;
    }

    public String getHasBind()
    {
        return hasBind;
    }

    public void setBindTime(Date bindTime)
    {
        this.bindTime = bindTime;
    }

    public Date getBindTime()
    {
        return bindTime;
    }

    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("batchNo", getBatchNo())
            .append("deviceSerial", getDeviceSerial())
            .append("epcNo", getEpcNo())
            .append("hookNo", getHookNo())
            .append("batchNo", getBatchNo())
            .append("distributeBatchId", getDistributeBatchId())
            .append("hasBind", getHasBind())
            .append("bindTime", getBindTime())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("updateBy", getUpdateBy())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
