namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
///
/// 物料主数据(复刻 ItemMaster)
///
[SugarTable("ItemMaster", "物料主数据(复刻 ItemMaster)")]
[SugarIndex("uk_ItemMaster_factory_item", nameof(FactoryRefId), OrderByType.Asc, nameof(ItemNum), OrderByType.Asc, IsUnique = true)]
public class AdoS0ItemMaster
{
[SugarColumn(ColumnName = "rec_id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
public long Id { get; set; }
[SugarColumn(ColumnName = "company_ref_id", ColumnDescription = "关联公司 ID", ColumnDataType = "bigint")]
public long CompanyRefId { get; set; }
[SugarColumn(ColumnName = "factory_ref_id", ColumnDescription = "关联工厂 ID", ColumnDataType = "bigint")]
public long FactoryRefId { get; set; }
[SugarColumn(ColumnName = "domain_code", ColumnDescription = "工厂域编码", Length = 50, IsNullable = true)]
public string? DomainCode { get; set; }
[SugarColumn(ColumnName = "item_num", ColumnDescription = "物料编码", Length = 100)]
public string ItemNum { get; set; } = string.Empty;
[SugarColumn(ColumnName = "descr", ColumnDescription = "物料名称", Length = 200)]
public string Descr { get; set; } = string.Empty;
[SugarColumn(ColumnName = "descr1", ColumnDescription = "规格型号", Length = 200, IsNullable = true)]
public string? Descr1 { get; set; }
[SugarColumn(ColumnName = "pkg_code", ColumnDescription = "语种", Length = 50, IsNullable = true)]
public string? PkgCode { get; set; }
[SugarColumn(ColumnName = "um", ColumnDescription = "单位", Length = 50, IsNullable = true)]
public string? UM { get; set; }
[SugarColumn(ColumnName = "pur_mfg", ColumnDescription = "P/L件", Length = 100, IsNullable = true)]
public string? PurMfg { get; set; }
[SugarColumn(ColumnName = "drawing", ColumnDescription = "图号", Length = 100, IsNullable = true)]
public string? Drawing { get; set; }
[SugarColumn(ColumnName = "item_type", ColumnDescription = "物料类型", Length = 100, IsNullable = true)]
public string? ItemType { get; set; }
[SugarColumn(ColumnName = "location", ColumnDescription = "默认库位", Length = 100, IsNullable = true)]
public string? Location { get; set; }
[SugarColumn(ColumnName = "default_shelf", ColumnDescription = "默认货架", Length = 100, IsNullable = true)]
public string? DefaultShelf { get; set; }
[SugarColumn(ColumnName = "key_item", ColumnDescription = "关键物料", ColumnDataType = "boolean")]
public bool KeyItem { get; set; }
[SugarColumn(ColumnName = "net_weight", ColumnDescription = "净重", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? NetWeight { get; set; }
[SugarColumn(ColumnName = "net_weight_um", ColumnDescription = "净重单位", Length = 50, IsNullable = true)]
public string? NetWeightUM { get; set; }
[SugarColumn(ColumnName = "inspect", ColumnDescription = "检验", ColumnDataType = "boolean")]
public bool Inspect { get; set; }
[SugarColumn(ColumnName = "pur_lt", ColumnDescription = "供应提前期", IsNullable = true)]
public int? PurLT { get; set; }
[SugarColumn(ColumnName = "ins_lt", ColumnDescription = "检验天数", IsNullable = true)]
public int? InsLT { get; set; }
[SugarColumn(ColumnName = "mfg_lt", ColumnDescription = "备料提前期", IsNullable = true)]
public int? MfgLT { get; set; }
[SugarColumn(ColumnName = "length", ColumnDescription = "长度", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? Length { get; set; }
[SugarColumn(ColumnName = "size", ColumnDescription = "尺寸", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? Size { get; set; }
[SugarColumn(ColumnName = "size_um", ColumnDescription = "尺寸单位", Length = 50, IsNullable = true)]
public string? SizeUM { get; set; }
[SugarColumn(ColumnName = "issue_policy", ColumnDescription = "是否前处理", ColumnDataType = "boolean")]
public bool IssuePolicy { get; set; }
[SugarColumn(ColumnName = "mfgmttr", ColumnDescription = "备料提前期(天)", IsNullable = true)]
public int? MfgMttr { get; set; }
[SugarColumn(ColumnName = "location_type", ColumnDescription = "库存类型", Length = 50, IsNullable = true)]
public string? LocationType { get; set; }
[SugarColumn(ColumnName = "commodity_code", ColumnDescription = "商品代码", Length = 100, IsNullable = true)]
public string? CommodityCode { get; set; }
[SugarColumn(ColumnName = "rev", ColumnDescription = "版本", Length = 50, IsNullable = true)]
public string? Rev { get; set; }
[SugarColumn(ColumnName = "max_ord", ColumnDescription = "最大订单", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? MaxOrd { get; set; }
[SugarColumn(ColumnName = "min_ord", ColumnDescription = "最小订单", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? MinOrd { get; set; }
[SugarColumn(ColumnName = "ord_mult", ColumnDescription = "订单倍数", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? OrdMult { get; set; }
[SugarColumn(ColumnName = "min_ord_sales", ColumnDescription = "起订量", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? MinOrdSales { get; set; }
[SugarColumn(ColumnName = "auto_lot_nums", ColumnDescription = "自动批次号", ColumnDataType = "boolean")]
public bool AutoLotNums { get; set; }
[SugarColumn(ColumnName = "install", ColumnDescription = "是否打标", ColumnDataType = "boolean")]
public bool Install { get; set; }
[SugarColumn(ColumnName = "safety_stk", ColumnDescription = "安全库存", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? SafetyStk { get; set; }
[SugarColumn(ColumnName = "days_between_pm", ColumnDescription = "保质期(天)", IsNullable = true)]
public int? DaysBetweenPM { get; set; }
[SugarColumn(ColumnName = "expire_alarm_day", ColumnDescription = "过期预警天数", IsNullable = true)]
public int? ExpireAlarmDay { get; set; }
[SugarColumn(ColumnName = "stock_turn_over", ColumnDescription = "存货周转率", ColumnDataType = "decimal(18,5)", IsNullable = true)]
public decimal? StockTurnOver { get; set; }
[SugarColumn(ColumnName = "lot_serial_control", ColumnDescription = "批次先进先出提醒", ColumnDataType = "boolean")]
public bool LotSerialControl { get; set; }
[SugarColumn(ColumnName = "allocate_single_lot", ColumnDescription = "批次先进先出强控", ColumnDataType = "boolean")]
public bool AllocateSingleLot { get; set; }
[SugarColumn(ColumnName = "status", ColumnDescription = "状态", Length = 50)]
public string Status { get; set; } = "normal";
[SugarColumn(ColumnName = "planner", ColumnDescription = "计划员", Length = 100, IsNullable = true)]
public string? Planner { get; set; }
[SugarColumn(ColumnName = "trace_detail", ColumnDescription = "按需发料", ColumnDataType = "boolean")]
public bool TraceDetail { get; set; }
[SugarColumn(ColumnName = "is_main_mas", ColumnDescription = "是否主材", ColumnDataType = "boolean")]
public bool IsMainMas { get; set; }
[SugarColumn(ColumnName = "remark", ColumnDescription = "备注", Length = 1000, IsNullable = true)]
public string? Remark { get; set; }
[SugarColumn(ColumnName = "emt_type", ColumnDescription = "特殊采购类型", Length = 50, IsNullable = true)]
public string? EMTType { get; set; }
[SugarColumn(ColumnName = "owner_application", ColumnDescription = "物料属性", Length = 100, IsNullable = true)]
public string? OwnerApplication { get; set; }
[SugarColumn(ColumnName = "bom_design", ColumnDescription = "BOM设计周期(天)", IsNullable = true)]
public int? BOMDesign { get; set; }
[SugarColumn(ColumnName = "routing_des", ColumnDescription = "工艺设计周期(天)", IsNullable = true)]
public int? RoutingDes { get; set; }
[SugarColumn(ColumnName = "is_active", ColumnDescription = "是否生效", ColumnDataType = "boolean")]
public bool IsActive { get; set; } = true;
[SugarColumn(ColumnName = "is_confirm", ColumnDescription = "是否确认", ColumnDataType = "boolean")]
public bool IsConfirm { get; set; }
[SugarColumn(ColumnName = "create_user", ColumnDescription = "创建人", Length = 100, IsNullable = true)]
public string? CreateUser { get; set; }
[SugarColumn(ColumnName = "create_time", ColumnDescription = "创建时间")]
public DateTime CreateTime { get; set; } = DateTime.Now;
[SugarColumn(ColumnName = "update_user", ColumnDescription = "更新人", Length = 100, IsNullable = true)]
public string? UpdateUser { get; set; }
[SugarColumn(ColumnName = "update_time", ColumnDescription = "更新时间", IsNullable = true)]
public DateTime? UpdateTime { get; set; }
/// 列表展示:库位+库位说明拼接(不落库;无 LocationMaster 时仅库位)
[SugarColumn(IsIgnore = true)]
public string? LocationDescr { get; set; }
}