SysMenu.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. using Furion.DatabaseAccessor;
  2. using Microsoft.EntityFrameworkCore;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace YBEE.EQM.Core
  6. {
  7. /// <summary>
  8. /// 菜单表
  9. /// </summary>
  10. [Comment("菜单")]
  11. public partial class SysMenu : IEntity
  12. {
  13. /// <summary>
  14. /// 主键
  15. /// </summary>
  16. [Comment("主键")]
  17. [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  18. public int Id { get; set; }
  19. /// <summary>
  20. /// 父Id
  21. /// </summary>
  22. [Comment("父Id")]
  23. public int Pid { get; set; }
  24. /// <summary>
  25. /// 父Ids
  26. /// </summary>
  27. [Comment("父Ids")]
  28. public string Pids { get; set; }
  29. /// <summary>
  30. /// 名称
  31. /// </summary>
  32. [Comment("名称")]
  33. [Required, MaxLength(20)]
  34. public string Name { get; set; }
  35. /// <summary>
  36. /// 编码
  37. /// </summary>
  38. [Comment("编码")]
  39. [Required, MaxLength(50)]
  40. public string Code { get; set; }
  41. /// <summary>
  42. /// 菜单类型(字典 0目录 1菜单 2按钮)
  43. /// </summary>
  44. [Comment("菜单类型")]
  45. [Required]
  46. public MenuType MenuType { get; set; }
  47. /// <summary>
  48. /// 图标
  49. /// </summary>
  50. [Comment("图标")]
  51. [MaxLength(20)]
  52. public string Icon { get; set; }
  53. /// <summary>
  54. /// 路由地址
  55. /// </summary>
  56. [Comment("路由地址")]
  57. [MaxLength(100)]
  58. public string Router { get; set; }
  59. /// <summary>
  60. /// 组件地址
  61. /// </summary>
  62. [Comment("组件地址")]
  63. [MaxLength(100)]
  64. public string Component { get; set; }
  65. /// <summary>
  66. /// 权限标识
  67. /// </summary>
  68. [Comment("权限标识")]
  69. [MaxLength(100)]
  70. public string Permission { get; set; }
  71. /// <summary>
  72. /// 打开方式(字典 0无 1组件 2内链 3外链)
  73. /// </summary>
  74. [Comment("打开方式")]
  75. [Required]
  76. public MenuOpenType OpenType { get; set; } = MenuOpenType.NONE;
  77. /// <summary>
  78. /// 是否可见
  79. /// </summary>
  80. [Comment("是否可见")]
  81. [Required, MaxLength(5)]
  82. public bool Visible { get; set; } = true;
  83. /// <summary>
  84. /// 内链地址
  85. /// </summary>
  86. [Comment("内链地址")]
  87. [MaxLength(100)]
  88. public string Link { get; set; }
  89. /// <summary>
  90. /// 重定向地址
  91. /// </summary>
  92. [Comment("重定向地址")]
  93. [MaxLength(100)]
  94. public string Redirect { get; set; }
  95. /// <summary>
  96. /// 排序
  97. /// </summary>
  98. [Comment("排序")]
  99. [Required]
  100. public int Sort { get; set; } = 0;
  101. /// <summary>
  102. /// 备注
  103. /// </summary>
  104. [Comment("备注")]
  105. [MaxLength(100)]
  106. public string Remark { get; set; }
  107. /// <summary>
  108. /// 状态
  109. /// </summary>
  110. [Comment("状态")]
  111. [Required]
  112. public CommonStatus Status { get; set; } = CommonStatus.ENABLE;
  113. }
  114. }