From 8e2a25b07e8d4d003c61c8f7b9ee5e5e542371b4 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期四, 21 八月 2025 15:14:06 +0800
Subject: [PATCH] feat:开发

---
 FlexJobApi.Core/Utils/WxmpUtils/WxmpUtils.cs                                                       |   87 +
 FlexJobApi.Core/Utils/WxmpUtils/WxmpOptions.cs                                                     |    5 
 FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.Designer.cs | 2799 ++++++++++++++++++++++++++++++++++++++++++++++++++
 FlexJobApi.Core/Utils/WxmpUtils/WxmpGetQrCodeRequest.cs                                            |  109 +
 FlexJobApi.Core/Utils/WxmpUtils/WxmpGetAccessTokenRequest.cs                                       |   50 
 FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs          |   23 
 FlexJobApi.Web.Entry/appsettings.json                                                              |    7 
 FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.cs          |   28 
 FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs                |    5 
 FlexJobApi.Core/FlexJobApi.Core.xml                                                                |  155 ++
 FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml                            |    2 
 FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionResponse.cs                                   |    2 
 FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplate.cs                              |    6 
 FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplatesQuery.cs     |    5 
 FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs                         |    3 
 15 files changed, 3,276 insertions(+), 10 deletions(-)

diff --git a/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplate.cs b/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplate.cs
index ba3a9ce..913ba3a 100644
--- a/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplate.cs
+++ b/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplate.cs
@@ -40,6 +40,11 @@
         public string File { get; set; }
 
         /// <summary>
+        /// 灏忕▼搴忕爜
+        /// </summary>
+        public string WxmpQrCode { get; set; }
+
+        /// <summary>
         /// 鍒剁増妯℃澘鐓х墖
         /// </summary>
         public string TemplateEditData { get; set; }
@@ -52,6 +57,7 @@
         /// <summary>
         /// 涓氬姟缂栫爜
         /// </summary>
+        [MaxLength(32)]
         public string Code { get; set; }
 
         /// <summary>
diff --git a/FlexJobApi.Core/FlexJobApi.Core.xml b/FlexJobApi.Core/FlexJobApi.Core.xml
index 3f6c432..21a2267 100644
--- a/FlexJobApi.Core/FlexJobApi.Core.xml
+++ b/FlexJobApi.Core/FlexJobApi.Core.xml
@@ -1179,6 +1179,11 @@
             妯℃澘
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.ContractTemplate.WxmpQrCode">
+            <summary>
+            灏忕▼搴忕爜
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.ContractTemplate.TemplateEditData">
             <summary>
             鍒剁増妯℃澘鐓х墖
@@ -7217,6 +7222,11 @@
             妯℃澘
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.SaveContractTemplateCommand.TemplateEditData">
+            <summary>
+            鍒剁増妯℃澘鐓х墖
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.SaveContractTemplateCommand.Code">
             <summary>
             涓氬姟缂栫爜
@@ -7401,6 +7411,11 @@
         <member name="P:FlexJobApi.Core.GetContractTemplateQueryResult.File">
             <summary>
             妯℃澘
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.GetContractTemplateQueryResult.WxmpQrCode">
+            <summary>
+            灏忕▼搴忕爜
             </summary>
         </member>
         <member name="P:FlexJobApi.Core.GetContractTemplateQueryResult.TemplateEditData">
@@ -7616,6 +7631,11 @@
         <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplatesQueryResultItem.File">
             <summary>
             妯℃澘
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplatesQueryResultItem.WxmpQrCode">
+            <summary>
+            灏忕▼搴忕爜
             </summary>
         </member>
         <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplatesQueryResultItem.Status">
@@ -12186,6 +12206,41 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="T:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenRequest">
+            <summary>
+            寰俊灏忕▼搴忚幏鍙栨帴鍙h皟鐢ㄥ嚟鎹�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenRequest.GrantType">
+            <summary>
+            濉啓 client_credential
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenRequest.Appid">
+            <summary>
+            灏忕▼搴忓敮涓�鍑瘉锛屽嵆 AppID锛屽彲鍦ㄣ�屽井淇″叕浼楀钩鍙� - 璁剧疆 - 寮�鍙戣缃�嶉〉涓幏寰椼�傦紙闇�瑕佸凡缁忔垚涓哄紑鍙戣�咃紝涓斿笎鍙锋病鏈夊紓甯哥姸鎬�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenRequest.Secret">
+            <summary>
+            灏忕▼搴忓敮涓�鍑瘉瀵嗛挜锛屽嵆 AppSecret锛岃幏鍙栨柟寮忓悓 appid
+            </summary>
+        </member>
+        <member name="T:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenResponse">
+            <summary>
+            寰俊灏忕▼搴忚幏鍙栨帴鍙h皟鐢ㄥ嚟鎹�-缁撴灉
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenResponse.AccessToken">
+            <summary>
+            鑾峰彇鍒扮殑鍑瘉
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.Utils.WxmpUtils.WxmpGetAccessTokenResponse.ExpiresIn">
+            <summary>
+            鍑瘉鏈夋晥鏃堕棿锛屽崟浣嶏細绉掋�傜洰鍓嶆槸7200绉掍箣鍐呯殑鍊笺��
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.CurrentLogier.Id">
             <summary>
             鐢ㄦ埛Id
@@ -12630,6 +12685,87 @@
             <param name="identity"></param>
             <returns></returns>
         </member>
+        <member name="T:FlexJobApi.Core.WxmpGetQrCodeCommand">
+            <summary>
+            灏忕▼搴忚幏鍙栦簩缁寸爜
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeCommand.UserType">
+            <summary>
+            鐢ㄦ埛绫诲瀷
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeCommand.OssScene">
+            <summary>
+            闃块噷浜慜SS鍦烘櫙
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeCommand.OssFileName">
+            <summary>
+            鏂囦欢鍚�
+            </summary>
+        </member>
+        <member name="T:FlexJobApi.Core.WxmpGetQrCodeRequest">
+            <summary>
+            灏忕▼搴忚幏鍙栦簩缁寸爜
+            </summary>
+        </member>
+        <!-- Badly formed XML comment ignored for member "P:FlexJobApi.Core.WxmpGetQrCodeRequest.Scene" -->
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.Page">
+            <summary>
+            榛樿鏄富椤碉紝椤甸潰 page锛屼緥濡� pages/index/index锛屾牴璺緞鍓嶄笉瑕佸~鍔� /锛屼笉鑳芥惡甯﹀弬鏁帮紙鍙傛暟璇锋斁鍦╯cene瀛楁閲岋級锛屽鏋滀笉濉啓杩欎釜瀛楁锛岄粯璁よ烦涓婚〉闈€�俿cancode_time涓虹郴缁熶繚鐣欏弬鏁帮紝涓嶅厑璁搁厤缃�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.CheckPath">
+            <summary>
+            榛樿鏄痶rue锛屾鏌age 鏄惁瀛樺湪锛屼负 true 鏃� page 蹇呴』鏄凡缁忓彂甯冪殑灏忕▼搴忓瓨鍦ㄧ殑椤甸潰锛堝惁鍒欐姤閿欙級锛涗负 false 鏃跺厑璁稿皬绋嬪簭鏈彂甯冩垨鑰� page 涓嶅瓨鍦紝 浣唒age 鏈夋暟閲忎笂闄愶紙60000涓級璇峰嬁婊ョ敤銆�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.EnvVersion">
+            <summary>
+            瑕佹墦寮�鐨勫皬绋嬪簭鐗堟湰銆傛寮忕増涓� "release"锛屼綋楠岀増涓� "trial"锛屽紑鍙戠増涓� "develop"銆傞粯璁ゆ槸姝e紡鐗堛��
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.Width">
+            <summary>
+            榛樿430锛屼簩缁寸爜鐨勫搴︼紝鍗曚綅 px锛屾渶灏� 280px锛屾渶澶� 1280px
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.AutoColor">
+            <summary>
+            鑷姩閰嶇疆绾挎潯棰滆壊锛屽鏋滈鑹蹭緷鐒舵槸榛戣壊锛屽垯璇存槑涓嶅缓璁厤缃富鑹茶皟锛岄粯璁� false
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.LineColor">
+            <summary>
+            榛樿鏄瘂"r":0,"g":0,"b":0} 銆俛uto_color 涓� false 鏃剁敓鏁堬紝浣跨敤 rgb 璁剧疆棰滆壊 渚嬪 {"r":"xxx","g":"xxx","b":"xxx"} 鍗佽繘鍒惰〃绀�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeRequest.IsHyaline">
+            <summary>
+            榛樿鏄痜alse锛屾槸鍚﹂渶瑕侀�忔槑搴曡壊锛屼负 true 鏃讹紝鐢熸垚閫忔槑搴曡壊鐨勫皬绋嬪簭
+            </summary>
+        </member>
+        <member name="T:FlexJobApi.Core.WxmpGetQrCodeResponse">
+            <summary>
+            灏忕▼搴忚幏鍙栦簩缁寸爜-缁撴灉
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeResponse.Buffer">
+            <summary>
+            鍥剧墖 Buffer
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeResponse.ErrorCode">
+            <summary>
+            閿欒鐮�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.WxmpGetQrCodeResponse.ErrorMessage">
+            <summary>
+            閿欒淇℃伅
+            </summary>
+        </member>
         <member name="T:FlexJobApi.Core.WxmpOptions">
             <summary>
             寰俊灏忕▼搴忛厤缃�
@@ -12650,11 +12786,30 @@
             灏忕▼搴忓瘑閽�
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.WxmpOptionsItem.EnvVersion">
+            <summary>
+            鐗堟湰
+            </summary>
+        </member>
         <member name="T:FlexJobApi.Core.WxmpUtils">
             <summary>
             寰俊灏忕▼搴忓伐鍏�
             </summary>
         </member>
+        <member name="M:FlexJobApi.Core.WxmpUtils.GetAccessToken(FlexJobApi.Core.EnumUserType)">
+            <summary>
+            鑾峰彇灏忕▼搴忔帴鍙h皟鐢ㄥ嚟鎹�
+            </summary>
+            <param name="userType"></param>
+            <returns></returns>
+        </member>
+        <member name="M:FlexJobApi.Core.WxmpUtils.GetQrCodeOssUrl(FlexJobApi.Core.WxmpGetQrCodeCommand)">
+            <summary>
+            鑾峰彇灏忕▼搴忕爜
+            </summary>
+            <param name="command"></param>
+            <returns></returns>
+        </member>
         <member name="T:FlexJobApi.Core.XmlDoc">
             <summary>
             娉ㄩ噴鏂囨。
diff --git a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs
index f423181..fcd1c0c 100644
--- a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs
+++ b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs
@@ -51,6 +51,11 @@
         public string File { get; set; }
 
         /// <summary>
+        /// 灏忕▼搴忕爜
+        /// </summary>
+        public string WxmpQrCode { get; set; }
+
+        /// <summary>
         /// 鍒剁増妯℃澘鐓х墖
         /// </summary>
         public string TemplateEditData { get; set; }
diff --git a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplatesQuery.cs b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplatesQuery.cs
index 2515db6..8db6db1 100644
--- a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplatesQuery.cs
+++ b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplatesQuery.cs
@@ -99,6 +99,11 @@
         public string File { get; set; }
 
         /// <summary>
+        /// 灏忕▼搴忕爜
+        /// </summary>
+        public string WxmpQrCode { get; set; }
+
+        /// <summary>
         /// 鍒剁増鐘舵��
         /// </summary>
         public EnumContractTemplateStatus Status { get; set; }
diff --git a/FlexJobApi.Core/Utils/WxmpUtils/WxmpGetAccessTokenRequest.cs b/FlexJobApi.Core/Utils/WxmpUtils/WxmpGetAccessTokenRequest.cs
new file mode 100644
index 0000000..bc11909
--- /dev/null
+++ b/FlexJobApi.Core/Utils/WxmpUtils/WxmpGetAccessTokenRequest.cs
@@ -0,0 +1,50 @@
+锘縰sing Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FlexJobApi.Core.Utils.WxmpUtils
+{
+    /// <summary>
+    /// 寰俊灏忕▼搴忚幏鍙栨帴鍙h皟鐢ㄥ嚟鎹�
+    /// </summary>
+    public class WxmpGetAccessTokenRequest
+    {
+        /// <summary>
+        /// 濉啓 client_credential
+        /// </summary>
+        [JsonProperty("grant_type")]
+        public string GrantType { get; set; } = "client_credential";
+
+        /// <summary>
+        /// 灏忕▼搴忓敮涓�鍑瘉锛屽嵆 AppID锛屽彲鍦ㄣ�屽井淇″叕浼楀钩鍙� - 璁剧疆 - 寮�鍙戣缃�嶉〉涓幏寰椼�傦紙闇�瑕佸凡缁忔垚涓哄紑鍙戣�咃紝涓斿笎鍙锋病鏈夊紓甯哥姸鎬�
+        /// </summary>
+        [JsonProperty("appid")]
+        public string Appid { get; set; }
+
+        /// <summary>
+        /// 灏忕▼搴忓敮涓�鍑瘉瀵嗛挜锛屽嵆 AppSecret锛岃幏鍙栨柟寮忓悓 appid
+        /// </summary>
+        [JsonProperty("secret")]
+        public string Secret { get; set; }
+    }
+
+    /// <summary>
+    /// 寰俊灏忕▼搴忚幏鍙栨帴鍙h皟鐢ㄥ嚟鎹�-缁撴灉
+    /// </summary>
+    public class WxmpGetAccessTokenResponse
+    {
+        /// <summary>
+        /// 鑾峰彇鍒扮殑鍑瘉
+        /// </summary>
+        [JsonProperty("access_token")]
+        public string AccessToken { get; set; }
+        /// <summary>
+        /// 鍑瘉鏈夋晥鏃堕棿锛屽崟浣嶏細绉掋�傜洰鍓嶆槸7200绉掍箣鍐呯殑鍊笺��
+        /// </summary>
+        [JsonProperty("expires_in")]
+        public int ExpiresIn { get; set; }
+    }
+}
diff --git a/FlexJobApi.Core/Utils/WxmpUtils/WxmpGetQrCodeRequest.cs b/FlexJobApi.Core/Utils/WxmpUtils/WxmpGetQrCodeRequest.cs
new file mode 100644
index 0000000..a12d38d
--- /dev/null
+++ b/FlexJobApi.Core/Utils/WxmpUtils/WxmpGetQrCodeRequest.cs
@@ -0,0 +1,109 @@
+锘縰sing Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FlexJobApi.Core
+{
+    /// <summary>
+    /// 灏忕▼搴忚幏鍙栦簩缁寸爜
+    /// </summary>
+    public class WxmpGetQrCodeCommand : WxmpGetQrCodeRequest
+    {
+        /// <summary>
+        /// 鐢ㄦ埛绫诲瀷
+        /// </summary>
+        public EnumUserType UserType { get; set; }
+
+        /// <summary>
+        /// 闃块噷浜慜SS鍦烘櫙
+        /// </summary>
+        public string OssScene { get; set; }
+
+        /// <summary>
+        /// 鏂囦欢鍚�
+        /// </summary>
+        public string OssFileName { get; set; }
+    }
+
+    /// <summary>
+    /// 灏忕▼搴忚幏鍙栦簩缁寸爜
+    /// </summary>
+    public class WxmpGetQrCodeRequest
+    {
+        /// <summary>
+        /// 鏈�澶�32涓彲瑙佸瓧绗︼紝鍙敮鎸佹暟瀛楋紝澶у皬鍐欒嫳鏂囦互鍙婇儴鍒嗙壒娈婂瓧绗︼細!#$&'()*+,/:;=?@-._~锛屽叾瀹冨瓧绗﹁鑷缂栫爜涓哄悎娉曞瓧绗︼紙鍥犱笉鏀寔%锛屼腑鏂囨棤娉曚娇鐢� urlencode 澶勭悊锛岃浣跨敤鍏朵粬缂栫爜鏂瑰紡锛�
+        /// </summary>
+        [JsonProperty("scene")]
+        [Required]
+        public string Scene { get; set; }
+
+        /// <summary>
+        /// 榛樿鏄富椤碉紝椤甸潰 page锛屼緥濡� pages/index/index锛屾牴璺緞鍓嶄笉瑕佸~鍔� /锛屼笉鑳芥惡甯﹀弬鏁帮紙鍙傛暟璇锋斁鍦╯cene瀛楁閲岋級锛屽鏋滀笉濉啓杩欎釜瀛楁锛岄粯璁よ烦涓婚〉闈€�俿cancode_time涓虹郴缁熶繚鐣欏弬鏁帮紝涓嶅厑璁搁厤缃�
+        /// </summary>
+        [JsonProperty("page")]
+        public string Page { get; set; }
+
+        /// <summary>
+        /// 榛樿鏄痶rue锛屾鏌age 鏄惁瀛樺湪锛屼负 true 鏃� page 蹇呴』鏄凡缁忓彂甯冪殑灏忕▼搴忓瓨鍦ㄧ殑椤甸潰锛堝惁鍒欐姤閿欙級锛涗负 false 鏃跺厑璁稿皬绋嬪簭鏈彂甯冩垨鑰� page 涓嶅瓨鍦紝 浣唒age 鏈夋暟閲忎笂闄愶紙60000涓級璇峰嬁婊ョ敤銆�
+        /// </summary>
+        [JsonProperty("check_path")]
+        public bool? CheckPath { get; set; }
+
+        /// <summary>
+        /// 瑕佹墦寮�鐨勫皬绋嬪簭鐗堟湰銆傛寮忕増涓� "release"锛屼綋楠岀増涓� "trial"锛屽紑鍙戠増涓� "develop"銆傞粯璁ゆ槸姝e紡鐗堛��
+        /// </summary>
+        [JsonProperty("env_version")]
+        public string EnvVersion { get; set; }
+
+        /// <summary>
+        /// 榛樿430锛屼簩缁寸爜鐨勫搴︼紝鍗曚綅 px锛屾渶灏� 280px锛屾渶澶� 1280px
+        /// </summary>
+        [JsonProperty("width")]
+        public int? Width { get; set; }
+
+        /// <summary>
+        /// 鑷姩閰嶇疆绾挎潯棰滆壊锛屽鏋滈鑹蹭緷鐒舵槸榛戣壊锛屽垯璇存槑涓嶅缓璁厤缃富鑹茶皟锛岄粯璁� false
+        /// </summary>
+        [JsonProperty("auto_color")]
+        public bool? AutoColor { get; set; }
+
+        /// <summary>
+        /// 榛樿鏄瘂"r":0,"g":0,"b":0} 銆俛uto_color 涓� false 鏃剁敓鏁堬紝浣跨敤 rgb 璁剧疆棰滆壊 渚嬪 {"r":"xxx","g":"xxx","b":"xxx"} 鍗佽繘鍒惰〃绀�
+        /// </summary>
+        [JsonProperty("line_color")]
+        public object LineColor { get; set; }
+
+        /// <summary>
+        /// 榛樿鏄痜alse锛屾槸鍚﹂渶瑕侀�忔槑搴曡壊锛屼负 true 鏃讹紝鐢熸垚閫忔槑搴曡壊鐨勫皬绋嬪簭
+        /// </summary>
+        [JsonProperty("is_hyaline")]
+        public bool? IsHyaline { get; set; }
+    }
+
+    /// <summary>
+    /// 灏忕▼搴忚幏鍙栦簩缁寸爜-缁撴灉
+    /// </summary>
+    public class WxmpGetQrCodeResponse
+    {
+        /// <summary>
+        /// 鍥剧墖 Buffer
+        /// </summary>
+        [JsonProperty("buffer")]
+        public byte[] Buffer { get; set; }
+        /// <summary>
+        /// 閿欒鐮�
+        /// </summary>
+        [JsonProperty("errcode")]
+        public int ErrorCode { get; set; }
+        /// <summary>
+        /// 閿欒淇℃伅
+        /// </summary>
+        [JsonProperty("errmsg")]
+        public string ErrorMessage { get; set; }
+
+    }
+}
diff --git a/FlexJobApi.Core/Utils/WxmpUtils/WxmpOptions.cs b/FlexJobApi.Core/Utils/WxmpUtils/WxmpOptions.cs
index 0e60ecf..113de43 100644
--- a/FlexJobApi.Core/Utils/WxmpUtils/WxmpOptions.cs
+++ b/FlexJobApi.Core/Utils/WxmpUtils/WxmpOptions.cs
@@ -36,5 +36,10 @@
         /// 灏忕▼搴忓瘑閽�
         /// </summary>
         public string AppSecret { get; set; }
+
+        /// <summary>
+        /// 鐗堟湰
+        /// </summary>
+        public string EnvVersion { get; set; }
     }
 }
diff --git a/FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionCallback.cs b/FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionResponse.cs
similarity index 88%
rename from FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionCallback.cs
rename to FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionResponse.cs
index 7080916..3358385 100644
--- a/FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionCallback.cs
+++ b/FlexJobApi.Core/Utils/WxmpUtils/WxmpSnsJscode2sessionResponse.cs
@@ -6,7 +6,7 @@
 
 namespace FlexJobApi.Core
 {
-    public class WxmpSnsJscode2sessionCallback
+    public class WxmpSnsJscode2sessionResponse
     {
         public string session_key { get; set; }
         public string unionid { get; set; }
diff --git a/FlexJobApi.Core/Utils/WxmpUtils/WxmpUtils.cs b/FlexJobApi.Core/Utils/WxmpUtils/WxmpUtils.cs
index 0a200da..3f89a7a 100644
--- a/FlexJobApi.Core/Utils/WxmpUtils/WxmpUtils.cs
+++ b/FlexJobApi.Core/Utils/WxmpUtils/WxmpUtils.cs
@@ -1,10 +1,19 @@
-锘縰sing Furion.FriendlyException;
+锘縰sing Aliyun.OSS;
+using Azure.Core;
+using FlexJobApi.Core.Utils.WxmpUtils;
+using Furion.FriendlyException;
 using Furion.HttpRemote;
+using Mapster;
+using Microsoft.Extensions.Caching.Distributed;
 using Microsoft.Extensions.Options;
+using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
+using System.Net.Http.Json;
 using System.Text;
+using System.Text.Json.Nodes;
 using System.Threading;
 using System.Threading.Tasks;
 
@@ -17,23 +26,26 @@
     {
         private readonly IOptions<WxmpOptions> options;
         private readonly IHttpRemoteService httpRemoteService;
+        private readonly IDistributedCache distributedCache;
 
         public WxmpUtils(
             IOptions<WxmpOptions> options,
-            IHttpRemoteService httpRemoteService)
+            IHttpRemoteService httpRemoteService,
+            IDistributedCache distributedCache)
         {
             this.options = options;
             this.httpRemoteService = httpRemoteService;
+            this.distributedCache = distributedCache;
         }
 
-        public async Task<WxmpSnsJscode2sessionCallback> SnsJscode2sessionAsync(EnumUserType userType, string code, CancellationToken cancellationToken = default)
+        public async Task<WxmpSnsJscode2sessionResponse> SnsJscode2sessionAsync(EnumUserType userType, string code, CancellationToken cancellationToken = default)
         {
             var option = options.Value.Items.FirstOrDefault(it => it.Code == userType.ToString());
             if (option == null || option.AppId.IsNull() || option.AppSecret.IsNull())
                 throw Oops.Oh(EnumErrorCodeType.s400, "鐧诲綍澶辫触锛岀己澶遍厤缃細WxmpOptions");
             if (code.IsNull())
                 throw Oops.Oh(EnumErrorCodeType.s400, "璇峰~鍐橶xmpCode");
-            var callback = await httpRemoteService.GetAsAsync<WxmpSnsJscode2sessionCallback>("https://api.weixin.qq.com/sns/jscode2session",
+            var callback = await httpRemoteService.GetAsAsync<WxmpSnsJscode2sessionResponse>("https://api.weixin.qq.com/sns/jscode2session",
                 builder => builder.WithQueryParameters(new Dictionary<string, string>
                 {
                     { "appid", option.AppId },
@@ -45,5 +57,72 @@
                 throw Oops.Oh(EnumErrorCodeType.s510, $"鐧诲綍澶辫触锛歿callback.errmsg}锛岃鑱旂郴绠$悊鍛�");
             return callback;
         }
+
+        /// <summary>
+        /// 鑾峰彇灏忕▼搴忔帴鍙h皟鐢ㄥ嚟鎹�
+        /// </summary>
+        /// <param name="userType"></param>
+        /// <returns></returns>
+        public async Task<string> GetAccessToken(EnumUserType userType)
+        {
+            var cacheKey = $"Wxmp|{userType}|AccessToken";
+            var accessToken = await distributedCache.GetStringAsync(cacheKey);
+            if (accessToken.IsNull())
+            {
+                var option = options.Value.Items.FirstOrDefault(it => it.Code == userType.ToString());
+                if (option == null || option.AppId.IsNull() || option.AppSecret.IsNull())
+                    throw Oops.Oh(EnumErrorCodeType.s400, "鑾峰彇灏忕▼搴忔帴鍙h皟鐢ㄥ嚟鎹け璐ワ紝缂哄け閰嶇疆锛歐xmpOptions");
+                var request = new WxmpGetAccessTokenRequest
+                {
+                    Appid = option.AppId,
+                    Secret = option.AppSecret,
+                };
+                var response = await httpRemoteService.GetAsStringAsync("https://api.weixin.qq.com/cgi-bin/token",
+                    builder => builder.WithQueryParameters(JsonObject.Parse(request.ToJson())));
+                var callback = response.JsonTo<WxmpGetAccessTokenResponse>();
+                if (callback == null && callback.AccessToken.IsNull())
+                    throw Oops.Oh(EnumErrorCodeType.s510, "鑾峰彇灏忕▼搴忔帴鍙h皟鐢ㄥ嚟鎹け璐�");
+                accessToken = callback.AccessToken;
+                await distributedCache.SetStringAsync(cacheKey, accessToken, new DistributedCacheEntryOptions
+                {
+                    AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(callback.ExpiresIn - 300)
+                });
+            }
+            return accessToken;
+        }
+
+        /// <summary>
+        /// 鑾峰彇灏忕▼搴忕爜
+        /// </summary>
+        /// <param name="command"></param>
+        /// <returns></returns>
+        public async Task<string> GetQrCodeOssUrl(WxmpGetQrCodeCommand command)
+        {
+            var option = options.Value.Items.FirstOrDefault(it => it.Code == command.UserType.ToString());
+            if (option == null || option.AppId.IsNull() || option.AppSecret.IsNull())
+                throw Oops.Oh(EnumErrorCodeType.s400, "鑾峰彇灏忕▼搴忕爜澶辫触锛岀己澶遍厤缃細WxmpOptions");
+            command.EnvVersion = option.EnvVersion;
+            var accessToken = await GetAccessToken(command.UserType);
+            var request = command.Adapt<WxmpGetQrCodeRequest>();
+            var jsonContent = JsonConvert.SerializeObject(request, new JsonSerializerSettings
+            {
+                NullValueHandling = NullValueHandling.Ignore
+            });
+            var response = await httpRemoteService.PostAsync("https://api.weixin.qq.com/wxa/getwxacodeunlimit",
+                builder => builder
+                .WithQueryParameter("access_token", accessToken)
+                .SetJsonContent(jsonContent));
+            response.EnsureSuccessStatusCode();
+            if (response.Content.Headers.ContentType.ToString() == "application/json; charset=UTF-8")
+            {
+                var jsonResult = await response.Content.ReadAsStringAsync();
+                var callback = jsonResult.JsonTo<WxmpGetQrCodeResponse>();
+                if (callback == null || callback.ErrorCode != 0)
+                    throw Oops.Oh(EnumErrorCodeType.s510, $"鑾峰彇灏忕▼搴忕爜澶辫触锛歿callback.ErrorMessage}锛岃鑱旂郴绠$悊鍛�");
+            }
+            var stream = await response.Content.ReadAsStreamAsync();
+            var result = AliyunOSSUtils.Upload(command.OssScene, stream, command.OssFileName);
+            return result.Url;
+        }
     }
 }
diff --git a/FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.Designer.cs b/FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.Designer.cs
new file mode 100644
index 0000000..181e73b
--- /dev/null
+++ b/FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.Designer.cs
@@ -0,0 +1,2799 @@
+锘�// <auto-generated />
+using System;
+using FlexJobApi.EntityFramework.Core;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace FlexJobApi.Database.Migrations.Migrations
+{
+    [DbContext(typeof(DefaultDbContext))]
+    [Migration("20250821063448_UpdateContractTemplate0821003")]
+    partial class UpdateContractTemplate0821003
+    {
+        /// <inheritdoc />
+        protected override void BuildTargetModel(ModelBuilder modelBuilder)
+        {
+#pragma warning disable 612, 618
+            modelBuilder
+                .HasAnnotation("ProductVersion", "9.0.7")
+                .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+            modelBuilder.Entity("FlexJobApi.Core.ContractTemplate", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("Access")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Code")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTime?>("CompletedTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("ElectronSignContractTemplateId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("EnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("File")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDisabled")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<int>("Status")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TemplateEditData")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TemplateId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TemplateJsonData")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("WxmpQrCode")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.ToTable("ContractTemplate");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.ContractTemplateValue", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Label")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Name")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Recorder")
+                        .HasColumnType("int");
+
+                    b.Property<bool>("Required")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("TemplateId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Type")
+                        .HasColumnType("int");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("UserType")
+                        .HasColumnType("int");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("TemplateId");
+
+                    b.ToTable("ContractTemplateValue");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Department", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("EnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDisabled")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("ParentId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Path")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Remark")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.HasIndex("ParentId");
+
+                    b.ToTable("Department");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.DictionaryCategory", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Code")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("FieldNames")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("Remark")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("DictionaryCategory");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.DictionaryData", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("CategoryId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Code")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("Content")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("Deep")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Field1")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Field2")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Field3")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Field4")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Field5")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDisabled")
+                        .HasColumnType("bit");
+
+                    b.Property<Guid?>("ParentId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Path")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("CategoryId");
+
+                    b.HasIndex("Code")
+                        .IsUnique();
+
+                    b.HasIndex("ParentId");
+
+                    b.ToTable("DictionaryData");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Enterprise", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Address")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("BankBranchName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("BankCard")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("BankName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("CityCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("ContactEmail")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ContactPhoneNumber")
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<string>("Contacts")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("EnterpriseName")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("EnterpriseType")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("EstablishmentDate")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("IndustrialParkId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("IndustryTypeCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<bool>("IsCheckedBankCard")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsReal")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("LegalIdentity")
+                        .HasMaxLength(18)
+                        .HasColumnType("nvarchar(18)");
+
+                    b.Property<string>("LegalPerson")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("LicenseImage")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("MainBusiness")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<decimal?>("MergeSignCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<int?>("PayAccess")
+                        .HasColumnType("int");
+
+                    b.Property<string>("ProvinceCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<int?>("RealAccess")
+                        .HasColumnType("int");
+
+                    b.Property<decimal?>("RealVerifyCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<string>("RegisteredCapital")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<decimal?>("SignCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<int?>("SmsAccess")
+                        .HasColumnType("int");
+
+                    b.Property<decimal>("SmsCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<string>("SocietyCreditCode")
+                        .IsRequired()
+                        .HasMaxLength(18)
+                        .HasColumnType("nvarchar(18)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("CityCode");
+
+                    b.HasIndex("IndustryTypeCode");
+
+                    b.HasIndex("ProvinceCode");
+
+                    b.ToTable("Enterprise");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseAuth", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("BankCard")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("BankCardImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("ElectronSignEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("EnterpriseName")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<int?>("EnterpriseRealMethod")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Identity")
+                        .HasMaxLength(18)
+                        .HasColumnType("nvarchar(18)");
+
+                    b.Property<string>("IdentityBackImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("IdentityImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("LegalIdentity")
+                        .HasMaxLength(18)
+                        .HasColumnType("nvarchar(18)");
+
+                    b.Property<string>("LegalPerson")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("LicenseImage")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Name")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<int?>("PersonalRealMethod")
+                        .HasColumnType("int");
+
+                    b.Property<string>("PhoneNumber")
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<bool?>("Proxy")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("ProxyPowerAttorneyUrl")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("SocietyCreditCode")
+                        .IsRequired()
+                        .HasMaxLength(18)
+                        .HasColumnType("nvarchar(18)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("EnterpriseAuth");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("Age")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("Birthday")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("ContactPhoneNumber")
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<string>("ContractUrl")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("EnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("EnterpriseSignContractStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("EnterpriseSignContractTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<int?>("Gender")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Identity")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("IdentityBackImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("IdentityImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Name")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("UserSignContractStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("UserSignContractTime")
+                        .HasColumnType("datetime2");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("EnterpriseEmployee");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseUserCollect", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTime?>("CollectedTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<DateTime?>("ContactedTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("EnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsCollected")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsContacted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("EnterpriseUserCollect");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Menu", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("ClientType")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Code")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Group")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Icon")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsCache")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDisabled")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Location")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<Guid?>("ParentId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Path")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Remark")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Type")
+                        .HasColumnType("int");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Url")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("UserType")
+                        .HasColumnType("int");
+
+                    b.Property<int>("VisitLevel")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Width")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("ParentId");
+
+                    b.ToTable("Menu");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Resource", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("ActionName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ActionSummary")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("AllowAnonymous")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("ApplicationName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Code")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ControllerName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ControllerSummary")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("DynamicAssemblyName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("FileUpload")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsExpired")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Method")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("RequestTypeFullName")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("RequestTypeName")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ResponseTypeFullName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ResponseTypeName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Route")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("RouteArea")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ServiceName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Resource");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Role", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("ClientType")
+                        .HasColumnType("int");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("DataPower")
+                        .HasColumnType("int");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDisabled")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("MinLevel")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("Remark")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("UserType")
+                        .HasColumnType("int");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("Role");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.RoleMenu", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<Guid>("MenuId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("RoleId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("MenuId");
+
+                    b.HasIndex("RoleId");
+
+                    b.ToTable("RoleMenu");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.RoleResource", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("DataPower")
+                        .HasColumnType("int");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<Guid>("ResourceId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("RoleId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("ResourceId");
+
+                    b.HasIndex("RoleId");
+
+                    b.ToTable("RoleResource");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.ScheduleJobDetail", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("AssemblyName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("Concurrent")
+                        .HasColumnType("bit");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Description")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("GroupName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IncludeAnnotations")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("JobId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("JobType")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Properties")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ScheduleJobDetail");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.ScheduleJobTrigger", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Args")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("AssemblyName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Description")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<long>("ElapsedTime")
+                        .HasColumnType("bigint");
+
+                    b.Property<DateTime?>("EndTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("JobId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTime?>("LastRunTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<long>("MaxNumberOfErrors")
+                        .HasColumnType("bigint");
+
+                    b.Property<long>("MaxNumberOfRuns")
+                        .HasColumnType("bigint");
+
+                    b.Property<DateTime?>("NextRunTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<long>("NumRetries")
+                        .HasColumnType("bigint");
+
+                    b.Property<long>("NumberOfErrors")
+                        .HasColumnType("bigint");
+
+                    b.Property<long>("NumberOfRuns")
+                        .HasColumnType("bigint");
+
+                    b.Property<bool>("ResetOnlyOnce")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Result")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("RetryTimeout")
+                        .HasColumnType("int");
+
+                    b.Property<bool>("RunOnStart")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<bool>("StartNow")
+                        .HasColumnType("bit");
+
+                    b.Property<DateTime?>("StartTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<long>("Status")
+                        .HasColumnType("bigint");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TriggerId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TriggerType")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("ScheduleJobTrigger");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfo", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("AddressDetail")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("AddressName")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("AgeMaxLimit")
+                        .HasColumnType("int");
+
+                    b.Property<int>("AgeMinLimit")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime>("BeginTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<int>("BillingMethod")
+                        .HasColumnType("int");
+
+                    b.Property<int?>("CheckReceiveStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("CheckReceiveTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("CityCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("Code")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTime>("EndTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<Guid>("EnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("GenderLimit")
+                        .HasColumnType("int");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<DateTime?>("LastCheckReceiveTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<DateTime?>("LastSubmitTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<decimal?>("Latitude")
+                        .HasColumnType("decimal(18,6)");
+
+                    b.Property<decimal?>("Longitude")
+                        .HasColumnType("decimal(18,6)");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("ProvinceCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<int>("RecommendStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("RecommendTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<int>("ReleaseStatus")
+                        .HasColumnType("int");
+
+                    b.Property<decimal>("ServiceFee")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<int>("SettlementCycle")
+                        .HasColumnType("int");
+
+                    b.Property<int?>("SettlementStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("SettlementTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<int>("Status")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("CityCode");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.HasIndex("ProvinceCode");
+
+                    b.ToTable("TaskInfo");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoBenefit", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("BenefitCode")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("TaskInfoId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("BenefitCode");
+
+                    b.HasIndex("TaskInfoId");
+
+                    b.ToTable("TaskInfoBenefit");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoCredentialLimit", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("TaskInfoId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TypeCode")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("TaskInfoId");
+
+                    b.HasIndex("TypeCode");
+
+                    b.ToTable("TaskInfoCredentialLimit");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUser", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("ArrangeStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("ArrangeTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<int?>("CheckReceiveStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("CheckReceiveTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("EnterpriseEmployeeId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("HireStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("HireTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<DateTime?>("LastCheckReceiveTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<DateTime?>("LastSubmitTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("TaskInfoId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseEmployeeId");
+
+                    b.HasIndex("TaskInfoId");
+
+                    b.ToTable("TaskInfoUser");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmit", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("CheckReceiveStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("CheckReceiveTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTime>("Date")
+                        .HasColumnType("datetime2");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("TaskInfoUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("TaskInfoUserId");
+
+                    b.ToTable("TaskInfoUserSubmit");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmitFile", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("File")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("SubmitId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("SubmitId");
+
+                    b.ToTable("TaskInfoUserSubmitFile");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskUserCollect", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("TaskInfoId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("TaskInfoId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("TaskUserCollect");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.User", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("Age")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Avatar")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTime?>("Birthday")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("CityCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("ContactPhoneNumber")
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("DataSource")
+                        .HasColumnType("int");
+
+                    b.Property<Guid?>("DataSourceId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("EducationalBackgroundCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<Guid?>("EnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("FreeTime")
+                        .HasColumnType("int");
+
+                    b.Property<int?>("Gender")
+                        .HasColumnType("int");
+
+                    b.Property<int?>("Height")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Identity")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsCheckPhoneNumber")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsReal")
+                        .HasColumnType("bit");
+
+                    b.Property<int?>("JobSeekingStatus")
+                        .HasColumnType("int");
+
+                    b.Property<int>("Level")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Name")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("Password")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("PersonalIdentityCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("PhoneNumber")
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<string>("ProvinceCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<int?>("RealMethod")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("RealTime")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("Remark")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<int>("Status")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Type")
+                        .HasColumnType("int");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("UserName")
+                        .IsRequired()
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<int?>("Weight")
+                        .HasColumnType("int");
+
+                    b.Property<string>("WorkExperience")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("WorkSeniority")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("WxmpOpenId")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("CityCode");
+
+                    b.HasIndex("EducationalBackgroundCode");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.HasIndex("PersonalIdentityCode");
+
+                    b.HasIndex("ProvinceCode");
+
+                    b.ToTable("User");
+
+                    b.HasData(
+                        new
+                        {
+                            Id = new Guid("11111111-1111-1111-1111-111111111111"),
+                            CreatedTime = new DateTimeOffset(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)),
+                            IsCheckPhoneNumber = false,
+                            IsDeleted = false,
+                            IsReal = false,
+                            Level = 999,
+                            Name = "绠$悊鍛�",
+                            Password = "iEYggKrMhQ3ASUGLobra1w==:fn/DsMJUbD9FGpvBvR3moMpMPptdxzZlourPVhU479I=",
+                            Sort = 0,
+                            Status = 10,
+                            Type = 100,
+                            UserName = "system"
+                        });
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserAuth", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("Age")
+                        .HasColumnType("int");
+
+                    b.Property<string>("BankCard")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("BankCardImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTime?>("Birthday")
+                        .HasColumnType("datetime2");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("ElectronSignUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("FaceRealUrl")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int?>("Gender")
+                        .HasColumnType("int");
+
+                    b.Property<string>("Identity")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("IdentityBackImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("IdentityImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Name")
+                        .IsRequired()
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<string>("PhoneNumber")
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<int?>("RealAccess")
+                        .HasColumnType("int");
+
+                    b.Property<string>("RealFailMessage")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("RealStatus")
+                        .HasColumnType("int");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.ToTable("UserAuth");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserBankCard", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Bank")
+                        .IsRequired()
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<string>("Code")
+                        .IsRequired()
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("PhoneNumber")
+                        .IsRequired()
+                        .HasMaxLength(11)
+                        .HasColumnType("nvarchar(11)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserBankCard");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserCredential", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("BackImg")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("Code")
+                        .HasMaxLength(128)
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTime?>("EndDate")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("Img")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsForever")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("IssueUnit")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("StartDate")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<string>("TypeCode")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("TypeCode");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserCredential");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserDepartment", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("DepartmentId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("DepartmentId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserDepartment");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserExpectJob", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("ExpectJobCode")
+                        .IsRequired()
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("ExpectJobCode");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserExpectJob");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserManageIndustrialPark", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("IndustrialParkId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserManageIndustrialPark");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserPhoto", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("Img")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserPhoto");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserRole", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid?>("CreatedEnterpriseId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<DateTimeOffset>("CreatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("CreatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<bool>("IsDeleted")
+                        .HasColumnType("bit");
+
+                    b.Property<Guid>("RoleId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("Sort")
+                        .HasColumnType("int");
+
+                    b.Property<string>("TraceId")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<DateTimeOffset?>("UpdatedTime")
+                        .HasColumnType("datetimeoffset");
+
+                    b.Property<Guid?>("UpdatedUserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<Guid>("UserId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("RoleId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("UserRole");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.ContractTemplate", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany("ContractTemplates")
+                        .HasForeignKey("EnterpriseId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Enterprise");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.ContractTemplateValue", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.ContractTemplate", "Template")
+                        .WithMany("Values")
+                        .HasForeignKey("TemplateId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Template");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Department", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany("Departments")
+                        .HasForeignKey("EnterpriseId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.Department", "Parent")
+                        .WithMany("Children")
+                        .HasForeignKey("ParentId");
+
+                    b.Navigation("Enterprise");
+
+                    b.Navigation("Parent");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.DictionaryData", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryCategory", "Category")
+                        .WithMany()
+                        .HasForeignKey("CategoryId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Parent")
+                        .WithMany("Children")
+                        .HasForeignKey("ParentId");
+
+                    b.Navigation("Category");
+
+                    b.Navigation("Parent");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Enterprise", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "City")
+                        .WithMany()
+                        .HasForeignKey("CityCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "IndustryType")
+                        .WithMany()
+                        .HasForeignKey("IndustryTypeCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Province")
+                        .WithMany()
+                        .HasForeignKey("ProvinceCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.Navigation("City");
+
+                    b.Navigation("IndustryType");
+
+                    b.Navigation("Province");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseAuth", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithOne("EnterpriseAuth")
+                        .HasForeignKey("FlexJobApi.Core.EnterpriseAuth", "Id")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Enterprise");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany()
+                        .HasForeignKey("EnterpriseId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("EnterpriseEmployees")
+                        .HasForeignKey("UserId");
+
+                    b.Navigation("Enterprise");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseUserCollect", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany()
+                        .HasForeignKey("EnterpriseId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("EnterpriseUserCollects")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Enterprise");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Menu", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Menu", "Parent")
+                        .WithMany("Children")
+                        .HasForeignKey("ParentId");
+
+                    b.Navigation("Parent");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.RoleMenu", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Menu", "Menu")
+                        .WithMany()
+                        .HasForeignKey("MenuId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.Role", "Role")
+                        .WithMany("RoleMenus")
+                        .HasForeignKey("RoleId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Menu");
+
+                    b.Navigation("Role");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.RoleResource", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Resource", "Resource")
+                        .WithMany()
+                        .HasForeignKey("ResourceId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.Role", "Role")
+                        .WithMany("RoleResources")
+                        .HasForeignKey("RoleId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Resource");
+
+                    b.Navigation("Role");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfo", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "City")
+                        .WithMany()
+                        .HasForeignKey("CityCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany()
+                        .HasForeignKey("EnterpriseId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Province")
+                        .WithMany()
+                        .HasForeignKey("ProvinceCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.Navigation("City");
+
+                    b.Navigation("Enterprise");
+
+                    b.Navigation("Province");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoBenefit", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Benefit")
+                        .WithMany()
+                        .HasForeignKey("BenefitCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.TaskInfo", "TaskInfo")
+                        .WithMany("Benefits")
+                        .HasForeignKey("TaskInfoId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Benefit");
+
+                    b.Navigation("TaskInfo");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoCredentialLimit", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.TaskInfo", "TaskInfo")
+                        .WithMany("CredentialLimits")
+                        .HasForeignKey("TaskInfoId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Type")
+                        .WithMany()
+                        .HasForeignKey("TypeCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict)
+                        .IsRequired();
+
+                    b.Navigation("TaskInfo");
+
+                    b.Navigation("Type");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUser", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.EnterpriseEmployee", "EnterpriseEmployee")
+                        .WithMany("TaskInfoUsers")
+                        .HasForeignKey("EnterpriseEmployeeId")
+                        .OnDelete(DeleteBehavior.Restrict)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.TaskInfo", "TaskInfo")
+                        .WithMany("TaskInfoUsers")
+                        .HasForeignKey("TaskInfoId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("EnterpriseEmployee");
+
+                    b.Navigation("TaskInfo");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmit", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.TaskInfoUser", "TaskInfoUser")
+                        .WithMany("Submits")
+                        .HasForeignKey("TaskInfoUserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("TaskInfoUser");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmitFile", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.TaskInfoUserSubmit", "Submit")
+                        .WithMany("Files")
+                        .HasForeignKey("SubmitId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Submit");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskUserCollect", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.TaskInfo", "TaskInfo")
+                        .WithMany("TaskUserCollects")
+                        .HasForeignKey("TaskInfoId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany()
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("TaskInfo");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.User", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "City")
+                        .WithMany()
+                        .HasForeignKey("CityCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "EducationalBackground")
+                        .WithMany()
+                        .HasForeignKey("EducationalBackgroundCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany("Users")
+                        .HasForeignKey("EnterpriseId");
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "PersonalIdentity")
+                        .WithMany()
+                        .HasForeignKey("PersonalIdentityCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Province")
+                        .WithMany()
+                        .HasForeignKey("ProvinceCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict);
+
+                    b.Navigation("City");
+
+                    b.Navigation("EducationalBackground");
+
+                    b.Navigation("Enterprise");
+
+                    b.Navigation("PersonalIdentity");
+
+                    b.Navigation("Province");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserAuth", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithOne("UserAuth")
+                        .HasForeignKey("FlexJobApi.Core.UserAuth", "Id")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserBankCard", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("BankCards")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserCredential", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "Type")
+                        .WithMany()
+                        .HasForeignKey("TypeCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("UserCredentials")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Type");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserDepartment", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Department", "Department")
+                        .WithMany()
+                        .HasForeignKey("DepartmentId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("UserDepartments")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Department");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserExpectJob", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.DictionaryData", "ExpectJob")
+                        .WithMany()
+                        .HasForeignKey("ExpectJobCode")
+                        .HasPrincipalKey("Code")
+                        .OnDelete(DeleteBehavior.Restrict)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("UserExpectJobs")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("ExpectJob");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserManageIndustrialPark", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("UserManageIndustrialParks")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserPhoto", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("Photos")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.UserRole", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Role", "Role")
+                        .WithMany("UserRoles")
+                        .HasForeignKey("RoleId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.HasOne("FlexJobApi.Core.User", "User")
+                        .WithMany("UserRoles")
+                        .HasForeignKey("UserId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Role");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.ContractTemplate", b =>
+                {
+                    b.Navigation("Values");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Department", b =>
+                {
+                    b.Navigation("Children");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.DictionaryData", b =>
+                {
+                    b.Navigation("Children");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Enterprise", b =>
+                {
+                    b.Navigation("ContractTemplates");
+
+                    b.Navigation("Departments");
+
+                    b.Navigation("EnterpriseAuth");
+
+                    b.Navigation("Users");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
+                {
+                    b.Navigation("TaskInfoUsers");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Menu", b =>
+                {
+                    b.Navigation("Children");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.Role", b =>
+                {
+                    b.Navigation("RoleMenus");
+
+                    b.Navigation("RoleResources");
+
+                    b.Navigation("UserRoles");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfo", b =>
+                {
+                    b.Navigation("Benefits");
+
+                    b.Navigation("CredentialLimits");
+
+                    b.Navigation("TaskInfoUsers");
+
+                    b.Navigation("TaskUserCollects");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUser", b =>
+                {
+                    b.Navigation("Submits");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.TaskInfoUserSubmit", b =>
+                {
+                    b.Navigation("Files");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.User", b =>
+                {
+                    b.Navigation("BankCards");
+
+                    b.Navigation("EnterpriseEmployees");
+
+                    b.Navigation("EnterpriseUserCollects");
+
+                    b.Navigation("Photos");
+
+                    b.Navigation("UserAuth");
+
+                    b.Navigation("UserCredentials");
+
+                    b.Navigation("UserDepartments");
+
+                    b.Navigation("UserExpectJobs");
+
+                    b.Navigation("UserManageIndustrialParks");
+
+                    b.Navigation("UserRoles");
+                });
+#pragma warning restore 612, 618
+        }
+    }
+}
diff --git a/FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.cs b/FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.cs
new file mode 100644
index 0000000..b012007
--- /dev/null
+++ b/FlexJobApi.Database.Migrations/Migrations/20250821063448_UpdateContractTemplate0821003.cs
@@ -0,0 +1,28 @@
+锘縰sing Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace FlexJobApi.Database.Migrations.Migrations
+{
+    /// <inheritdoc />
+    public partial class UpdateContractTemplate0821003 : Migration
+    {
+        /// <inheritdoc />
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<string>(
+                name: "WxmpQrCode",
+                table: "ContractTemplate",
+                type: "nvarchar(max)",
+                nullable: true);
+        }
+
+        /// <inheritdoc />
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropColumn(
+                name: "WxmpQrCode",
+                table: "ContractTemplate");
+        }
+    }
+}
diff --git a/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs b/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs
index a618b3c..a66e3e3 100644
--- a/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs
+++ b/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs
@@ -90,6 +90,9 @@
                     b.Property<Guid?>("UpdatedUserId")
                         .HasColumnType("uniqueidentifier");
 
+                    b.Property<string>("WxmpQrCode")
+                        .HasColumnType("nvarchar(max)");
+
                     b.HasKey("Id");
 
                     b.HasIndex("EnterpriseId");
diff --git a/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs b/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs
index 5e701ff..f507dc1 100644
--- a/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs
+++ b/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs
@@ -23,13 +23,15 @@
     /// 鍚堝悓妯℃澘鍛戒护澶勭悊鍣�
     /// </summary>
     public class ContractTemplateCommandHandler(
-            IRepository<ContractTemplate> rep
+            IRepository<ContractTemplate> rep,
+            WxmpUtils wxmpUtils
         ) :
         IRequestHandler<SaveContractTemplateCommand, Guid>,
         IRequestHandler<SaveContractTemplateValuesCommand, Guid>,
         IRequestHandler<SetIsDisabledContractTemplateCommand, int>
     {
         private readonly IRepository<ContractTemplate> rep = rep;
+        private readonly WxmpUtils wxmpUtils = wxmpUtils;
 
         /// <summary>
         /// 淇濆瓨鍚堝悓妯℃澘
@@ -46,11 +48,15 @@
             }
             if (request.EnterpriseId == null) throw Oops.Oh(EnumErrorCodeType.s400, "璇烽�夋嫨浼佷笟");
 
+            var existCode = await rep.AsQueryable().AsNoTracking()
+                .AnyAsync(it => it.Code == request.Code && !it.IsDisabled && it.Id != request.Id);
+            if (existCode) throw Oops.Oh(EnumErrorCodeType.s405, "涓氬姟缂栫爜");
+
             var entity = await request.SaveData<ContractTemplate, SaveContractTemplateCommand>(
                  q => q
                     .Include(it => it.Values)
                     .Where(it => it.EnterpriseId == request.EnterpriseId && !it.IsDisabled),
-                 it => it.EnterpriseId == request.EnterpriseId && it.Name == request.Name && !it.IsDisabled && it.Id != request.Id,
+                 null,
                  entity =>
                  {
                      request.Adapt(entity);
@@ -68,6 +74,19 @@
 
             await SyncElectronSignContractTemplate(entity);
 
+            if (request.Id == null)
+            {
+                entity.WxmpQrCode = await wxmpUtils.GetQrCodeOssUrl(new WxmpGetQrCodeCommand
+                {
+                    UserType = EnumUserType.Personal,
+                    OssScene = "Wxmp/QrCode/ContractTemplate",
+                    OssFileName = $"{entity.Name}.png",
+                    Page = "subpackages/mine/mineAgreementSignDetail/mineAgreementSignDetail",
+                    CheckPath = false,
+                    Scene = $"{entity.Code}",
+                });
+            }
+
             return entity.Id;
         }
 
diff --git a/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml b/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml
index bedc8a9..3bc789e 100644
--- a/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml
+++ b/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml
@@ -161,7 +161,7 @@
             鍚堝悓妯℃澘鍛戒护澶勭悊鍣�
             </summary>
         </member>
-        <member name="M:FlexJobApi.UserServer.Application.ContractTemplateCommandHandler.#ctor(Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.ContractTemplate})">
+        <member name="M:FlexJobApi.UserServer.Application.ContractTemplateCommandHandler.#ctor(Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.ContractTemplate},FlexJobApi.Core.WxmpUtils)">
             <summary>
             鍚堝悓妯℃澘鍛戒护澶勭悊鍣�
             </summary>
diff --git a/FlexJobApi.Web.Entry/appsettings.json b/FlexJobApi.Web.Entry/appsettings.json
index 2bec614..0c99bab 100644
--- a/FlexJobApi.Web.Entry/appsettings.json
+++ b/FlexJobApi.Web.Entry/appsettings.json
@@ -35,12 +35,15 @@
       {
         "Code": "Personal",
         "AppId": "wxb9e0baf4f87aa0de",
-        "AppSecret": "24abded2cd32b677b1f14ea9ec5767f0"
+        "AppSecret": "24abded2cd32b677b1f14ea9ec5767f0",
+        //姝e紡鐗堜负 "release"锛屼綋楠岀増涓� "trial"锛屽紑鍙戠増涓� "develop"
+        "EnvVersion": "develop"
       },
       {
         "Code": "Enterprise",
         "AppId": "wx3669dd12a0915f7d",
-        "AppSecret": "c03a62ad6822f1c925532c34183e7f7f"
+        "AppSecret": "c03a62ad6822f1c925532c34183e7f7f",
+        "EnvVersion": "develop"
       }
     ]
   },

--
Gitblit v1.9.1