|
|
@@ -14,7 +14,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_bom>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_bom");
|
|
|
- b.HasIndex(b => new { b.bom_number, b.item_number,b.version, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.bom_number, b.item_number,b.version,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -22,7 +22,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_bom_child>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_bom_child");
|
|
|
- b.HasIndex(b => new { b.bom_id,b.bom_number, b.item_number, b.version, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.bom_id,b.bom_number, b.item_number, b.version,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -30,7 +30,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_item>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_item");
|
|
|
- b.HasIndex(b => new { b.number, b.name,b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.number, b.name,b.tenant_id,b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -38,7 +38,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_item_stock>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_item_stock");
|
|
|
- b.HasIndex(b => new { b.icitem_id, b.icitem_name, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.icitem_id, b.icitem_name,b.tenant_id, b.company_id, b.factory_id });
|
|
|
//不映射到数据库中
|
|
|
b.Ignore(x => x.bang_id);
|
|
|
b.ConfigureByConvention();
|
|
|
@@ -48,7 +48,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_substitute>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_substitute");
|
|
|
- b.HasIndex(b => new { b.substitute_code, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.substitute_code,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -56,7 +56,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_substitute_group>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_substitute_group");
|
|
|
- b.HasIndex(b => new { b.substitute_code, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.substitute_code,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -64,7 +64,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<ic_substitute_group_detail>(b =>
|
|
|
{
|
|
|
b.ToTable("ic_substitute_group_detail");
|
|
|
- b.HasIndex(b => new { b.substitute_code,b.icitem_number, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.substitute_code,b.icitem_number,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -72,7 +72,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<srm_po_list>(b =>
|
|
|
{
|
|
|
b.ToTable("srm_po_list");
|
|
|
- b.HasIndex(b => new { b.po_billno, b.number, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.po_billno, b.number,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -80,7 +80,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<srm_po_main>(b =>
|
|
|
{
|
|
|
b.ToTable("srm_po_main");
|
|
|
- b.HasIndex(b => new { b.po_billno, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.po_billno,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -88,7 +88,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<srm_purchase>(b =>
|
|
|
{
|
|
|
b.ToTable("srm_purchase");
|
|
|
- b.HasIndex(b => new {b.icitem_id, b.supplier_number, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new {b.icitem_id, b.supplier_number,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.Ignore(x => x.bang_id);
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
@@ -97,7 +97,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<srm_po_occupy>(b =>
|
|
|
{
|
|
|
b.ToTable("srm_po_occupy");
|
|
|
- b.HasIndex(b => new { b.polist_id, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.polist_id,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.Ignore(v => v.bang_id);
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
@@ -106,7 +106,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<srm_pr_main>(b =>
|
|
|
{
|
|
|
b.ToTable("srm_pr_main");
|
|
|
- b.HasIndex(b => new { b.pr_billno,b.pr_purchasenumber,b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.pr_billno, b.pr_purchasenumber, b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.Ignore(v => v.bang_id);
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
@@ -115,7 +115,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<mes_moentry>(b =>
|
|
|
{
|
|
|
b.ToTable("mes_moentry");
|
|
|
- b.HasIndex(b => new { b.moentry_moid, b.moentry_mono, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.moentry_moid, b.moentry_mono, b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -123,7 +123,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<mes_mooccupy>(b =>
|
|
|
{
|
|
|
b.ToTable("mes_mooccupy");
|
|
|
- b.HasIndex(b => new { b.moo_id_billid, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.moo_id_billid,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -131,7 +131,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<mes_morder>(b =>
|
|
|
{
|
|
|
b.ToTable("mes_morder");
|
|
|
- b.HasIndex(b => new { b.morder_no, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.morder_no,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -147,7 +147,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<mes_stockoccupy>(b =>
|
|
|
{
|
|
|
b.ToTable("mes_stockoccupy");
|
|
|
- b.HasIndex(b => new { b.fbill_no,b.fitem_number, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.fbill_no,b.fitem_number,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -157,7 +157,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<crm_seorder>(b =>
|
|
|
{
|
|
|
b.ToTable("crm_seorder");
|
|
|
- b.HasIndex(b => new { b.bill_no, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.bill_no,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -165,7 +165,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<crm_seorderentry>(b =>
|
|
|
{
|
|
|
b.ToTable("crm_seorderentry");
|
|
|
- b.HasIndex(b => new { b.seorder_id, b.bill_no,b.item_number,b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.seorder_id, b.bill_no,b.item_number,b.tenant_id,b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -173,7 +173,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<crm_customer>(b =>
|
|
|
{
|
|
|
b.ToTable("crm_customer");
|
|
|
- b.HasIndex(b => new { b.customer_no, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.customer_no,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|
|
|
@@ -181,7 +181,7 @@ namespace Business.EntityFrameworkCore
|
|
|
builder.Entity<srm_supplier>(b =>
|
|
|
{
|
|
|
b.ToTable("srm_supplier");
|
|
|
- b.HasIndex(b => new { b.supplier_no, b.company_id, b.factory_id });
|
|
|
+ b.HasIndex(b => new { b.supplier_no,b.tenant_id, b.company_id, b.factory_id });
|
|
|
b.ConfigureByConvention();
|
|
|
b.Property(x => x.Id).ValueGeneratedNever();//迁移sqlserver默认是自增,需要配置一下
|
|
|
});
|