package org.jeecg.modules.mes.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

@Data
@TableName("mes_material")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "MES物料主数据")
public class MesMaterial implements Serializable {
  private static final long serialVersionUID = 1L;

  @TableId(type = IdType.ASSIGN_ID)
  private String id;

  @Excel(name = "物料编码", width = 15)
  private String materialCode;
  @Excel(name = "物料名称", width = 20)
  private String materialName;
  @Excel(name = "别名", width = 15)
  private String aliasName;
  @Excel(name = "简称", width = 15)
  private String shortName;

  @Excel(name = "分类", width = 15, dictTable = "mes_material_category", dicText = "category_name", dicCode = "id")
  @Dict(dictTable = "mes_material_category", dicText = "category_name", dicCode = "id")
  private String categoryId;
  @Excel(name = "等级", width = 12)
  private String materialGrade;

  @Excel(name = "计划价格", width = 12)
  private BigDecimal planPrice;
  @Excel(name = "最小库存", width = 12)
  private BigDecimal minStock;
  @Excel(name = "最大库存", width = 12)
  private BigDecimal maxStock;

  @Excel(name = "基础单位", width = 15, dictTable = "mes_unit", dicText = "unit_name", dicCode = "id")
  @Dict(dictTable = "mes_unit", dicText = "unit_name", dicCode = "id")
  private String baseUnitId;
  @Excel(name = "统计单位", width = 15, dictTable = "mes_unit", dicText = "unit_name", dicCode = "id")
  @Dict(dictTable = "mes_unit", dicText = "unit_name", dicCode = "id")
  private String statUnitId;
  @Excel(name = "换算系数", width = 12)
  private BigDecimal unitConvertRate;

  @Excel(name = "标准码", width = 15)
  private String standardCode;
  @Excel(name = "产地", width = 15)
  private String originPlace;
  @Excel(name = "供应商ID", width = 15)
  private String supplierId;
  @Excel(name = "客户ID", width = 15)
  private String customerId;
  @Excel(name = "启用状态", width = 10)
  private Integer enableFlag;
  @Excel(name = "ERP同步", width = 10)
  private Integer syncFromErpFlag;
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date lastErpSyncTime;
  @Excel(name = "备注", width = 20)
  private String remark;

  private Integer tenantId;
  private String sysOrgCode;
  private String createBy;
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;
  private String updateBy;
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
  private Integer delFlag;
}
