codeFirst实体建表

This commit is contained in:
不做码农
2023-06-07 22:28:06 +08:00
parent 628df80df7
commit b96edfdac7
47 changed files with 688 additions and 194 deletions

View File

@@ -5,7 +5,7 @@ namespace ZR.Model.System
/// <summary>
/// 角色表 sys_role
/// </summary>
[SugarTable("sys_role")]
[SugarTable("sys_role", "角色表")]
[Tenant("0")]
public class SysRole : SysBase
{
@@ -18,41 +18,47 @@ namespace ZR.Model.System
/// <summary>
/// 角色名称
/// </summary>
[SugarColumn(Length = 30, ExtendedAttribute = ProteryConstant.NOTNULL)]
public string RoleName { get; set; }
/// <summary>
/// 角色权限
/// </summary>
[SugarColumn(Length = 100, ExtendedAttribute = ProteryConstant.NOTNULL)]
public string RoleKey { get; set; }
/// <summary>
/// 角色排序
/// </summary>
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
public int RoleSort { get; set; }
/// <summary>
/// 帐号状态0正常 1停用
/// </summary>
[SugarColumn(DefaultValue = "0")]
public int Status { get; set; }
/// <summary>
/// 删除标志0代表存在 2代表删除
/// </summary>
[SugarColumn(DefaultValue = "0")]
public int DelFlag { get; set; }
/// <summary>
/// 数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限
/// </summary>
[SugarColumn(DefaultValue = "1")]
public int DataScope { get; set; }
/// <summary>
/// 菜单树选择项是否关联显示
/// </summary>
[SugarColumn(ColumnName = "menu_check_strictly")]
public bool MenuCheckStrictly { get; set; }
public bool MenuCheckStrictly { get; set; } = true;
/// <summary>
/// 部门树选择项是否关联显示
/// </summary>
[SugarColumn(ColumnName = "dept_check_strictly")]
public bool DeptCheckStrictly { get; set; }
public bool DeptCheckStrictly { get; set; } = true;
/// <summary>
/// 菜单组
/// </summary>