db-创建
This commit is contained in:
@@ -28,8 +28,7 @@ namespace WMS.Web.Repositories.Configuration
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
base.OnModelCreating(builder);
|
||||
{
|
||||
|
||||
//改箱
|
||||
builder.Entity<ChangeBoxRecord>(ent =>
|
||||
@@ -132,7 +131,58 @@ namespace WMS.Web.Repositories.Configuration
|
||||
ent.ToTable("t_erp_outstock_task_details");
|
||||
ent.HasKey(x => x.Id);
|
||||
});
|
||||
#endregion
|
||||
|
||||
#region 出入库回退记录
|
||||
builder.Entity<BackRecord>(ent =>
|
||||
{
|
||||
ent.ToTable("t_wms_back_record");
|
||||
ent.HasKey(x => x.Id);
|
||||
|
||||
ent.HasMany(p => p.Details)
|
||||
.WithOne()
|
||||
.HasForeignKey(p => p.Fid)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
builder.Entity<BackRecordDetails>(ent =>
|
||||
{
|
||||
ent.ToTable("t_wms_back_record_details");
|
||||
ent.HasKey(x => x.Id);
|
||||
});
|
||||
#endregion
|
||||
|
||||
#region 箱库存
|
||||
builder.Entity<BoxInventory>(ent =>
|
||||
{
|
||||
ent.ToTable("t_wms_box_inventory");
|
||||
ent.HasKey(x => x.Id);
|
||||
|
||||
ent.HasMany(p => p.Details)
|
||||
.WithOne()
|
||||
.HasForeignKey(p => p.Fid)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
builder.Entity<BoxInventoryDetails>(ent =>
|
||||
{
|
||||
ent.ToTable("t_wms_box_inventory_details");
|
||||
ent.HasKey(x => x.Id);
|
||||
});
|
||||
# endregion
|
||||
|
||||
#region 即时库存相关
|
||||
builder.Entity<InventoryDetails>(ent =>
|
||||
{
|
||||
ent.ToTable("t_wms_inventory_details");
|
||||
ent.HasKey(x => x.Id);
|
||||
});
|
||||
builder.Entity<InventoryInOutDetails>(ent =>
|
||||
{
|
||||
ent.ToTable("t_wms_inventory_inout_details");
|
||||
ent.HasKey(x => x.Id);
|
||||
});
|
||||
#endregion
|
||||
|
||||
base.OnModelCreating(builder);
|
||||
}
|
||||
|
||||
public DbSet<ChangeBoxRecord> ChangeBoxRecord { get; set; }
|
||||
@@ -140,9 +190,11 @@ namespace WMS.Web.Repositories.Configuration
|
||||
public DbSet<OutStock> OutStock { get; set; }
|
||||
public DbSet<OutStockTask> OutStockTask { get; set; }
|
||||
public DbSet<TakeStock> TakeStock { get; set; }
|
||||
|
||||
public DbSet<InstockOrder> Instock { get; set; }
|
||||
|
||||
public DbSet<InstockTask> InstockTask { get; set; }
|
||||
public DbSet<BackRecord> BackRecord { get; set; }
|
||||
public DbSet<BoxInventory> BoxInventory { get; set; }
|
||||
public DbSet<InventoryDetails> InventoryDetails { get; set; }
|
||||
public DbSet<InventoryInOutDetails> InventoryInOutDetails { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user