From d3f1887ba4a8b4ad822406a7a4fc97dbfea91850 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期一, 04 八月 2025 09:09:34 +0800
Subject: [PATCH] feat:菜单开发

---
 FlexJobApi.Database.Migrations/Migrations/20250801141922_UpdateUser0801.cs |  321 +++++++++++++++++++++++++++--------------------------
 1 files changed, 163 insertions(+), 158 deletions(-)

diff --git a/FlexJobApi.Database.Migrations/Migrations/20250801013026_Init.cs b/FlexJobApi.Database.Migrations/Migrations/20250801141922_UpdateUser0801.cs
similarity index 87%
rename from FlexJobApi.Database.Migrations/Migrations/20250801013026_Init.cs
rename to FlexJobApi.Database.Migrations/Migrations/20250801141922_UpdateUser0801.cs
index e3db192..19a3b2a 100644
--- a/FlexJobApi.Database.Migrations/Migrations/20250801013026_Init.cs
+++ b/FlexJobApi.Database.Migrations/Migrations/20250801141922_UpdateUser0801.cs
@@ -6,7 +6,7 @@
 namespace FlexJobApi.Database.Migrations.Migrations
 {
     /// <inheritdoc />
-    public partial class Init : Migration
+    public partial class UpdateUser0801 : Migration
     {
         /// <inheritdoc />
         protected override void Up(MigrationBuilder migrationBuilder)
@@ -21,11 +21,11 @@
                     FieldNames = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "瀛楁鍚嶏紙閫楀彿闅斿紑锛�"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -51,11 +51,11 @@
                     ImageHeight = table.Column<int>(type: "int", nullable: true, comment: "楂樺害锛堝儚绱狅級"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -69,6 +69,7 @@
                 {
                     Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                     ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "涓婄骇Id"),
+                    Path = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "鑿滃崟璺緞"),
                     Code = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "缂栧彿"),
                     Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false, comment: "鍚嶇О"),
                     Type = table.Column<int>(type: "int", nullable: false, comment: "绫诲瀷"),
@@ -76,18 +77,19 @@
                     Icon = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "鍥炬爣"),
                     Url = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "閾炬帴鍦板潃"),
                     Group = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "鍒嗙粍鍚嶇О锛堢敤浜庢寜閽�/瀛楁锛�"),
-                    BindField = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "缁戝畾瀛楁"),
+                    Location = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "浣嶇疆锛堢敤浜庢寜閽級"),
+                    Width = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "鍒楀锛堢敤浜庢寜閽�/鍒�/鍏冪礌锛�"),
                     IsDisabled = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁绂佺敤"),
                     IsHidden = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁闅愯棌"),
                     IsCache = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁缂撳瓨"),
                     Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "澶囨敞"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -101,6 +103,32 @@
                 comment: "鑿滃崟");
 
             migrationBuilder.CreateTable(
+                name: "Resource",
+                columns: table => new
+                {
+                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    Service = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    Method = table.Column<int>(type: "int", nullable: false),
+                    Route = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    RequestTypeName = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    ResponseTypeName = table.Column<string>(type: "nvarchar(max)", nullable: false),
+                    IsExpired = table.Column<bool>(type: "bit", nullable: false),
+                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
+                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Resource", x => x.Id);
+                });
+
+            migrationBuilder.CreateTable(
                 name: "Role",
                 columns: table => new
                 {
@@ -111,11 +139,11 @@
                     MinLevel = table.Column<int>(type: "int", nullable: false, comment: "鏈�浣庣骇鍒�"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -124,36 +152,13 @@
                 comment: "瑙掕壊");
 
             migrationBuilder.CreateTable(
-                name: "WebApi",
-                columns: table => new
-                {
-                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    Code = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "缂栧彿"),
-                    Name = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "鍚嶇О"),
-                    Method = table.Column<int>(type: "int", nullable: false, comment: "璇锋眰鏂瑰紡"),
-                    Url = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺敱鍦板潃"),
-                    IsDisabled = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁绂佺敤"),
-                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
-                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
-                },
-                constraints: table =>
-                {
-                    table.PrimaryKey("PK_WebApi", x => x.Id);
-                },
-                comment: "鎺ュ彛");
-
-            migrationBuilder.CreateTable(
                 name: "DictionaryData",
                 columns: table => new
                 {
                     Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                     CategoryId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "绫诲埆Id"),
                     ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "涓婄骇Id"),
+                    Path = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "瀛楀吀璺緞"),
                     Code = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true, comment: "缂栧彿"),
                     Content = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "鏄剧ず鍐呭"),
                     Field1 = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "瀛楁1"),
@@ -163,11 +168,11 @@
                     Field5 = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "瀛楁5"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -196,11 +201,11 @@
                     VirtualPath = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "铏氭嫙璺緞"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -223,11 +228,11 @@
                     MenuId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "鑿滃崟Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -248,38 +253,37 @@
                 comment: "瑙掕壊鑿滃崟");
 
             migrationBuilder.CreateTable(
-                name: "RoleWebApi",
+                name: "RoleResource",
                 columns: table => new
                 {
                     Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "瑙掕壊Id"),
-                    MenuId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "鑿滃崟Id"),
-                    DataPower = table.Column<int>(type: "int", nullable: true, comment: "鏁版嵁鏉冮檺"),
+                    RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    MenuId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
+                    DataPower = table.Column<int>(type: "int", nullable: true),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
-                    table.PrimaryKey("PK_RoleWebApi", x => x.Id);
+                    table.PrimaryKey("PK_RoleResource", x => x.Id);
                     table.ForeignKey(
-                        name: "FK_RoleWebApi_Menu_MenuId",
+                        name: "FK_RoleResource_Menu_MenuId",
                         column: x => x.MenuId,
                         principalTable: "Menu",
                         principalColumn: "Id",
                         onDelete: ReferentialAction.Cascade);
                     table.ForeignKey(
-                        name: "FK_RoleWebApi_Role_RoleId",
+                        name: "FK_RoleResource_Role_RoleId",
                         column: x => x.RoleId,
                         principalTable: "Role",
                         principalColumn: "Id",
                         onDelete: ReferentialAction.Cascade);
-                },
-                comment: "瑙掕壊鎺ュ彛");
+                });
 
             migrationBuilder.CreateTable(
                 name: "Enterprise",
@@ -305,11 +309,11 @@
                     IsReal = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁瀹炲悕"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -352,11 +356,11 @@
                     IsReal = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁瀹炲悕"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -390,17 +394,18 @@
                 {
                     Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                     ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "涓婄骇Id"),
+                    Path = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "閮ㄩ棬璺緞"),
                     EnterpriseId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "浼佷笟Id"),
                     Name = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "鍚嶇О"),
                     Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "澶囨敞"),
                     IsDisabled = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁绂佺敤"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -438,11 +443,11 @@
                     EndTime = table.Column<DateTime>(type: "datetime2", nullable: false, comment: "浠诲姟缁撴潫鏃堕棿"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -467,8 +472,7 @@
                 columns: table => new
                 {
                     Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
-                    UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "鐢ㄦ埛Id"),
-                    UserAuthId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
+                    UserAuthId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "鐢ㄦ埛Id"),
                     Type = table.Column<int>(type: "int", nullable: false, comment: "鐢ㄦ埛绫诲瀷"),
                     EnterpriseId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "浼佷笟Id"),
                     WxmpOpenId = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true, comment: "寰俊寮�鏀綢d"),
@@ -484,11 +488,11 @@
                     Weight = table.Column<int>(type: "int", nullable: true, comment: "浣撻噸"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -517,7 +521,8 @@
                         name: "FK_UserInfo_UserAuth_UserAuthId",
                         column: x => x.UserAuthId,
                         principalTable: "UserAuth",
-                        principalColumn: "Id");
+                        principalColumn: "Id",
+                        onDelete: ReferentialAction.Cascade);
                 },
                 comment: "鐢ㄦ埛淇℃伅");
 
@@ -531,11 +536,11 @@
                     BenefitId1 = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -564,11 +569,11 @@
                     TypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "璇佷功绫诲瀷Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -599,11 +604,11 @@
                     SignContractTime = table.Column<DateTime>(type: "datetime2", nullable: true, comment: "绛剧害鏃堕棿"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -634,11 +639,11 @@
                     PhoneNumber = table.Column<string>(type: "nvarchar(11)", maxLength: 11, nullable: false, comment: "閾惰棰勭暀鎵嬫満鍙�"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -668,11 +673,11 @@
                     BackImgId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "璇佷功鍙嶉潰鐓х墖Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -711,11 +716,11 @@
                     DepartmentId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "閮ㄩ棬Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -744,11 +749,11 @@
                     PersonalIdentityId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "鏈熸湜宀椾綅Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -777,11 +782,11 @@
                     ImgId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "鐓х墖Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -810,11 +815,11 @@
                     RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false, comment: "瑙掕壊Id"),
                     CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                     UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
-                    Sort = table.Column<int>(type: "int", nullable: false),
-                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
-                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
-                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
+                    Sort = table.Column<int>(type: "int", nullable: false, comment: "鎺掑簭"),
+                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "璺熻釜Id"),
+                    CreatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鍒涘缓鎿嶄綔浜�"),
+                    UpdatedUserInfoId = table.Column<Guid>(type: "uniqueidentifier", nullable: true, comment: "鏈�鍚庢洿鏂版搷浣滀汉"),
+                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "鏄惁鍒犻櫎")
                 },
                 constraints: table =>
                 {
@@ -841,8 +846,8 @@
 
             migrationBuilder.InsertData(
                 table: "UserInfo",
-                columns: new[] { "Id", "CityId", "CreatedTime", "CreatedUserInfoId", "EducationalBackgroundId", "EnterpriseId", "FreeTime", "Height", "IsDeleted", "JobSeekingStatus", "Level", "PersonalIdentityId", "Sort", "TraceId", "Type", "UpdatedTime", "UpdatedUserInfoId", "UserAuthId", "UserId", "Weight", "WorkExperience", "WorkSeniority", "WxmpOpenId" },
-                values: new object[] { new Guid("11111111-1111-1111-1111-111111111112"), null, new DateTimeOffset(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), null, null, null, null, null, false, null, 999, null, 0, null, 100, null, null, null, new Guid("11111111-1111-1111-1111-111111111111"), null, null, null, null });
+                columns: new[] { "Id", "CityId", "CreatedTime", "CreatedUserInfoId", "EducationalBackgroundId", "EnterpriseId", "FreeTime", "Height", "IsDeleted", "JobSeekingStatus", "Level", "PersonalIdentityId", "Sort", "TraceId", "Type", "UpdatedTime", "UpdatedUserInfoId", "UserAuthId", "Weight", "WorkExperience", "WorkSeniority", "WxmpOpenId" },
+                values: new object[] { new Guid("11111111-1111-1111-1111-111111111112"), null, new DateTimeOffset(new DateTime(2000, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 8, 0, 0, 0)), null, null, null, null, null, false, null, 999, null, 0, null, 100, null, null, new Guid("11111111-1111-1111-1111-111111111111"), null, null, null, null });
 
             migrationBuilder.CreateIndex(
                 name: "IX_Department_EnterpriseId",
@@ -900,13 +905,13 @@
                 column: "RoleId");
 
             migrationBuilder.CreateIndex(
-                name: "IX_RoleWebApi_MenuId",
-                table: "RoleWebApi",
+                name: "IX_RoleResource_MenuId",
+                table: "RoleResource",
                 column: "MenuId");
 
             migrationBuilder.CreateIndex(
-                name: "IX_RoleWebApi_RoleId",
-                table: "RoleWebApi",
+                name: "IX_RoleResource_RoleId",
+                table: "RoleResource",
                 column: "RoleId");
 
             migrationBuilder.CreateIndex(
@@ -1064,10 +1069,13 @@
         protected override void Down(MigrationBuilder migrationBuilder)
         {
             migrationBuilder.DropTable(
+                name: "Resource");
+
+            migrationBuilder.DropTable(
                 name: "RoleMenu");
 
             migrationBuilder.DropTable(
-                name: "RoleWebApi");
+                name: "RoleResource");
 
             migrationBuilder.DropTable(
                 name: "TaskInfoBenefit");
@@ -1095,9 +1103,6 @@
 
             migrationBuilder.DropTable(
                 name: "UserInfoRole");
-
-            migrationBuilder.DropTable(
-                name: "WebApi");
 
             migrationBuilder.DropTable(
                 name: "Menu");

--
Gitblit v1.9.1