package com.shzg.project.unique.domain;

import com.shzg.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.shzg.framework.aspectj.lang.annotation.Excel;

import java.util.List;

/**
 * 唯一码管理对象 worn_unique_code
 *
 * @author shzg
 * @date 2026-03-17
 */
public class WornUniqueCode extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 唯一码编号 */
    @Excel(name = "唯一码编号")
    private Integer code;

    /** 所属入库单据号 */
    @Excel(name = "所属入库单据号")
    private String billNo;

    /** 项目ID（用于数据隔离，对应sys_dept.id） */
    @Excel(name = "项目ID", readConverterExp = "用于数据隔离，对应sys_dept.id")
    private Long projectId;

    /** 当前状态（0=初始化创建,1=生成入库单号,2=快速入库,3=生成出库单号,4=快速出库） */
    @Excel(name = "当前状态", readConverterExp = "0=初始化创建,1=生成入库单号,2=快速入库,3=生成出库单号,4=快速出库")
    private String status;

    /** RFID编码 */
    @Excel(name = "RFID编码")
    private String rfidCode;

    /** 打印次数 */
    @Excel(name = "打印次数")
    private Long printCount;

    /** 是否删除（0正常 1删除） */
    @Excel(name = "是否删除", readConverterExp = "0=正常,1=删除")
    private String isDelete;

    /** ==================== 扩展字段（不落库） ==================== */

    /** 物料信息（1条） */
    private WornUniqueCodeMaterial material;

    /** 事件列表（多条） */
    private List<WornUniqueCodeEvent> eventList;

    /** 二维码（base64） */
    private String qrCode;

    /** ==================== getter / setter ==================== */

    public Long getId()
    {
        return id;
    }

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

    public Integer getCode()
    {
        return code;
    }

    public void setCode(Integer code)
    {
        this.code = code;
    }

    public String getBillNo()
    {
        return billNo;
    }

    public void setBillNo(String billNo)
    {
        this.billNo = billNo;
    }

    public Long getProjectId()
    {
        return projectId;
    }

    public void setProjectId(Long projectId)
    {
        this.projectId = projectId;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getRfidCode()
    {
        return rfidCode;
    }

    public void setRfidCode(String rfidCode)
    {
        this.rfidCode = rfidCode;
    }

    public Long getPrintCount()
    {
        return printCount;
    }

    public void setPrintCount(Long printCount)
    {
        this.printCount = printCount;
    }

    public String getIsDelete()
    {
        return isDelete;
    }

    public void setIsDelete(String isDelete)
    {
        this.isDelete = isDelete;
    }

    public WornUniqueCodeMaterial getMaterial()
    {
        return material;
    }

    public void setMaterial(WornUniqueCodeMaterial material)
    {
        this.material = material;
    }

    public List<WornUniqueCodeEvent> getEventList()
    {
        return eventList;
    }

    public void setEventList(List<WornUniqueCodeEvent> eventList)
    {
        this.eventList = eventList;
    }

    public String getQrCode()
    {
        return qrCode;
    }

    public void setQrCode(String qrCode)
    {
        this.qrCode = qrCode;
    }

    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("code", getCode())
                .append("billNo", getBillNo())
                .append("projectId", getProjectId())
                .append("status", getStatus())
                .append("rfidCode", getRfidCode())
                .append("printCount", getPrintCount())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("isDelete", getIsDelete())
                .append("material", getMaterial())
                .append("eventList", getEventList())
                .append("qrCode", getQrCode())
                .toString();
    }
}