| | |
| | | |
| | | builder.Entity<WmsContainer>(b => |
| | | { |
| | | //Configure table & schema name |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsContainers").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("WmsContainer"); |
| | | b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsContainers").ToLower(), CMSPluginDbProperties.DbSchema) |
| | | .HasComment("托盘信息表"); |
| | | |
| | | b.ConfigureByConvention(); |
| | | |
| | | //Properties |
| | | b.Property(x => x.Code).HasMaxLength(WmsContainerConsts.MaxCodeLength).IsRequired().HasComment("编码"); |
| | | b.Property(x => x.Name).HasMaxLength(WmsContainerConsts.MaxNameLength).IsRequired().HasComment("名称"); |
| | | b.Property(x => x.ContainerNo) |
| | | .HasMaxLength(50) |
| | | .IsRequired() |
| | | .HasComment("托盘编号"); |
| | | |
| | | b.Property(x => x.ContainerType) |
| | | .IsRequired() |
| | | .HasComment("托盘类型"); |
| | | |
| | | b.Property(x => x.ContainerStatus) |
| | | .IsRequired() |
| | | .HasComment("托盘状态"); |
| | | |
| | | b.Property(x => x.SpecLength) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("长度"); |
| | | |
| | | b.Property(x => x.SpecWidth) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("宽度"); |
| | | |
| | | b.Property(x => x.SpecHeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("高度"); |
| | | |
| | | b.Property(x => x.LimitLength) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("限长"); |
| | | |
| | | b.Property(x => x.LimitWidth) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("限宽"); |
| | | |
| | | b.Property(x => x.LimitHeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("限高"); |
| | | |
| | | b.Property(x => x.MaxWeight) |
| | | .HasPrecision(18, 2) |
| | | .HasComment("载重上限"); |
| | | |
| | | b.Property(x => x.ExceptionNumber) |
| | | .HasComment("异常数量"); |
| | | |
| | | b.Property(x => x.MaterialNumber) |
| | | .HasComment("物料数量"); |
| | | |
| | | b.Property(x => x.RedundantField1) |
| | | .HasMaxLength(200) |
| | | .HasComment("冗余字段1 - 预留扩展用途"); |
| | | |
| | | b.Property(x => x.RedundantField2) |
| | | .HasMaxLength(200) |
| | | .HasComment("冗余字段2 - 预留扩展用途"); |
| | | |
| | | b.Property(x => x.RedundantField3) |
| | | .HasMaxLength(200) |
| | | .HasComment("冗余字段3 - 预留扩展用途"); |
| | | |
| | | b.Property(x => x.Sort).HasComment("排序"); |
| | | b.Property(x => x.IsDisabled).IsRequired(false).HasComment("是否禁用"); |
| | | b.Property(x => x.Remark).HasMaxLength(WmsContainerConsts.MaxRemarkLength).IsRequired(false).HasComment("备注"); |
| | | |
| | | b.HasIndex(u => u.Name); |
| | | b.HasIndex(u => u.ContainerNo).IsUnique(); |
| | | b.HasIndex(u => u.ContainerType); |
| | | b.HasIndex(u => u.ContainerStatus); |
| | | |
| | | b.ApplyObjectExtensionMappings(); |
| | | }); |