zs
2025-05-13 de4a3a2c1b39c128d4ecd23367db5fcbda957bdd
HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsMaterial.cs
@@ -50,7 +50,7 @@
            b.HasKey(x => x.Id);
            // 字段配置
            b.Property(x => x.MaterialCode)
            b.Property(x => x.MaterialNo)
                .HasMaxLength(64)
                .IsRequired()
                .HasComment("物料编码(唯一标识)");
@@ -101,6 +101,9 @@
            b.Property(x => x.Certification)
                .HasMaxLength(128)
                .HasComment("证书编号");
            b.Property(x => x.MaterialModel)
                .HasMaxLength(128)
                .HasComment("型号");
            // 冗余字段配置
            b.Property(x => x.RedundantField1)
@@ -134,7 +137,7 @@
                .HasComment("是否禁用");
            // 索引配置
            b.HasIndex(x => x.MaterialCode).IsUnique(); // 物料编码唯一索引
            b.HasIndex(x => x.MaterialNo).IsUnique(); // 物料编码唯一索引
            b.HasIndex(x => x.MaterialName);           // 物料名称普通索引
            b.HasIndex(x => x.PurchaseType);           // 采购类型索引(如需查询过滤)
            b.HasIndex(x => x.MaterialType);           // 物料类型索引(如需查询过滤)