From 32288af3e5f12bc48d8360114c872fde5d9ff4a8 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 08 八月 2025 09:09:08 +0800
Subject: [PATCH] pref:优化

---
 FlexJobApi.Core/Entities/Users/Enterprise.cs |   49 ++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/FlexJobApi.Core/Entities/Users/Enterprise.cs b/FlexJobApi.Core/Entities/Users/Enterprise.cs
index 65ac6ef..421f20c 100644
--- a/FlexJobApi.Core/Entities/Users/Enterprise.cs
+++ b/FlexJobApi.Core/Entities/Users/Enterprise.cs
@@ -17,19 +17,45 @@
     {
         public Enterprise()
         {
-            UserInfos = [];
+            Users = [];
             Departments = [];
         }
-
-        /// <summary>
-        /// 浼佷笟璁よ瘉Id
-        /// </summary>
-        public Guid EnterpriseAuthId { get; set; }
 
         /// <summary>
         /// 浼佷笟璁よ瘉
         /// </summary>
         public EnterpriseAuth EnterpriseAuth { get; set; }
+
+        /// <summary>
+        /// 浼佷笟鍏ㄧО
+        /// </summary>
+        [Required]
+        [MaxLength(128)]
+        public string EnterpriseName { get; set; }
+
+        /// <summary>
+        /// 缁熶竴绀句細淇$敤浠g爜
+        /// </summary>
+        [Required]
+        [MaxLength(18)]
+        public string SocietyCreditCode { get; set; }
+
+        /// <summary>
+        /// 钀ヤ笟鎵х収鐓х墖
+        /// </summary>
+        public string LicenseImage { get; set; }
+
+        /// <summary>
+        /// 娉曚汉濮撳悕
+        /// </summary>
+        [MaxLength(32)]
+        public string LegalPerson { get; set; }
+
+        /// <summary>
+        /// 娉曚汉韬唤璇佸彿
+        /// </summary>
+        [MaxLength(18)]
+        public string LegalIdentity { get; set; }
 
         /// <summary>
         /// 鎵�鍦ㄧ渷浠界紪鍙�
@@ -140,6 +166,11 @@
         public decimal SmsCost { get; set; }
 
         /// <summary>
+        /// 鏄惁瀹炲悕
+        /// </summary>
+        public bool IsReal { get; set; }
+
+        /// <summary>
         /// 閮ㄩ棬
         /// </summary>
         public List<Department> Departments { get; set; }
@@ -147,11 +178,15 @@
         /// <summary>
         /// 鐢ㄦ埛淇℃伅
         /// </summary>
-        public List<UserInfo> UserInfos { get; set; }
+        public List<User> Users { get; set; }
 
         public void Configure(EntityTypeBuilder<Enterprise> entityBuilder, DbContext dbContext, Type dbContextLocator)
         {
             entityBuilder
+                .HasOne(it => it.EnterpriseAuth)
+                .WithOne(it => it.Enterprise)
+                .HasForeignKey<EnterpriseAuth>(it => it.Id);
+            entityBuilder
                 .HasOne(it => it.Province)
                 .WithMany()
                 .HasForeignKey(it => it.ProvinceCode)

--
Gitblit v1.9.1