zs
2025-05-13 6a72dc4cd7bc47b08c03562ef4fbed6b66701f20
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsPlace.cs
@@ -39,7 +39,7 @@
        builder.Entity<WmsPlace>(b =>
        {
            // Configure table & schema name
            b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsPlaces").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("Wms_Place");
            b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsPlaces").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("库位表");
            b.ConfigureByConvention();
@@ -54,12 +54,13 @@
            b.Property(x => x.LayerNo).HasComment("层");
            b.Property(x => x.Islock).HasComment("是否锁定");
            b.Property(x => x.EmptyContainer).HasComment("是否空托");
            b.Property(x => x.MaxStockNumber).HasComment("最大库存量");
            b.Property(x => x.RedundantField1).HasMaxLength(WmsPlaceConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("冗余字段1 - 预留扩展用途");
            b.Property(x => x.RedundantField2).HasMaxLength(WmsPlaceConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("冗余字段2 - 预留扩展用途");
            b.Property(x => x.RedundantField3).HasMaxLength(WmsPlaceConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("冗余字段3 - 预留扩展用途");
            b.Property(x => x.Sort).HasComment("排序");
            b.Property(x => x.Remark).HasMaxLength(WmsPlaceConsts.MaxRemarkLength).IsRequired(false).HasComment("备注");
            b.Property(x => x.IsDisabled).IsRequired(false).HasComment("是否禁用");
            b.Property(x => x.IsDisabled).IsRequired(true).HasDefaultValue(false).HasComment("是否禁用");
            // Indexes
            b.HasIndex(u => u.PlaceNo).IsUnique(); // 编号字段添加唯一索引