From 8cf7880575ff244eebde5a9c7e881e9645ecdeca Mon Sep 17 00:00:00 2001
From: falcon <9504402@qq.com>
Date: Mon, 30 Jan 2023 15:55:07 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7=E8=A7=92?=
=?UTF-8?q?=E8=89=B2=E7=9B=B8=E5=85=B3=E8=A1=A8=E5=AE=9A=E4=B9=89=E5=92=8C?=
=?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E8=A1=A8=E7=9B=B8=E5=85=B3=E6=96=B9?=
=?UTF-8?q?=E6=B3=95=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FalconClaim/Tables/FalconClaim_Role.cs | 18 ++++++++++++++++
.../Tables/FalconClaim_UserInRoles.cs | 17 +++++++++++++++
.../Tables/SugarDbContextExtend.cs | 21 +++++++++++++++++++
3 files changed, 56 insertions(+)
create mode 100644 Falcon.SugarApi/FalconClaim/Tables/FalconClaim_Role.cs
create mode 100644 Falcon.SugarApi/FalconClaim/Tables/FalconClaim_UserInRoles.cs
create mode 100644 Falcon.SugarApi/FalconClaim/Tables/SugarDbContextExtend.cs
diff --git a/Falcon.SugarApi/FalconClaim/Tables/FalconClaim_Role.cs b/Falcon.SugarApi/FalconClaim/Tables/FalconClaim_Role.cs
new file mode 100644
index 0000000..5405da6
--- /dev/null
+++ b/Falcon.SugarApi/FalconClaim/Tables/FalconClaim_Role.cs
@@ -0,0 +1,18 @@
+namespace Falcon.SugarApi.FalconClaim.Tables
+{
+ ///
+ /// 角色定义
+ ///
+ public class FalconClaim_Roles
+ {
+ ///
+ /// 角色名称
+ ///
+ public string RoleName { get; set; }
+ ///
+ /// 角色说明
+ ///
+ public string RoleDescription { get; set; }
+
+ }
+}
diff --git a/Falcon.SugarApi/FalconClaim/Tables/FalconClaim_UserInRoles.cs b/Falcon.SugarApi/FalconClaim/Tables/FalconClaim_UserInRoles.cs
new file mode 100644
index 0000000..7f5a918
--- /dev/null
+++ b/Falcon.SugarApi/FalconClaim/Tables/FalconClaim_UserInRoles.cs
@@ -0,0 +1,17 @@
+namespace Falcon.SugarApi.FalconClaim.Tables
+{
+ ///
+ /// 用户角色对应关系
+ ///
+ public class FalconClaim_UserInRoles
+ {
+ ///
+ /// 用户主键
+ ///
+ public string UserKey { get; set; }
+ ///
+ /// 角色名
+ ///
+ public string RoleName { get; set; }
+ }
+}
diff --git a/Falcon.SugarApi/FalconClaim/Tables/SugarDbContextExtend.cs b/Falcon.SugarApi/FalconClaim/Tables/SugarDbContextExtend.cs
new file mode 100644
index 0000000..238a3b9
--- /dev/null
+++ b/Falcon.SugarApi/FalconClaim/Tables/SugarDbContextExtend.cs
@@ -0,0 +1,21 @@
+using Falcon.SugarApi.DatabaseDefinitions;
+
+namespace Falcon.SugarApi.FalconClaim.Tables
+{
+ ///
+ /// 数据库扩展方法
+ ///
+ public static class SugarDbContextExtend
+ {
+ ///
+ /// 初始化FalconClaim角色相关表
+ ///
+ /// 数据库上下文
+ /// 数据库上下文
+ public static SugarDbContext InitFalconClaimRoleDbTables(this SugarDbContext dbContext) {
+ dbContext.CodeFirst.InitTables();
+ dbContext.CodeFirst.InitTables();
+ return dbContext;
+ }
+ }
+}