平安校园
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

177 rindas
5.5 KiB

  1. namespace SafeCampus.System;
  2. /// <summary>
  3. /// 资源
  4. ///</summary>
  5. [SugarTable("sys_resource", TableDescription = "资源")]
  6. [Tenant(SqlSugarConst.DB_DEFAULT)]
  7. [IgnoreInitTable]
  8. public class SysResource : BaseEntity
  9. {
  10. /// <summary>
  11. /// 父id
  12. ///</summary>
  13. [SugarColumn(ColumnName = "ParentId", ColumnDescription = "父id", IsNullable = true)]
  14. public virtual long? ParentId { get; set; }
  15. /// <summary>
  16. /// 标题
  17. ///</summary>
  18. [SugarColumn(ColumnName = "Title", ColumnDescription = "标题", Length = 200)]
  19. public virtual string Title { get; set; }
  20. /// <summary>
  21. /// 别名
  22. ///</summary>
  23. [SugarColumn(ColumnName = "Name", ColumnDescription = "别名", Length = 200, IsNullable = true)]
  24. public string Name { get; set; }
  25. /// <summary>
  26. /// 描述
  27. ///</summary>
  28. [SugarColumn(ColumnName = "Description", ColumnDescription = "描述", Length = 200, IsNullable = true)]
  29. public string Description { get; set; }
  30. /// <summary>
  31. /// 编码
  32. ///</summary>
  33. [SugarColumn(ColumnName = "Code", ColumnDescription = "编码", Length = 200, IsNullable = true)]
  34. public virtual string Code { get; set; }
  35. /// <summary>
  36. /// 分类
  37. ///</summary>
  38. [SugarColumn(ColumnName = "Category", ColumnDescription = "分类", Length = 200)]
  39. public string Category { get; set; }
  40. /// <summary>
  41. /// 模块
  42. ///</summary>
  43. [SugarColumn(ColumnName = "Module", ColumnDescription = "所属模块Id", IsNullable = true)]
  44. public virtual long? Module { get; set; }
  45. /// <summary>
  46. /// 菜单类型
  47. ///</summary>
  48. [SugarColumn(ColumnName = "MenuType", ColumnDescription = "菜单类型", Length = 200, IsNullable = true)]
  49. public virtual string MenuType { get; set; }
  50. /// <summary>
  51. /// 路径
  52. ///</summary>
  53. [SugarColumn(ColumnName = "Path", ColumnDescription = "路径", IsNullable = true)]
  54. public virtual string Path { get; set; }
  55. /// <summary>
  56. /// 组件
  57. ///</summary>
  58. [SugarColumn(ColumnName = "Component", ColumnDescription = "组件", Length = 200, IsNullable = true)]
  59. public string Component { get; set; }
  60. /// <summary>
  61. /// 图标
  62. ///</summary>
  63. [SugarColumn(ColumnName = "Icon", ColumnDescription = "图标", Length = 200, IsNullable = true)]
  64. public virtual string Icon { get; set; }
  65. /// <summary>
  66. /// 是否在菜单中隐藏, 需要高亮的 path (通常用作详情页高亮父级菜单)
  67. ///</summary>
  68. [SugarColumn(ColumnName = "ActiveMenu", ColumnDescription = "需要高亮的 path (通常用作详情页高亮父级菜单)", Length = 200, IsNullable = true)]
  69. public string ActiveMenu { get; set; }
  70. /// <summary>
  71. /// 是否在菜单中隐藏 (通常列表详情页需要隐藏)
  72. ///</summary>
  73. [SugarColumn(ColumnName = "IsHide", ColumnDescription = "是否在菜单中隐藏 (通常列表详情页需要隐藏) ", IsNullable = true)]
  74. public bool IsHide { get; set; }
  75. /// <summary>
  76. /// 是否在菜单中隐藏 (通常列表详情页需要隐藏)
  77. ///</summary>
  78. [SugarColumn(ColumnName = "IsFull", ColumnDescription = "菜单是否全屏 (示例:数据大屏页面)", IsNullable = true)]
  79. public bool IsFull { get; set; }
  80. /// <summary>
  81. /// 菜单是否固定在标签页中 (首页通常是固定项)
  82. ///</summary>
  83. [SugarColumn(ColumnName = "IsAffix", ColumnDescription = "菜单是否固定在标签页中 (首页通常是固定项)", IsNullable = true)]
  84. public bool IsAffix { get; set; }
  85. /// <summary>
  86. /// 菜单是否固定在标签页中 (首页通常是固定项)
  87. ///</summary>
  88. [SugarColumn(ColumnName = "IsKeepAlive", ColumnDescription = " 当前路由是否缓存", IsNullable = true)]
  89. public bool IsKeepAlive { get; set; }
  90. /// <summary>
  91. /// 是否为首页
  92. ///</summary>
  93. [SugarColumn(ColumnName = "IsHome", ColumnDescription = " 是否为首页", IsNullable = true)]
  94. public bool IsHome { get; set; }
  95. /// <summary>
  96. /// 排序码
  97. ///</summary>
  98. [SugarColumn(ColumnName = "SortCode", ColumnDescription = "排序码", IsNullable = true)]
  99. public int? SortCode { get; set; }
  100. /// <summary>
  101. /// 菜单元标签
  102. /// </summary>
  103. [SugarColumn(IsIgnore = true)]
  104. public Meta Meta { get; set; }
  105. /// <summary>
  106. /// 子节点
  107. /// </summary>
  108. [SugarColumn(IsIgnore = true)]
  109. public List<SysResource> Children { get; set; }
  110. }
  111. /// <summary>
  112. /// 菜单元标签
  113. /// </summary>
  114. public class Meta
  115. {
  116. /// <summary>
  117. /// 图标
  118. /// </summary>
  119. public string Icon { get; set; }
  120. /// <summary>
  121. /// 标题
  122. /// </summary>
  123. public string Title { get; set; }
  124. /// <summary>
  125. /// 是否在菜单中隐藏, 需要高亮的 path (通常用作详情页高亮父级菜单)
  126. ///</summary>
  127. public string ActiveMenu { get; set; }
  128. /// <summary>
  129. /// 是否在菜单中隐藏 (通常列表详情页需要隐藏)
  130. ///</summary>
  131. public bool IsHide { get; set; }
  132. /// <summary>
  133. /// 路由外链时填写的访问地址
  134. /// </summary>
  135. public string IsLink { get; set; } = "";
  136. /// <summary>
  137. /// 是否在菜单中隐藏 (通常列表详情页需要隐藏)
  138. ///</summary>
  139. public bool IsFull { get; set; }
  140. /// <summary>
  141. /// 菜单是否固定在标签页中 (首页通常是固定项)
  142. ///</summary>
  143. public bool IsAffix { get; set; }
  144. /// <summary>
  145. /// 菜单是否固定在标签页中 (首页通常是固定项)
  146. ///</summary>
  147. public bool IsKeepAlive { get; set; }
  148. }