From e71bc24daa8f00768787e18f5daba09128abfc62 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周二, 29 4月 2025 10:59:40 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo

---
 HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs |   68 ++++++++++++++++++++++++++++++++++
 1 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs
new file mode 100644
index 0000000..c335bd9
--- /dev/null
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsArea.cs
@@ -0,0 +1,68 @@
+using CMS.Plugin.HIAWms.Domain;
+using CMS.Plugin.HIAWms.Domain.WmsAreas;
+using CMS.Plugin.HIAWms.Domain.Shared.WmsAreas;
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp;
+using Volo.Abp.EntityFrameworkCore.Modeling;
+
+namespace CMS.Plugin.HIAWms.EntityFrameworkCore.Extensions;
+
+/// <summary>
+/// EfCore鎵╁睍
+/// </summary>
+public  static partial class CMSPluginEfCoreExtensions
+{
+    /// <summary>
+    /// Includes the details.
+    /// </summary>
+    /// <param name="queryable">The queryable.</param>
+    /// <param name="include">if set to <c>true</c> [include].</param>
+    /// <returns></returns>
+    public static IQueryable<WmsArea> IncludeDetails(this IQueryable<WmsArea> queryable, bool include = true)
+    {
+        if (!include)
+        {
+            return queryable;
+        }
+
+        return queryable;
+    }
+
+    /// <summary>
+    /// Configures the wmsarea.
+    /// </summary>
+    /// <param name="builder">The builder.</param>
+    public static void ConfigureWmsArea(this ModelBuilder builder)
+    {
+        Check.NotNull(builder, nameof(builder));
+
+        builder.Entity<WmsArea>(b =>
+        {
+            // Configure table & schema name
+            b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsAreas").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("搴撳尯琛�");
+
+            b.ConfigureByConvention();
+
+            // Properties
+            b.Property(x => x.AreaNo).HasMaxLength(WmsAreaConsts.MaxNameLength).IsRequired().HasComment("搴撳尯缂栧彿");
+            b.Property(x => x.AreaName).HasMaxLength(WmsAreaConsts.MaxAreaNameLength).IsRequired().HasComment("搴撳尯鍚嶇О");
+            b.Property(x => x.AreaDesc).HasMaxLength(WmsAreaConsts.MaxAreaDescLength).IsRequired(false).HasComment("鎻忚堪");
+            b.Property(x => x.AreaStatus).HasComment("搴撳尯鐘舵��");
+            b.Property(x => x.AreaType).HasComment("搴撳尯绫诲瀷");
+            b.Property(x => x.RedundantField1).HasMaxLength(WmsAreaConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+            b.Property(x => x.RedundantField2).HasMaxLength(WmsAreaConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+            b.Property(x => x.RedundantField3).HasMaxLength(WmsAreaConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+            b.Property(x => x.StoreCode).HasMaxLength(WmsAreaConsts.MaxStoreCodeLength).IsRequired(false).HasComment("浠撳簱浠g爜");
+            b.Property(x => x.StoreName).HasMaxLength(WmsAreaConsts.MaxStoreNameLength).IsRequired(false).HasComment("浠撳簱鍚嶇О");
+            b.Property(x => x.Sort).HasComment("鎺掑簭");
+            b.Property(x => x.Remark).HasMaxLength(WmsAreaConsts.MaxRemarkLength).IsRequired(false).HasComment("澶囨敞");
+            b.Property(x => x.IsDisabled).IsRequired(false).HasComment("鏄惁绂佺敤");
+
+            // Indexes
+            b.HasIndex(u => u.AreaName);
+
+            // Apply object extension mappings
+            b.ApplyObjectExtensionMappings();
+        });
+    }
+}

--
Gitblit v1.9.3