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; + } + } +}