SysRole.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using Microsoft.EntityFrameworkCore;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace YBEE.EQM.Core
  5. {
  6. /// <summary>
  7. /// 角色,内置固定角色全部放内置固定角色组
  8. /// </summary>
  9. [Comment("角色")]
  10. public partial class SysRole : DEntityBase
  11. {
  12. /// <summary>
  13. /// 名称
  14. /// </summary>
  15. [Comment("名称")]
  16. [Required, StringLength(80)]
  17. public string Name { get; set; }
  18. /// <summary>
  19. /// 角色组ID
  20. /// </summary>
  21. [Comment("角色组ID")]
  22. [Required]
  23. public int SysRoleGroupId { get; set; }
  24. /// <summary>
  25. /// 角色类型
  26. /// </summary>
  27. [Comment("角色类型")]
  28. [Required]
  29. public RoleType RoleType { get; set; }
  30. /// <summary>
  31. /// 备注
  32. /// </summary>
  33. [Comment("备注")]
  34. [StringLength(200)]
  35. public string Remark { get; set; }
  36. /// <summary>
  37. /// 状态
  38. /// </summary>
  39. [Comment("状态")]
  40. [Required]
  41. public CommonStatus Status { get; set; }
  42. /// <summary>
  43. /// 数据权限范围
  44. /// {
  45. /// educationStages: [1, 2],
  46. /// sysOrgIds: [101, 102],
  47. /// }
  48. /// </summary>
  49. [Comment("数据权限范围")]
  50. [Required, Column(TypeName = "json")]
  51. public string RoleDataScope { get; set; } = "{}";
  52. /// <summary>
  53. /// 一对一引用(角色组)
  54. /// </summary>
  55. public virtual SysRoleGroup SysRoleGroup { get; set; }
  56. /// <summary>
  57. /// 一对一引用(创建人)
  58. /// </summary>
  59. public virtual SysUser CreateSysUser { get; set; }
  60. /// <summary>
  61. /// 一对一引用(修建人)
  62. /// </summary>
  63. public virtual SysUser UpdateSysUser { get; set; }
  64. }
  65. }