From baed9bce4ccb41668f3740d77a7b664918e6403b Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 22 八月 2025 15:59:44 +0800
Subject: [PATCH] feat:开发

---
 FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs                             |    6 
 FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.Designer.cs             | 2991 ++++++++++++++++++++++++++++++++++++++++++++++++++
 FlexJobApi.UserServer.Application/ElectronSign/Queries/ContractTemplateQueryHandler.cs                        |   19 
 FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs               |   28 
 FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/InviteEnterpriseEmployeeElectronSignCommand.cs |   26 
 FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs                     |    2 
 FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs           |   42 
 FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplateValue.cs                                    |    5 
 FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployee.cs                                         |   10 
 FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployeeContract.cs                                 |    6 
 FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplateSelectQuery.cs           |   39 
 FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Queries/GetEnterpriseEmployeeElectronSignQuery.cs       |    2 
 FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs                           |    5 
 FlexJobApi.Core/FlexJobApi.Core.xml                                                                           |   72 +
 FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml                                       |   26 
 FlexJobApi.Core/Models/UserServer/ElectronSigns/Commands/SaveContractTemplateValuesCommand.cs                 |    5 
 FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.cs                      |  110 +
 FlexJobApi.Database.Migrations/REDEME.MD                                                                      |    2 
 FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs                                    |   91 +
 19 files changed, 3,473 insertions(+), 14 deletions(-)

diff --git a/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplateValue.cs b/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplateValue.cs
index 2223615..bb76c2b 100644
--- a/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplateValue.cs
+++ b/FlexJobApi.Core/Entities/UserServer/ElectronSigns/ContractTemplateValue.cs
@@ -48,6 +48,11 @@
         public string Name { get; set; }
 
         /// <summary>
+        /// 缁戝畾瀛楁
+        /// </summary>
+        public string BindProperty { get; set; }
+
+        /// <summary>
         /// 鏄惁蹇呭~
         /// </summary>
         public bool Required { get; set; }
diff --git a/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployee.cs b/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployee.cs
index 223618f..8b71619 100644
--- a/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployee.cs
+++ b/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployee.cs
@@ -82,6 +82,16 @@
         public string IdentityBackImg { get; set; }
 
         /// <summary>
+        /// 鍚堝悓妯℃澘Id
+        /// </summary>
+        public Guid? ContractTemplateId { get; set; }
+
+        /// <summary>
+        /// 鍚堝悓妯℃澘
+        /// </summary>
+        public ContractTemplate ContractTemplate { get; set; }
+
+        /// <summary>
         /// 鐏靛伐绛剧害鐘舵��
         /// </summary>
         public EnumTaskUserSignContractStatus? UserSignContractStatus { get; set; }
diff --git a/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployeeContract.cs b/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployeeContract.cs
index dfd7b1d..9cc5aa2 100644
--- a/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployeeContract.cs
+++ b/FlexJobApi.Core/Entities/UserServer/Enterprises/EnterpriseEmployeeContract.cs
@@ -22,6 +22,11 @@
         public EnterpriseEmployee EnterpriseEmployee { get; set; }
 
         /// <summary>
+        /// 鍚堝悓妯℃澘Id
+        /// </summary>
+        public Guid? ContractTemplateId { get; set; }
+
+        /// <summary>
         /// 鐏靛伐绛剧害鐘舵��
         /// </summary>
         public EnumTaskUserSignContractStatus? UserSignContractStatus { get; set; }
@@ -50,6 +55,5 @@
         /// 鐢靛瓙鍚堝悓
         /// </summary>
         public string ContractUrl { get; set; }
-
     }
 }
diff --git a/FlexJobApi.Core/FlexJobApi.Core.xml b/FlexJobApi.Core/FlexJobApi.Core.xml
index ceb9ca6..bf32f3b 100644
--- a/FlexJobApi.Core/FlexJobApi.Core.xml
+++ b/FlexJobApi.Core/FlexJobApi.Core.xml
@@ -1274,6 +1274,11 @@
             鍙橀噺浠g爜
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.ContractTemplateValue.BindProperty">
+            <summary>
+            缁戝畾瀛楁
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.ContractTemplateValue.Required">
             <summary>
             鏄惁蹇呭~
@@ -1720,6 +1725,16 @@
             韬唤璇佸浗寰介潰
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.EnterpriseEmployee.ContractTemplateId">
+            <summary>
+            鍚堝悓妯℃澘Id
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.EnterpriseEmployee.ContractTemplate">
+            <summary>
+            鍚堝悓妯℃澘
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.EnterpriseEmployee.UserSignContractStatus">
             <summary>
             鐏靛伐绛剧害鐘舵��
@@ -1773,6 +1788,11 @@
         <member name="P:FlexJobApi.Core.EnterpriseEmployeeContract.EnterpriseEmployee">
             <summary>
             鐏靛伐
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.EnterpriseEmployeeContract.ContractTemplateId">
+            <summary>
+            鍚堝悓妯℃澘Id
             </summary>
         </member>
         <member name="P:FlexJobApi.Core.EnterpriseEmployeeContract.UserSignContractStatus">
@@ -7527,6 +7547,11 @@
             鍙橀噺浠g爜
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.SaveContractTemplateValuesCommandItem.BindProperty">
+            <summary>
+            缁戝畾瀛楁
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.SaveContractTemplateValuesCommandItem.Required">
             <summary>
             鏄惁蹇呭~
@@ -7763,6 +7788,11 @@
             鍙橀噺浠g爜
             </summary>
         </member>
+        <member name="P:FlexJobApi.Core.GetContractTemplateQueryResultValue.BindProperty">
+            <summary>
+            缁戝畾瀛楁
+            </summary>
+        </member>
         <member name="P:FlexJobApi.Core.GetContractTemplateQueryResultValue.Required">
             <summary>
             鏄惁蹇呭~
@@ -7861,6 +7891,31 @@
         <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplateLogsQueryResultItem.Content">
             <summary>
             鎿嶄綔鍐呭
+            </summary>
+        </member>
+        <member name="T:FlexJobApi.Core.GetEnterpriseContractTemplateSelectQuery">
+            <summary>
+            鏌ヨ浼佷笟鍚堝悓妯℃澘閫夋嫨鍣ㄦ暟鎹�
+            </summary>
+        </member>
+        <member name="T:FlexJobApi.Core.GetEnterpriseContractTemplateSelectQueryOption">
+            <summary>
+            鏌ヨ浼佷笟鍚堝悓妯℃澘閫夋嫨鍣ㄦ暟鎹�-缁撴灉-閫夐」
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplateSelectQueryOption.Id">
+            <summary>
+            Id
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplateSelectQueryOption.Name">
+            <summary>
+            妯℃澘鍚嶇О
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.GetEnterpriseContractTemplateSelectQueryOption.TemplateId">
+            <summary>
+            妯℃澘Id
             </summary>
         </member>
         <member name="T:FlexJobApi.Core.GetEnterpriseContractTemplatesQuery">
@@ -8189,6 +8244,21 @@
             閿欒淇℃伅
             </summary>
         </member>
+        <member name="T:FlexJobApi.Core.InviteEnterpriseEmployeeElectronSignCommand">
+            <summary>
+            閭�璇风伒宸ョ绾�
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.InviteEnterpriseEmployeeElectronSignCommand.Id">
+            <summary>
+            鐏靛伐Id
+            </summary>
+        </member>
+        <member name="P:FlexJobApi.Core.InviteEnterpriseEmployeeElectronSignCommand.ContractTemplateId">
+            <summary>
+            鍚堝悓妯℃澘Id
+            </summary>
+        </member>
         <member name="T:FlexJobApi.Core.GetEnterpriseEmployeeElectronSignQuery">
             <summary>
             鏌ヨ涓汉鐢ㄦ埛绛剧害璇︽儏
@@ -8201,7 +8271,7 @@
         </member>
         <member name="P:FlexJobApi.Core.GetEnterpriseEmployeeElectronSignQuery.Code">
             <summary>
-            
+            鍚堝悓妯℃澘涓氬姟缂栫爜
             </summary>
         </member>
         <member name="T:FlexJobApi.Core.GetEnterpriseEmployeeElectronSignQueryResult">
diff --git a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Commands/SaveContractTemplateValuesCommand.cs b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Commands/SaveContractTemplateValuesCommand.cs
index 6a1a625..5f9910a 100644
--- a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Commands/SaveContractTemplateValuesCommand.cs
+++ b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Commands/SaveContractTemplateValuesCommand.cs
@@ -77,6 +77,11 @@
         public string Name { get; set; }
 
         /// <summary>
+        /// 缁戝畾瀛楁
+        /// </summary>
+        public string BindProperty { get; set; }
+
+        /// <summary>
         /// 鏄惁蹇呭~
         /// </summary>
         public bool Required { get; set; }
diff --git a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs
index c8c8344..21bee1d 100644
--- a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs
+++ b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetContractTemplateQuery.cs
@@ -132,6 +132,11 @@
         public string Name { get; set; }
 
         /// <summary>
+        /// 缁戝畾瀛楁
+        /// </summary>
+        public string BindProperty { get; set; }
+
+        /// <summary>
         /// 鏄惁蹇呭~
         /// </summary>
         public bool Required { get; set; }
diff --git a/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplateSelectQuery.cs b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplateSelectQuery.cs
new file mode 100644
index 0000000..a586aa3
--- /dev/null
+++ b/FlexJobApi.Core/Models/UserServer/ElectronSigns/Queries/GetEnterpriseContractTemplateSelectQuery.cs
@@ -0,0 +1,39 @@
+锘縰sing MediatR;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FlexJobApi.Core
+{
+    /// <summary>
+    /// 鏌ヨ浼佷笟鍚堝悓妯℃澘閫夋嫨鍣ㄦ暟鎹�
+    /// </summary>
+    [Resource([EnumResourceController.UserServerElectronSign])]
+    public class GetEnterpriseContractTemplateSelectQuery : SelectQuery<Guid, GetEnterpriseContractTemplateSelectQueryOption>
+    {
+    }
+
+    /// <summary>
+    /// 鏌ヨ浼佷笟鍚堝悓妯℃澘閫夋嫨鍣ㄦ暟鎹�-缁撴灉-閫夐」
+    /// </summary>
+    public class GetEnterpriseContractTemplateSelectQueryOption
+    {
+        /// <summary>
+        /// Id
+        /// </summary>
+        public Guid Id { get; set; }
+
+        /// <summary>
+        /// 妯℃澘鍚嶇О
+        /// </summary>
+        public string Name { get; set; }
+
+        /// <summary>
+        /// 妯℃澘Id
+        /// </summary>
+        public string TemplateId { get; set; }
+
+    }
+}
diff --git a/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/InviteEnterpriseEmployeeElectronSignCommand.cs b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/InviteEnterpriseEmployeeElectronSignCommand.cs
new file mode 100644
index 0000000..d7dfc3b
--- /dev/null
+++ b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Commands/InviteEnterpriseEmployeeElectronSignCommand.cs
@@ -0,0 +1,26 @@
+锘縰sing MediatR;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace FlexJobApi.Core
+{
+    /// <summary>
+    /// 閭�璇风伒宸ョ绾�
+    /// </summary>
+    [Resource([EnumResourceController.UserServerEnterpriseEmployee])]
+    public class InviteEnterpriseEmployeeElectronSignCommand : IRequest<Guid>
+    {
+        /// <summary>
+        /// 鐏靛伐Id
+        /// </summary>
+        public Guid Id { get; set; }
+
+        /// <summary>
+        /// 鍚堝悓妯℃澘Id
+        /// </summary>
+        public Guid ContractTemplateId { get; set; }
+    }
+}
diff --git a/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Queries/GetEnterpriseEmployeeElectronSignQuery.cs b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Queries/GetEnterpriseEmployeeElectronSignQuery.cs
index 79db336..fc68a3f 100644
--- a/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Queries/GetEnterpriseEmployeeElectronSignQuery.cs
+++ b/FlexJobApi.Core/Models/UserServer/EnterpriseEmployees/Queries/GetEnterpriseEmployeeElectronSignQuery.cs
@@ -22,7 +22,7 @@
         public Guid? Id { get; set; }
 
         /// <summary>
-        /// 
+        /// 鍚堝悓妯℃澘涓氬姟缂栫爜
         /// </summary>
         public string Code { get; set; }
     }
diff --git a/FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.Designer.cs b/FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.Designer.cs
new file mode 100644
index 0000000..5bdf641
--- /dev/null
+++ b/FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.Designer.cs
@@ -0,0 +1,2991 @@
+锘�// <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("20250822075930_UpdateEnterpriseEmployee0822")]
+    partial class UpdateEnterpriseEmployee0822
+    {
+        /// <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")
+                        .HasMaxLength(32)
+                        .HasColumnType("nvarchar(32)");
+
+                    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<string>("BindProperty")
+                        .HasColumnType("nvarchar(max)");
+
+                    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.ElectronSignSetting", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int>("Access")
+                        .HasColumnType("int");
+
+                    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<bool>("IsDisabled")
+                        .HasColumnType("bit");
+
+                    b.Property<decimal?>("MergeSignCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<decimal?>("RealVerifyCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    b.Property<decimal?>("SignCost")
+                        .HasColumnType("decimal(18,2)");
+
+                    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("ElectronSignSetting");
+                });
+
+            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<int?>("PayAccess")
+                        .HasColumnType("int");
+
+                    b.Property<string>("ProvinceCode")
+                        .HasColumnType("nvarchar(128)");
+
+                    b.Property<int?>("RealAccess")
+                        .HasColumnType("int");
+
+                    b.Property<string>("RegisteredCapital")
+                        .HasColumnType("nvarchar(max)");
+
+                    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<string>("CertAccount")
+                        .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.EnterpriseElectronSignSetting", 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>("ElectronSignAccess")
+                        .HasColumnType("int");
+
+                    b.Property<Guid>("EnterpriseId")
+                        .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.HasKey("Id");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.ToTable("EnterpriseElectronSignSetting");
+                });
+
+            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>("ContractCode")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("ContractTemplateId")
+                        .HasColumnType("uniqueidentifier");
+
+                    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("ContractTemplateId");
+
+                    b.HasIndex("EnterpriseId");
+
+                    b.HasIndex("UserId");
+
+                    b.ToTable("EnterpriseEmployee");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployeeContract", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("ContractCode")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("ContractTemplateId")
+                        .HasColumnType("uniqueidentifier");
+
+                    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>("EnterpriseEmployeeId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("EnterpriseSignContractStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("EnterpriseSignContractTime")
+                        .HasColumnType("datetime2");
+
+                    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<int?>("UserSignContractStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("UserSignContractTime")
+                        .HasColumnType("datetime2");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseEmployeeId");
+
+                    b.ToTable("EnterpriseEmployeeContract");
+                });
+
+            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.EnterpriseElectronSignSetting", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
+                        .WithMany("ElectronSignSettings")
+                        .HasForeignKey("EnterpriseId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("Enterprise");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.ContractTemplate", "ContractTemplate")
+                        .WithMany()
+                        .HasForeignKey("ContractTemplateId");
+
+                    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("ContractTemplate");
+
+                    b.Navigation("Enterprise");
+
+                    b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployeeContract", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.EnterpriseEmployee", "EnterpriseEmployee")
+                        .WithMany("Contracts")
+                        .HasForeignKey("EnterpriseEmployeeId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("EnterpriseEmployee");
+                });
+
+            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("ElectronSignSettings");
+
+                    b.Navigation("EnterpriseAuth");
+
+                    b.Navigation("Users");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
+                {
+                    b.Navigation("Contracts");
+
+                    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/20250822075930_UpdateEnterpriseEmployee0822.cs b/FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.cs
new file mode 100644
index 0000000..7d79f95
--- /dev/null
+++ b/FlexJobApi.Database.Migrations/Migrations/20250822075930_UpdateEnterpriseEmployee0822.cs
@@ -0,0 +1,110 @@
+锘縰sing System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace FlexJobApi.Database.Migrations.Migrations
+{
+    /// <inheritdoc />
+    public partial class UpdateEnterpriseEmployee0822 : Migration
+    {
+        /// <inheritdoc />
+        protected override void Up(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.AddColumn<string>(
+                name: "ContractCode",
+                table: "EnterpriseEmployee",
+                type: "nvarchar(max)",
+                nullable: true);
+
+            migrationBuilder.AddColumn<Guid>(
+                name: "ContractTemplateId",
+                table: "EnterpriseEmployee",
+                type: "uniqueidentifier",
+                nullable: true);
+
+            migrationBuilder.AddColumn<string>(
+                name: "BindProperty",
+                table: "ContractTemplateValue",
+                type: "nvarchar(max)",
+                nullable: true);
+
+            migrationBuilder.CreateTable(
+                name: "EnterpriseEmployeeContract",
+                columns: table => new
+                {
+                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    EnterpriseEmployeeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    ContractTemplateId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
+                    UserSignContractStatus = table.Column<int>(type: "int", nullable: true),
+                    UserSignContractTime = table.Column<DateTime>(type: "datetime2", nullable: true),
+                    EnterpriseSignContractStatus = table.Column<int>(type: "int", nullable: true),
+                    EnterpriseSignContractTime = table.Column<DateTime>(type: "datetime2", nullable: true),
+                    ContractCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    ContractUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    Sort = table.Column<int>(type: "int", nullable: false),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
+                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
+                    CreatedUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
+                    CreatedEnterpriseId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
+                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
+                    UpdatedUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_EnterpriseEmployeeContract", x => x.Id);
+                    table.ForeignKey(
+                        name: "FK_EnterpriseEmployeeContract_EnterpriseEmployee_EnterpriseEmployeeId",
+                        column: x => x.EnterpriseEmployeeId,
+                        principalTable: "EnterpriseEmployee",
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
+                });
+
+            migrationBuilder.CreateIndex(
+                name: "IX_EnterpriseEmployee_ContractTemplateId",
+                table: "EnterpriseEmployee",
+                column: "ContractTemplateId");
+
+            migrationBuilder.CreateIndex(
+                name: "IX_EnterpriseEmployeeContract_EnterpriseEmployeeId",
+                table: "EnterpriseEmployeeContract",
+                column: "EnterpriseEmployeeId");
+
+            migrationBuilder.AddForeignKey(
+                name: "FK_EnterpriseEmployee_ContractTemplate_ContractTemplateId",
+                table: "EnterpriseEmployee",
+                column: "ContractTemplateId",
+                principalTable: "ContractTemplate",
+                principalColumn: "Id");
+        }
+
+        /// <inheritdoc />
+        protected override void Down(MigrationBuilder migrationBuilder)
+        {
+            migrationBuilder.DropForeignKey(
+                name: "FK_EnterpriseEmployee_ContractTemplate_ContractTemplateId",
+                table: "EnterpriseEmployee");
+
+            migrationBuilder.DropTable(
+                name: "EnterpriseEmployeeContract");
+
+            migrationBuilder.DropIndex(
+                name: "IX_EnterpriseEmployee_ContractTemplateId",
+                table: "EnterpriseEmployee");
+
+            migrationBuilder.DropColumn(
+                name: "ContractCode",
+                table: "EnterpriseEmployee");
+
+            migrationBuilder.DropColumn(
+                name: "ContractTemplateId",
+                table: "EnterpriseEmployee");
+
+            migrationBuilder.DropColumn(
+                name: "BindProperty",
+                table: "ContractTemplateValue");
+        }
+    }
+}
diff --git a/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs b/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs
index 0d88fcf..eda1f43 100644
--- a/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs
+++ b/FlexJobApi.Database.Migrations/Migrations/DefaultDbContextModelSnapshot.cs
@@ -107,6 +107,9 @@
                         .ValueGeneratedOnAdd()
                         .HasColumnType("uniqueidentifier");
 
+                    b.Property<string>("BindProperty")
+                        .HasColumnType("nvarchar(max)");
+
                     b.Property<Guid?>("CreatedEnterpriseId")
                         .HasColumnType("uniqueidentifier");
 
@@ -685,6 +688,12 @@
                         .HasMaxLength(11)
                         .HasColumnType("nvarchar(11)");
 
+                    b.Property<string>("ContractCode")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("ContractTemplateId")
+                        .HasColumnType("uniqueidentifier");
+
                     b.Property<string>("ContractUrl")
                         .HasColumnType("nvarchar(max)");
 
@@ -748,11 +757,74 @@
 
                     b.HasKey("Id");
 
+                    b.HasIndex("ContractTemplateId");
+
                     b.HasIndex("EnterpriseId");
 
                     b.HasIndex("UserId");
 
                     b.ToTable("EnterpriseEmployee");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployeeContract", b =>
+                {
+                    b.Property<Guid>("Id")
+                        .ValueGeneratedOnAdd()
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<string>("ContractCode")
+                        .HasColumnType("nvarchar(max)");
+
+                    b.Property<Guid?>("ContractTemplateId")
+                        .HasColumnType("uniqueidentifier");
+
+                    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>("EnterpriseEmployeeId")
+                        .HasColumnType("uniqueidentifier");
+
+                    b.Property<int?>("EnterpriseSignContractStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("EnterpriseSignContractTime")
+                        .HasColumnType("datetime2");
+
+                    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<int?>("UserSignContractStatus")
+                        .HasColumnType("int");
+
+                    b.Property<DateTime?>("UserSignContractTime")
+                        .HasColumnType("datetime2");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("EnterpriseEmployeeId");
+
+                    b.ToTable("EnterpriseEmployeeContract");
                 });
 
             modelBuilder.Entity("FlexJobApi.Core.EnterpriseUserCollect", b =>
@@ -2430,6 +2502,10 @@
 
             modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
                 {
+                    b.HasOne("FlexJobApi.Core.ContractTemplate", "ContractTemplate")
+                        .WithMany()
+                        .HasForeignKey("ContractTemplateId");
+
                     b.HasOne("FlexJobApi.Core.Enterprise", "Enterprise")
                         .WithMany()
                         .HasForeignKey("EnterpriseId")
@@ -2440,9 +2516,22 @@
                         .WithMany("EnterpriseEmployees")
                         .HasForeignKey("UserId");
 
+                    b.Navigation("ContractTemplate");
+
                     b.Navigation("Enterprise");
 
                     b.Navigation("User");
+                });
+
+            modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployeeContract", b =>
+                {
+                    b.HasOne("FlexJobApi.Core.EnterpriseEmployee", "EnterpriseEmployee")
+                        .WithMany("Contracts")
+                        .HasForeignKey("EnterpriseEmployeeId")
+                        .OnDelete(DeleteBehavior.Cascade)
+                        .IsRequired();
+
+                    b.Navigation("EnterpriseEmployee");
                 });
 
             modelBuilder.Entity("FlexJobApi.Core.EnterpriseUserCollect", b =>
@@ -2831,6 +2920,8 @@
 
             modelBuilder.Entity("FlexJobApi.Core.EnterpriseEmployee", b =>
                 {
+                    b.Navigation("Contracts");
+
                     b.Navigation("TaskInfoUsers");
                 });
 
diff --git a/FlexJobApi.Database.Migrations/REDEME.MD b/FlexJobApi.Database.Migrations/REDEME.MD
index 19ff172..4f17d90 100644
--- a/FlexJobApi.Database.Migrations/REDEME.MD
+++ b/FlexJobApi.Database.Migrations/REDEME.MD
@@ -1,7 +1,7 @@
 -------------------------------主数据库---------------------------------------
 
 新增迁移文件
-dotnet ef migrations add UpdateElectronSignSetting -s "../FlexJobApi.Web.Entry" -c DefaultDbContext
+dotnet ef migrations add UpdateEnterpriseEmployee0822 -s "../FlexJobApi.Web.Entry" -c DefaultDbContext
 
 删除迁移文件
 dotnet ef migrations remove -s "../FlexJobApi.Web.Entry" -c DefaultDbContext
diff --git a/FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs b/FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs
index c9241db..cb49ad8 100644
--- a/FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs
+++ b/FlexJobApi.FlexJobServer.Application/TaskUsers/Commands/TaskUserCommandHandler.cs
@@ -101,11 +101,6 @@
             entity.HireStatus = request.HireStatus;
             if (entity.HireStatus == EnumTaskUserHireStatus.Pass)
             {
-                entity.EnterpriseEmployee.UserSignContractStatus = EnumTaskUserSignContractStatus.Pass;
-                entity.EnterpriseEmployee.UserSignContractTime = DateTime.Now;
-                entity.EnterpriseEmployee.EnterpriseSignContractStatus = EnumTaskUserSignContractStatus.Pass;
-                entity.EnterpriseEmployee.EnterpriseSignContractTime = DateTime.Now;
-
                 entity.HireTime = DateTime.Now;
                 entity.ArrangeStatus = EnumTaskUserArrangeStatus.Wait;
             }
@@ -130,6 +125,7 @@
                     && it.Id == request.Id)
                 .FirstOrDefaultAsync(cancellationToken);
             if (entity == null) throw Oops.Oh(EnumErrorCodeType.s404, "鎶ュ悕淇℃伅");
+            if (entity.EnterpriseEmployee.EnterpriseSignContractStatus != EnumTaskUserSignContractStatus.Effect) throw Oops.Oh(EnumErrorCodeType.s510, "鐏靛伐鏈绾�");
             if (entity.ArrangeStatus == EnumTaskUserArrangeStatus.Complete) throw Oops.Oh(EnumErrorCodeType.s510, "鐏靛伐宸插畨鎺�");
             entity.ArrangeStatus = request.ArrangeStatus;
             if (entity.ArrangeStatus == EnumTaskUserArrangeStatus.Complete)
diff --git a/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs b/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs
index 8753ea0..1545b63 100644
--- a/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs
+++ b/FlexJobApi.UserServer.Application/ElectronSign/Commands/ContractTemplateCommandHandler.cs
@@ -143,10 +143,12 @@
                || entity.Values.Any(ov =>
                        request.Values.Count(nv =>
                            ov.Id == nv.Id
+                           && ov.Name == nv.Name
                            && ov.Type == nv.Type
                            && ov.Recorder == nv.Recorder
                            && ov.UserType == nv.UserType
                            && ov.Label == nv.Label
+                           && ov.BindProperty == nv.BindProperty
                            && ov.Required == nv.Required) != 1))
             {
                 entity.Values = request.Values.Select(it =>
diff --git a/FlexJobApi.UserServer.Application/ElectronSign/Queries/ContractTemplateQueryHandler.cs b/FlexJobApi.UserServer.Application/ElectronSign/Queries/ContractTemplateQueryHandler.cs
index d73462b..71f3e00 100644
--- a/FlexJobApi.UserServer.Application/ElectronSign/Queries/ContractTemplateQueryHandler.cs
+++ b/FlexJobApi.UserServer.Application/ElectronSign/Queries/ContractTemplateQueryHandler.cs
@@ -26,7 +26,8 @@
         IRequestHandler<GetContractTemplateEnterprisesQuery, GetContractTemplateEnterprisesQueryResult>,
         IRequestHandler<GetEnterpriseContractTemplatesQuery, GetEnterpriseContractTemplatesQueryResult>,
         IRequestHandler<GetEnterpriseContractTemplateLogsQuery, GetEnterpriseContractTemplateLogsQueryResult>,
-        IRequestHandler<GetContractTemplateQuery, GetContractTemplateQueryResult>
+        IRequestHandler<GetContractTemplateQuery, GetContractTemplateQueryResult>,
+        IRequestHandler<GetEnterpriseContractTemplateSelectQuery, List<SelectOption<Guid, GetEnterpriseContractTemplateSelectQueryOption>>>
     {
         private readonly IRepository<ContractTemplate> rep = rep;
         private readonly IRepository<Enterprise> repEnterprise = repEnterprise;
@@ -214,6 +215,22 @@
             return model;
         }
 
+        /// <summary>
+        /// 鏌ヨ浼佷笟鍚堝悓妯℃澘閫夋嫨鍣ㄦ暟鎹�
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="cancellationToken"></param>
+        /// <returns></returns>
+        public Task<List<SelectOption<Guid, GetEnterpriseContractTemplateSelectQueryOption>>> Handle(GetEnterpriseContractTemplateSelectQuery request, CancellationToken cancellationToken)
+        {
+            var logier = JwtUtils.GetCurrentLogier();
+            return request.GetSelect<ContractTemplate, Guid, GetEnterpriseContractTemplateSelectQueryOption>(
+                it => it.Id,
+                it => it.Name,
+                q => q.Where(it => it.EnterpriseId == logier.EnterpriseId && !it.IsDisabled),
+                cancellationToken);
+        }
+
         private async Task AddContractTemplateLogsAsync(
             GetEnterpriseContractTemplateLogsQueryResultItem item,
             List<PropertyInfo> properties,
diff --git a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs
index 71bf62f..564a73d 100644
--- a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs
+++ b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Commands/EnterpriseEmployeesCommandHandler.cs
@@ -2,6 +2,7 @@
 using Furion;
 using Furion.DatabaseAccessor;
 using Furion.DataValidation;
+using Furion.DistributedIDGenerator;
 using Furion.FriendlyException;
 using Furion.HttpRemote;
 using Mapster;
@@ -25,13 +26,16 @@
     /// </summary>
     public class EnterpriseEmployeesCommandHandler(
             IRepository<EnterpriseEmployee> rep,
-            IRepository<User> repUser
+            IRepository<User> repUser,
+            IRepository<EnterpriseEmployeeContract> repEnterpriseEmployeeContract
         ) :
         IRequestHandler<ImportEnterpriseEmployeesCommand, ImportEnterpriseEmployeesCommandResult>,
-        IRequestHandler<EditEnterpriseEmployeeCommand, Guid>
+        IRequestHandler<EditEnterpriseEmployeeCommand, Guid>,
+        IRequestHandler<InviteEnterpriseEmployeeElectronSignCommand, Guid>
     {
         private readonly IRepository<EnterpriseEmployee> rep = rep;
         private readonly IRepository<User> repUser = repUser;
+        private readonly IRepository<EnterpriseEmployeeContract> repEnterpriseEmployeeContract = repEnterpriseEmployeeContract;
 
         /// <summary>
         /// 瀵煎叆鐏靛伐淇℃伅
@@ -189,5 +193,39 @@
                 cancellationToken);
             return entity.Id;
         }
+
+        /// <summary>
+        /// 閭�璇风伒宸ョ绾�
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="cancellationToken"></param>
+        /// <returns></returns>
+        public async Task<Guid> Handle(InviteEnterpriseEmployeeElectronSignCommand request, CancellationToken cancellationToken)
+        {
+            var logier = JwtUtils.GetCurrentLogier();
+            var entity = await rep.AsQueryable()
+                .Where(it => it.EnterpriseId == logier.EnterpriseId && it.Id == request.Id)
+                .FirstOrDefaultAsync();
+            if (entity == null) throw Oops.Oh(EnumErrorCodeType.s404, "鐏靛伐");
+            if (entity.UserSignContractStatus == EnumTaskUserSignContractStatus.Pass) throw Oops.Oh(EnumErrorCodeType.s400, "宸茬绾�");
+            if (entity.UserSignContractStatus == EnumTaskUserSignContractStatus.Effect) throw Oops.Oh(EnumErrorCodeType.s400, "宸茬敓鏁�");
+            if (entity.UserSignContractStatus == EnumTaskUserSignContractStatus.Wait) throw Oops.Oh(EnumErrorCodeType.s400, "宸查個璇�");
+            entity.ContractTemplateId = request.Id;
+            entity.UserSignContractStatus = EnumTaskUserSignContractStatus.Wait;
+            entity.UserSignContractTime = null;
+            entity.EnterpriseSignContractStatus = null;
+            entity.EnterpriseSignContractTime = null;
+            entity.ContractCode = $"{DateTime.Now:yyyyMMddHHmmss}{new Random(IDGen.NextID().GetHashCode()).Next(1000, 9999)}";
+            var contract = new EnterpriseEmployeeContract
+            {
+                EnterpriseEmployeeId = entity.Id,
+                ContractTemplateId = entity.ContractTemplateId,
+                ContractCode = entity.ContractCode,
+                UserSignContractStatus = entity.UserSignContractStatus,
+            };
+            await repEnterpriseEmployeeContract.InsertAsync(contract);
+            await rep.UpdateAsync(entity);
+            return entity.Id;
+        }
     }
 }
diff --git a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs
index feb25e2..c50f501 100644
--- a/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs
+++ b/FlexJobApi.UserServer.Application/EnterpriseEmployees/Queries/EnterpriseEmployeeQueryHandler.cs
@@ -19,7 +19,8 @@
         ) :
         IRequestHandler<GetEnterpriseEmployeesQuery, GetEnterpriseEmployeesQueryResult>,
         IRequestHandler<GetEnterpriseEmployeeQuery, GetEnterpriseEmployeeQueryResult>,
-        IRequestHandler<GetEnterpriseEmployeeElectronSignsQuery, GetEnterpriseEmployeeElectronSignsQueryResult>
+        IRequestHandler<GetEnterpriseEmployeeElectronSignsQuery, GetEnterpriseEmployeeElectronSignsQueryResult>,
+        IRequestHandler<GetEnterpriseEmployeeElectronSignQuery, GetEnterpriseEmployeeElectronSignQueryResult>
     {
         private readonly IRepository<EnterpriseEmployee> rep = rep;
 
@@ -170,5 +171,30 @@
             });
             return await request.PageModel.GetPagedListAsync<GetEnterpriseEmployeeElectronSignsQueryResult, GetEnterpriseEmployeeElectronSignsQueryResultItem>(s, cancellationToken);
         }
+
+        /// <summary>
+        /// 鏌ヨ涓汉鐢ㄦ埛绛剧害璇︽儏
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="cancellationToken"></param>
+        /// <returns></returns>
+        public async Task<GetEnterpriseEmployeeElectronSignQueryResult> Handle(GetEnterpriseEmployeeElectronSignQuery request, CancellationToken cancellationToken)
+        {
+            var logier = JwtUtils.GetCurrentLogier();
+            var q = rep.AsQueryable().AsNoTracking()
+                .Where(it => it.UserId == logier.Id);
+            if (request.Id.HasValue)
+            {
+                q = q.Where(it => it.Id == request.Id);
+            }
+
+            if (request.Code.IsNotNull())
+            {
+                q = q.Where(it => it.ContractTemplate.Code == request.Code);
+            }
+
+            var model = await q.GetDetail<EnterpriseEmployee, GetEnterpriseEmployeeElectronSignQueryResult>();
+            return model;
+        }
     }
 }
diff --git a/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml b/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml
index b775a71..86f5902 100644
--- a/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml
+++ b/FlexJobApi.UserServer.Application/FlexJobApi.UserServer.Application.xml
@@ -317,6 +317,14 @@
             <param name="cancellationToken"></param>
             <returns></returns>
         </member>
+        <member name="M:FlexJobApi.UserServer.Application.ContractTemplateQueryHandler.Handle(FlexJobApi.Core.GetEnterpriseContractTemplateSelectQuery,System.Threading.CancellationToken)">
+            <summary>
+            鏌ヨ浼佷笟鍚堝悓妯℃澘閫夋嫨鍣ㄦ暟鎹�
+            </summary>
+            <param name="request"></param>
+            <param name="cancellationToken"></param>
+            <returns></returns>
+        </member>
         <member name="T:FlexJobApi.UserServer.Application.ElectronSignSettingQueryHandler">
             <summary>
             鐢靛瓙绛鹃厤缃煡璇㈠鐞嗗櫒
@@ -358,7 +366,7 @@
             鐏靛伐鍛戒护澶勭悊鍣�
             </summary>
         </member>
-        <member name="M:FlexJobApi.UserServer.Application.EnterpriseEmployeesCommandHandler.#ctor(Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.EnterpriseEmployee},Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.User})">
+        <member name="M:FlexJobApi.UserServer.Application.EnterpriseEmployeesCommandHandler.#ctor(Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.EnterpriseEmployee},Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.User},Furion.DatabaseAccessor.IRepository{FlexJobApi.Core.EnterpriseEmployeeContract})">
             <summary>
             鐏靛伐鍛戒护澶勭悊鍣�
             </summary>
@@ -374,6 +382,14 @@
         <member name="M:FlexJobApi.UserServer.Application.EnterpriseEmployeesCommandHandler.Handle(FlexJobApi.Core.EditEnterpriseEmployeeCommand,System.Threading.CancellationToken)">
             <summary>
             缂栬緫鐏靛伐淇℃伅
+            </summary>
+            <param name="request"></param>
+            <param name="cancellationToken"></param>
+            <returns></returns>
+        </member>
+        <member name="M:FlexJobApi.UserServer.Application.EnterpriseEmployeesCommandHandler.Handle(FlexJobApi.Core.InviteEnterpriseEmployeeElectronSignCommand,System.Threading.CancellationToken)">
+            <summary>
+            閭�璇风伒宸ョ绾�
             </summary>
             <param name="request"></param>
             <param name="cancellationToken"></param>
@@ -413,6 +429,14 @@
             <param name="cancellationToken"></param>
             <returns></returns>
         </member>
+        <member name="M:FlexJobApi.UserServer.Application.EnterpriseEmployeeQueryHandler.Handle(FlexJobApi.Core.GetEnterpriseEmployeeElectronSignQuery,System.Threading.CancellationToken)">
+            <summary>
+            鏌ヨ涓汉鐢ㄦ埛绛剧害璇︽儏
+            </summary>
+            <param name="request"></param>
+            <param name="cancellationToken"></param>
+            <returns></returns>
+        </member>
         <member name="T:FlexJobApi.UserServer.Application.EnterpriseCommandHandler">
             <summary>
             浼佷笟鍛戒护澶勭悊鍣�

--
Gitblit v1.9.1