package com.shzg.project.unique.domain;

import java.math.BigDecimal;

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

/**
 * 唯一码物料信息对象 worn_unique_code_material
 *
 * @author shzg
 * @date 2026-03-17
 */
public class WornUniqueCodeMaterial extends BaseEntity
{
    private static final long serialVersionUID = 1L;

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

    /** 唯一码ID */
    @Excel(name = "唯一码ID")
    private Long uniqueCodeId;

    /** 物料ID（对应worn_material.id） */
    @Excel(name = "物料ID", readConverterExp = "对应worn_material.id")
    private Long materialId;

    /** 单位ID（对应worn_material_unit.id） */
    @Excel(name = "单位ID", readConverterExp = "对应worn_material_unit.id")
    private Long unitId;

    /** 数量 */
    @Excel(name = "数量")
    private BigDecimal quantity;

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

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

    /** 物料详细信息（联表查询） */
    private WornMaterial wornMaterial;

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

    public Long getId()
    {
        return id;
    }

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

    public Long getUniqueCodeId()
    {
        return uniqueCodeId;
    }

    public void setUniqueCodeId(Long uniqueCodeId)
    {
        this.uniqueCodeId = uniqueCodeId;
    }

    public Long getMaterialId()
    {
        return materialId;
    }

    public void setMaterialId(Long materialId)
    {
        this.materialId = materialId;
    }

    public Long getUnitId()
    {
        return unitId;
    }

    public void setUnitId(Long unitId)
    {
        this.unitId = unitId;
    }

    public BigDecimal getQuantity()
    {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity)
    {
        this.quantity = quantity;
    }

    public String getIsDelete()
    {
        return isDelete;
    }

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

    public WornMaterial getWornMaterial()
    {
        return wornMaterial;
    }

    public void setWornMaterial(WornMaterial wornMaterial)
    {
        this.wornMaterial = wornMaterial;
    }

    @Override
    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("uniqueCodeId", getUniqueCodeId())
                .append("materialId", getMaterialId())
                .append("unitId", getUnitId())
                .append("quantity", getQuantity())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("isDelete", getIsDelete())
                .append("wornMaterial", getWornMaterial())
                .toString();
    }
}