package com.zhyc.module.stock.domain;

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

/**
 * 物资管理对象 wz_materials_management
 * 
 * @author HashMap
 * @date 2025-08-05
 */
@Setter
@Getter
public class WzMaterialsManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 序号 */
    @Excel(name = "序号")
    private Long materialManagementCode;

    /** 存货编码 */
    @Excel(name = "存货编码")
    private String materialId;

    /** 存货 */
    @Excel(name = "存货")
    private String materialName;

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

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String materialSpecification;

    /** 主计量 */
    @Excel(name = "主计量")
    private String materialUnit;

    /** 现存量(主) */
    @Excel(name = "现存量(主)")
    private BigDecimal currentStock;

    /** 库存预警 */
    @Excel(name = "库存预警")
    private String stockAlarm;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 失效日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "失效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 失效预警 */
    @Excel(name = "失效预警")
    private String expirationAlarm;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("materialManagementCode", getMaterialManagementCode())
            .append("materialId", getMaterialId())
            .append("materialName", getMaterialName())
            .append("batchId", getBatchId())
            .append("materialSpecification", getMaterialSpecification())
            .append("materialUnit", getMaterialUnit())
            .append("currentStock", getCurrentStock())
            .append("stockAlarm", getStockAlarm())
            .append("productionDate", getProductionDate())
            .append("expirationDate", getExpirationDate())
            .append("expirationAlarm", getExpirationAlarm())
            .toString();
    }
}
