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.WmsStore.cs |   63 +++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)

diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs
new file mode 100644
index 0000000..59ed277
--- /dev/null
+++ b/HIAWms/server/src/CMS.Plugin.HIAWms.EntityFrameworkCore/Extensions/CMSPluginEfCoreExtensions.WmsStore.cs
@@ -0,0 +1,63 @@
+using CMS.Plugin.HIAWms.Domain;
+using CMS.Plugin.HIAWms.Domain.WmsStores;
+using CMS.Plugin.HIAWms.Domain.Shared.WmsStores;
+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<WmsStore> IncludeDetails(this IQueryable<WmsStore> queryable, bool include = true)
+    {
+        if (!include)
+        {
+            return queryable;
+        }
+
+        return queryable;
+    }
+
+    /// <summary>
+    /// Configures the wmsstore.
+    /// </summary>
+    /// <param name="builder">The builder.</param>
+    public static void ConfigureWmsStore(this ModelBuilder builder)
+    {
+        Check.NotNull(builder, nameof(builder));
+
+        builder.Entity<WmsStore>(b =>
+        {
+            // Configure table & schema name
+            b.ToTable((CMSPluginDbProperties.DbTablePrefix + "_WmsStores").ToLower(), CMSPluginDbProperties.DbSchema).HasComment("浠撳簱淇℃伅琛�");
+
+            b.ConfigureByConvention();
+
+            // Properties
+            b.Property(x => x.StoreCode).HasMaxLength(WmsStoreConsts.MaxStoreCodeLength).IsRequired(false).HasComment("浠撳簱浠g爜");
+            b.Property(x => x.StoreName).HasMaxLength(WmsStoreConsts.MaxStoreNameLength).IsRequired(false).HasComment("浠撳簱鍚嶇О");
+            b.Property(x => x.RedundantField1).HasMaxLength(WmsStoreConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("鍐椾綑瀛楁1 - 棰勭暀鎵╁睍鐢ㄩ��");
+            b.Property(x => x.RedundantField2).HasMaxLength(WmsStoreConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("鍐椾綑瀛楁2 - 棰勭暀鎵╁睍鐢ㄩ��");
+            b.Property(x => x.RedundantField3).HasMaxLength(WmsStoreConsts.MaxRedundantFieldLength).IsRequired(false).HasComment("鍐椾綑瀛楁3 - 棰勭暀鎵╁睍鐢ㄩ��");
+            b.Property(x => x.Remark).HasMaxLength(WmsStoreConsts.MaxRemarkLength).IsRequired(false).HasComment("澶囨敞");
+            b.Property(x => x.Sort).HasComment("鎺掑簭");
+            b.Property(x => x.IsDisabled).IsRequired(false).HasComment("鏄惁绂佺敤");
+
+            // Indexes
+            b.HasIndex(u => u.StoreName);
+
+            // Apply object extension mappings
+            b.ApplyObjectExtensionMappings();
+        });
+    }
+}

--
Gitblit v1.9.3