//
using System;
using Business.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace Business.Migrations
{
[DbContext(typeof(BusinessMigrationDbContext))]
[Migration("20230619062335_AddIndex")]
partial class AddIndex
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("Business.Model.Bang.b_bom_pretreatment", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("backflush")
.HasColumnType("int")
.HasComment("是否倒冲");
b.Property("bom_child_id")
.HasColumnType("bigint")
.HasComment("bom明细主键");
b.Property("bom_id")
.HasColumnType("bigint")
.HasComment("BOMid");
b.Property("bom_number")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("bom编号");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("erp_cls")
.HasColumnType("int")
.HasComment("物料属性");
b.Property("erp_cls_name")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料属性名称");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("fid")
.HasColumnType("bigint")
.HasComment("本级id");
b.Property("haveicsubs")
.HasColumnType("int")
.HasComment("存在替代关系");
b.Property("item_id")
.HasColumnType("bigint")
.HasComment("物料id");
b.Property("item_name")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料名称");
b.Property("item_number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料编号");
b.Property("level")
.HasColumnType("int")
.HasComment("level");
b.Property("model")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasComment("规格型号");
b.Property("num")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("项次号");
b.Property("num_order")
.HasColumnType("bigint")
.HasComment("供排序使用");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("parent_id")
.HasColumnType("bigint")
.HasComment("父级");
b.Property("qty")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("单位用量");
b.Property("sourceid")
.HasColumnType("bigint")
.HasComment("所属BOM");
b.Property("substitute_code")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("群组代码");
b.Property("substitute_mode")
.HasColumnType("int")
.HasComment("替代方式");
b.Property("substitute_strategy")
.HasColumnType("int")
.HasComment("替代策略");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("type")
.HasColumnType("int")
.HasComment("类型");
b.Property("unit")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("单位");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.Property("version")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("版本");
b.HasKey("Id");
b.ToTable("b_bom_pretreatment", (string)null);
b.HasComment("Bom预处理");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_bom", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("begin_day")
.HasColumnType("datetime2")
.HasComment("生效日期");
b.Property("biller")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("图片");
b.Property("bom_num")
.HasColumnType("int")
.HasComment("序号");
b.Property("bom_number")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("bom单编号");
b.Property("chartnumber")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("图表编号");
b.Property("check_date")
.HasColumnType("datetime2")
.HasComment("检验时间");
b.Property("checker")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("检验人");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("end_day")
.HasColumnType("datetime2")
.HasComment("失效日期");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("icitem_id")
.HasColumnType("bigint")
.HasComment("物料id");
b.Property("item_name")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasComment("物料名称");
b.Property("item_number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料代码");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("product_designer")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("产品设计员");
b.Property("product_principal")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("生产负责人");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("unit")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("单位");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.Property("use_date")
.HasColumnType("datetime2")
.HasComment("bom创建时间");
b.Property("use_status")
.HasColumnType("int")
.HasComment("使用状态");
b.Property("user")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("bom创建人");
b.Property("version")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("版本");
b.HasKey("Id");
b.HasIndex("bom_number", "item_number", "version", "tenant_id", "factory_id")
.IsUnique()
.HasFilter("[bom_number] IS NOT NULL AND [item_number] IS NOT NULL AND [version] IS NOT NULL AND [factory_id] IS NOT NULL");
b.ToTable("ic_bom", (string)null);
b.HasComment("物料BOM");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_bom_child", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("backflush")
.HasColumnType("int")
.HasComment("是否倒冲");
b.Property("begin_day")
.HasColumnType("datetime2")
.HasComment("生效日期");
b.Property("bom_id")
.IsRequired()
.HasColumnType("bigint")
.HasComment("bom主键");
b.Property("bom_number")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("bom单编号");
b.Property("child_num")
.HasColumnType("int")
.HasComment("序号");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("end_day")
.HasColumnType("datetime2")
.HasComment("失效日期");
b.Property("entryid")
.HasColumnType("int")
.HasComment("顺序号");
b.Property("erp_cls")
.HasColumnType("int")
.HasComment("物料属性");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("haveicsubs")
.HasColumnType("int")
.HasComment("存在替代关系");
b.Property("icitem_id")
.IsRequired()
.HasColumnType("bigint")
.HasComment("物料id");
b.Property("icitem_ids")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasComment("组合模式");
b.Property("is_bom")
.HasColumnType("int")
.HasComment("是否是BOM");
b.Property("is_replace")
.HasColumnType("int")
.HasComment("是否群组替代");
b.Property("iskeyitem")
.HasColumnType("int")
.HasComment("是否关键件");
b.Property("item_name")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasComment("物料名称");
b.Property("item_number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料代码");
b.Property("note")
.HasMaxLength(1000)
.HasColumnType("nvarchar(1000)")
.HasComment("备注");
b.Property("op_time")
.HasColumnType("datetime2")
.HasComment("操作时间");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("qty")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("用量");
b.Property("scrap")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("损耗率");
b.Property("substitute_code")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("群组代码");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("type")
.HasColumnType("int")
.HasComment("物料类型");
b.Property("unit")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("单位");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.Property("use_status")
.HasColumnType("int")
.HasComment("使用状态");
b.Property("version")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("版本");
b.HasKey("Id");
b.HasIndex("bom_number", "item_number", "version", "tenant_id", "factory_id")
.IsUnique()
.HasFilter("[bom_number] IS NOT NULL AND [item_number] IS NOT NULL AND [version] IS NOT NULL AND [factory_id] IS NOT NULL");
b.HasIndex("bom_id", "bom_number", "item_number", "version", "tenant_id", "factory_id");
b.ToTable("ic_bom_child", (string)null);
b.HasComment("物料BOM明细");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_item", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("Shipping_date")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("发运提前期");
b.Property("Warehousing_date")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("入库提前期");
b.Property("abc")
.HasColumnType("nvarchar(max)")
.HasComment("ABC分类");
b.Property("allowbatch")
.HasColumnType("int")
.HasComment("批号管理");
b.Property("allowmanu")
.HasColumnType("int")
.HasComment("允许生产");
b.Property("allowout")
.HasColumnType("int")
.HasComment("允许委外");
b.Property("allowpur")
.HasColumnType("int")
.HasComment("允许采购");
b.Property("allowsale")
.HasColumnType("int")
.HasComment("允许销售");
b.Property("allowserial")
.HasColumnType("int")
.HasComment("序列号管理");
b.Property("bat_change_economy")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("变动提前期批量");
b.Property("batch_manager")
.HasColumnType("int")
.HasComment("是否采用业务批次管理");
b.Property("box_model")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasComment("盒贴规格");
b.Property("chart_number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("图号");
b.Property("clean_leadtime")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("预处理提前期");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("cubic_measure")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("长度单位");
b.Property("enable_warning")
.HasColumnType("int")
.HasComment("启用预警");
b.Property("erp_cls")
.HasColumnType("int")
.HasComment("物料属性");
b.Property("erp_cls_name")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料属性");
b.Property("erp_oldnumber")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("erp旧料号");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("fix_leadtime")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("固定提前期(天)");
b.Property("fmr")
.HasColumnType("nvarchar(max)")
.HasComment("FMR分类");
b.Property("fms_number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("fms旧料号");
b.Property("full_name")
.HasMaxLength(255)
.HasColumnType("nvarchar(255)")
.HasComment("全名");
b.Property("fversion")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("版本号");
b.Property("gross_weight")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("毛重");
b.Property("height")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("高度");
b.Property("is_clean")
.HasColumnType("int")
.HasComment("是否备料前预处理");
b.Property("is_equipment")
.HasColumnType("int")
.HasComment("是否为设备");
b.Property("isbackflush")
.HasColumnType("int")
.HasComment("是否倒冲");
b.Property("isfixedreorder")
.HasColumnType("int")
.HasComment("设置为固定再订货点");
b.Property("iskeyitem")
.HasColumnType("int")
.HasComment("是否关键件");
b.Property("item_level")
.HasColumnType("bigint")
.HasComment("物料等级");
b.Property("lead_time")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("变动提前期");
b.Property("length")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("长度");
b.Property("life_state")
.HasColumnType("int")
.HasComment("生命周期状态");
b.Property("maq")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("最大生产批量");
b.Property("maund")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("重量单位");
b.Property("minorderqty")
.IsRequired()
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("最小订单量");
b.Property("minpackqty")
.IsRequired()
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("最小包装量");
b.Property("model")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasComment("规格型号");
b.Property("moq")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("经济生产批量");
b.Property("name")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料名称");
b.Property("net_weight")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("净重");
b.Property("number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料编码");
b.Property("order_inter_val")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("订货间隔期_天");
b.Property("order_leadtime")
.IsRequired()
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("下单前置期_天");
b.Property("order_point")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("再订货点");
b.Property("order_trategy")
.HasColumnType("int")
.HasComment("订货策略");
b.Property("ordissu_days")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("工单发料时间/天");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("output_type_id")
.HasColumnType("bigint")
.HasComment("出库类型");
b.Property("photo")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("图片");
b.Property("picktype")
.HasColumnType("bigint")
.HasComment("领料类型");
b.Property("plan_trategy")
.HasColumnType("int")
.HasComment("计划策略");
b.Property("product_line")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("产品线");
b.Property("production_leadtime")
.IsRequired()
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("生产中提前期_天");
b.Property("put_integer")
.HasColumnType("int")
.HasComment("投料自动取整");
b.Property("secinv")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("安全库存数量");
b.Property("secinv_ratio")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("安全库存触发采购比例");
b.Property("self_inspection_date")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("自检提前期");
b.Property("size")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("体积");
b.Property("source")
.HasMaxLength(200)
.HasColumnType("nvarchar(200)")
.HasComment("来源");
b.Property("standard_manhour")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("单位标准工时_小时");
b.Property("standard_period")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("标准工期");
b.Property("sterilize_leadtime")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("工序委外提前期");
b.Property("stock_leadtime")
.IsRequired()
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("仓库中提前期_天");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("total_tqq")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("累计提前期");
b.Property("transfer_leadtime")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("平台调拨提前期");
b.Property("transportation_leadtime")
.IsRequired()
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("运输中提前期_天");
b.Property("unit")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("单位");
b.Property("unit_qty")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("单位包装数量");
b.Property("unititem_amount")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("单位材料定额_元");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.Property("width")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("宽度");
b.HasKey("Id");
b.HasIndex("number", "fversion", "tenant_id", "factory_id")
.IsUnique()
.HasFilter("[number] IS NOT NULL AND [fversion] IS NOT NULL AND [factory_id] IS NOT NULL");
b.HasIndex("number", "name", "tenant_id", "factory_id");
b.ToTable("ic_item", (string)null);
b.HasComment("物料详情");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_item_stock", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("fversion")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("版本号");
b.Property("icitem_id")
.HasColumnType("bigint")
.HasComment("物料id");
b.Property("icitem_name")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料名称");
b.Property("icitem_number")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("物料编码");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("quantity_in_transit")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("调拨在途数量");
b.Property("sqty")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("物料库存量");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.HasKey("Id");
b.HasIndex("icitem_id", "icitem_name", "tenant_id", "factory_id");
b.HasIndex("icitem_number", "fversion", "tenant_id", "factory_id")
.IsUnique()
.HasFilter("[icitem_number] IS NOT NULL AND [fversion] IS NOT NULL AND [factory_id] IS NOT NULL");
b.ToTable("ic_item_stock", (string)null);
b.HasComment("物料库存表");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_substitute", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("substitute_code")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("群组代码");
b.Property("substitute_mode")
.HasColumnType("int")
.HasComment("替代方式");
b.Property("substitute_strategy")
.HasColumnType("int")
.HasComment("替代策略");
b.Property("substitute_type")
.HasColumnType("int")
.HasComment("替代类型");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.HasKey("Id");
b.HasIndex("substitute_code", "tenant_id", "factory_id");
b.ToTable("ic_substitute", (string)null);
b.HasComment("替代群组");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_substitute_group", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("main_material")
.HasColumnType("int")
.HasComment("主料/替代料");
b.Property("order_num")
.HasColumnType("int")
.HasComment("群组优先级");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("product_line")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("产品线");
b.Property("replace_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("替代名称");
b.Property("replace_relation")
.HasMaxLength(2000)
.HasColumnType("nvarchar(2000)")
.HasComment("替代关系");
b.Property("replace_way")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("替代方式");
b.Property("substitute_code")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("群组代码");
b.Property("substitute_group_id")
.HasColumnType("bigint")
.HasComment("群组主键");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.Property("use_model")
.HasMaxLength(5000)
.HasColumnType("nvarchar(max)")
.HasComment("使用机型");
b.HasKey("Id");
b.HasIndex("substitute_code", "tenant_id", "factory_id");
b.ToTable("ic_substitute_group", (string)null);
b.HasComment("物料替代多群组");
});
modelBuilder.Entity("Business.Model.MES.IC.ic_substitute_group_detail", b =>
{
b.Property("Id")
.HasColumnType("bigint");
b.Property("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted")
.HasComment("删除标识");
b.Property("create_by")
.HasColumnType("bigint")
.HasComment("创建人id");
b.Property("create_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("创建人名称");
b.Property("create_time")
.HasColumnType("datetime2")
.HasComment("创建时间");
b.Property("factory_id")
.HasColumnType("bigint")
.HasComment("工厂ID");
b.Property("fversion")
.HasMaxLength(80)
.HasColumnType("nvarchar(80)")
.HasComment("版本号");
b.Property("icitem_id")
.HasColumnType("bigint")
.HasComment("物料主键");
b.Property("icitem_number")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("物料编码");
b.Property("ismain")
.HasColumnType("int")
.HasComment("主/替");
b.Property("org_id")
.HasColumnType("bigint")
.HasComment("组织ID");
b.Property("replace_qty")
.HasPrecision(23, 10)
.HasColumnType("decimal(23,10)")
.HasComment("替代数量");
b.Property("seq")
.HasColumnType("int")
.HasComment("序号");
b.Property("substitute_code")
.HasMaxLength(20)
.HasColumnType("nvarchar(20)")
.HasComment("群组代码");
b.Property("substitute_group_id")
.HasColumnType("bigint")
.HasComment("替代多群组主键");
b.Property("tenant_id")
.HasColumnType("bigint")
.HasComment("企业ID");
b.Property("update_by")
.HasColumnType("bigint")
.HasComment("修改人");
b.Property("update_by_name")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasComment("修改人名称");
b.Property("update_time")
.HasColumnType("datetime2")
.HasComment("修改时间");
b.HasKey("Id");
b.HasIndex("substitute_code", "icitem_number", "tenant_id", "factory_id");
b.ToTable("ic_substitute_group_detail", (string)null);
b.HasComment("物料替代多群组明细");
});
modelBuilder.Entity("Business.Model.Production.mes_moentry", b =>
{
b.Property