箱信息实体对象

This commit is contained in:
tongfei
2023-10-30 10:03:15 +08:00
parent a297330ea0
commit 1c414c4fd2
5 changed files with 172 additions and 5 deletions

View File

@@ -182,6 +182,26 @@ namespace WMS.Web.Repositories.Configuration
});
#endregion
#region
builder.Entity<Box>(ent =>
{
ent.ToTable("t_ops_box");
ent.HasKey(x => x.Id);
ent.HasMany(p => p.Details)
.WithOne()
.HasForeignKey(p => p.Fid)
.OnDelete(DeleteBehavior.Cascade);
});
builder.Entity<BoxDetails>(ent =>
{
ent.ToTable("t_ops_box_details");
ent.HasKey(x => x.Id);
});
#endregion
base.OnModelCreating(builder);
}
@@ -203,5 +223,8 @@ namespace WMS.Web.Repositories.Configuration
public DbSet<BoxInventoryDetails> BoxInventoryDetails { get; set; }
public DbSet<InventoryDetails> InventoryDetails { get; set; }
public DbSet<InventoryInOutDetails> InventoryInOutDetails { get; set; }
public DbSet<Box> Box { get; set; }
public DbSet<BoxDetails> BoxDetails { get; set; }
}
}