Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.12 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using System.ComponentModel.DataAnnotations;
  3.  
  4. namespace Server.Models.Admin
  5. {
  6. public class Permission
  7. {
  8. // Primary and Foreign Keys
  9. [Key]
  10. public Type PermissionId { get; set; }
  11.  
  12. // Non-Nullable Properties
  13. [Required]
  14. public string Name { get; set; }
  15.  
  16. // Navigational Properties
  17. public List<PermissionRole> PermissionRoles { get; set; }
  18. public List<Feature> Features { get; set; }
  19.  
  20. public enum Type
  21. {
  22. // Admin Module
  23.  
  24. // Team 12 Permissions
  25. Users_Manage = 1001,
  26. Groups_Manage = 1002,
  27. AuditLogs_Manage = 1003,
  28. HistoryLogs_Manage = 1004,
  29. Uploads_Manage = 1005,
  30. Assignments_Manage = 1006,
  31.  
  32. //UserRoles
  33. UserRole_Manage = 1010,
  34.  
  35. //Roles
  36. Role_Retrieve = 1020,
  37. Role_Add = 1021,
  38. Role_Edit = 1022,
  39. Role_Delete = 1023,
  40.  
  41. //RolePermissions
  42. RolePermission_Retrieve = 1030,
  43. RolePermission_Add = 1031,
  44. RolePermission_Edit = 1032,
  45. RolePermission_Delete = 1033,
  46.  
  47. //Permissions
  48. Permission_Retrieve = 1040,
  49. Permission_Add = 1041,
  50. Permission_Edit = 1042,
  51. Permission_Delete = 1043,
  52.  
  53. //Features
  54. Feature_Retrieve = 1050,
  55.  
  56. //Working Hours
  57. WorkingHours_Manage = 1060,
  58.  
  59. //Medicines
  60. Medicine_Retrieve = 1090,
  61. Medicine_Add = 1091,
  62. Medicine_Edit = 1092,
  63. Medicine_Delete = 1093,
  64.  
  65. //OTPs
  66. OTP_Retrieve = 1110,
  67. OTP_Add = 1111,
  68. OTP_Edit = 1112,
  69. OTP_Delete = 1113,
  70.  
  71. //Sessions
  72. Session_Retrieve = 1120,
  73. Session_Add = 1121,
  74. Session_Edit = 1122,
  75. Session_Delete = 1123,
  76.  
  77. //Questionnare
  78. Questionnare_Retrieve = 1130,
  79. Questionnare_Add = 1131,
  80. Questionnare_Edit = 1132,
  81. Questionnare_Delete = 1133,
  82. Questionnare_Send = 1134,
  83.  
  84. //User Dashboard Module
  85. //Goals
  86. Goal_Retrieve = 2000,
  87. Goal_Add = 2001,
  88. Goal_Edit = 2002,
  89. Goal_Delete = 2003,
  90.  
  91. //Tasks
  92. Task_Retrieve = 2010,
  93. Task_Add = 2011,
  94. Task_Edit = 2012,
  95. Task_Delete = 2013,
  96.  
  97. //Units
  98. Unit_Retrieve = 2020,
  99. Unit_Add = 2021,
  100. Unit_Edit = 2022,
  101. Unit_Delete = 2023,
  102.  
  103. //Catergorys
  104. Catergory_Retrieve = 2030,
  105. Catergory_Add = 2031,
  106. Catergory_Edit = 2032,
  107. Catergory_Delete = 2033,
  108.  
  109. //SharingPosts
  110. SharingPost_Retrieve = 2040,
  111. SharingPost_Add = 2041,
  112. SharingPost_Edit = 2042,
  113. SharingPost_Delete = 2043,
  114.  
  115. //SharingMaps
  116. SharingMap_Retrieve = 2050,
  117. SharingMap_Add = 2051,
  118. SharingMap_Edit = 2052,
  119. SharingMap_Delete = 2053,
  120.  
  121. //SharingPostComments
  122. SharingPostComment_Retrieve = 2060,
  123. SharingPostComment_Add = 2061,
  124. SharingPostComment_Edit = 2062,
  125. SharingPostComment_Delete = 2063,
  126.  
  127. //CalendarEvents
  128. CalendarEvents_Retrieve = 2070,
  129. CalendarEvents_Add = 2071,
  130. CalendarEvents_Edit = 2072,
  131. CalendarEvents_Delete = 2073,
  132.  
  133. //PersonalEvents
  134. PersonalEvent_Retrieve = 2080,
  135. PersonalEvent_Add = 2081,
  136. PersonalEvent_Edit = 2082,
  137. PersonalEvent_Delete = 2083,
  138.  
  139. //Events
  140. Event_Retrieve = 2090,
  141. Event_Add = 2091,
  142. Event_Edit = 2092,
  143. Event_Delete = 2093,
  144.  
  145.  
  146. //Event Module
  147. //Allergys
  148. Allergy_Retrieve = 3000,
  149. Allergy_Add = 3001,
  150. Allergy_Edit = 3002,
  151. Allergy_Delete = 3003,
  152.  
  153. //Appointments
  154. Appointment_Retrieve = 3010,
  155. Appointment_Add = 3011,
  156. Appointment_Edit = 3012,
  157. Appointment_Delete = 3013,
  158. Appointment_Approve = 3014,
  159.  
  160. //FollowingLists
  161. FollowingList_Retrieve = 3020,
  162. FollowingList_Add = 3021,
  163. FollowingList_Edit = 3022,
  164. FollowingList_Delete = 3023,
  165.  
  166. //FollowUps
  167. FollowUp_Retrieve = 3030,
  168. FollowUp_Add = 3031,
  169. FollowUp_Edit = 3032,
  170. FollowUp_Delete = 3033,
  171.  
  172. //MedicineIntakeEvents
  173. MedicineIntakeEvent_Retrieve = 3040,
  174. MedicineIntakeEvent_Add = 3041,
  175. MedicineIntakeEvent_Edit = 3042,
  176. MedicineIntakeEvent_Delete = 3043,
  177.  
  178. //MedicineIntakeRecords
  179. MedicineIntakeRecord_Retrieve = 3050,
  180. MedicineIntakeRecord_Add = 3051,
  181. MedicineIntakeRecord_Edit = 3052,
  182. MedicineIntakeRecord_Delete = 3053,
  183.  
  184. //MedicineIntakeRecords
  185. PersonalMedicineIntakeRecord_Retrieve = 3054,
  186. PersonalMedicineIntakeRecord_Add = 3055,
  187. PersonalMedicineIntakeRecord_Edit = 3056,
  188. PersonalMedicineIntakeRecord_Delete = 3057,
  189.  
  190. //PainInfos
  191. PainInfo_Retrieve = 3060,
  192. PainInfo_Add = 3061,
  193. PainInfo_Edit = 3062,
  194. PainInfo_Delete = 3063,
  195.  
  196. //PainInfoMedias
  197. PainInfoMedia_Retrieve = 3070,
  198. PainInfoMedia_Add = 3071,
  199. PainInfoMedia_Edit = 3072,
  200. PainInfoMedia_Delete = 3073,
  201.  
  202. //PainInfoRemarks
  203. PainInfoRemark_Retrieve = 3080,
  204. PainInfoRemark_Add = 3081,
  205. PainInfoRemark_Edit = 3082,
  206. PainInfoRemark_Delete = 3083,
  207.  
  208. //PainRecords
  209. PainRecord_Retrieve = 3090,
  210. PainRecord_Add = 3091,
  211. PainRecord_Edit = 3092,
  212. PainRecord_Delete = 3093,
  213.  
  214. PersonalPainRecord_Retrieve = 3094,
  215. PersonalPainRecord_Add = 3095,
  216. PersonalPainRecord_Edit = 3096,
  217. PersonalPainRecord_Delete = 3097,
  218.  
  219. //UserPains
  220. UserPain_Retrieve = 3100,
  221. UserPain_Add = 3101,
  222. UserPain_Edit = 3102,
  223. UserPain_Delete = 3103,
  224.  
  225. //UserPrescribedMedicines
  226. UserPrescribedMedicine_Retrieve = 3110,
  227. UserPrescribedMedicine_Add = 3111,
  228. UserPrescribedMedicine_Edit = 3112,
  229. UserPrescribedMedicine_Delete = 3113,
  230.  
  231. //Forum Module
  232. Forum_Staff = 4000,
  233. Forum_IT = 4001,
  234. Forum_External = 4002,
  235.  
  236. //Posts
  237. PersonalPost_Retrieve = 4050,
  238. PersonalPost_Add = 4051,
  239. PersonalPost_Edit = 4052,
  240. PersonalPost_Delete = 4053,
  241.  
  242. //Posts
  243. Post_Retrieve = 4060,
  244. Post_Add = 4061,
  245. Post_Edit = 4062,
  246. Post_Delete = 4063,
  247.  
  248. PersonalThread_Retrieve = 4070,
  249. PersonalThread_Add = 4071,
  250. PersonalThread_Edit = 4072,
  251. PersonalThread_Delete = 4073,
  252.  
  253. Thread_Retrieve = 4080,
  254. Thread_Add = 4081,
  255. Thread_Edit = 4082,
  256. Thread_Delete = 4083,
  257.  
  258. //SubTopics
  259. SubTopic_Retireve = 4090,
  260. SubTopic_Add = 4091,
  261. SubTopic_Edit = 4092,
  262. SubTopic_Delete = 4093,
  263.  
  264. //SubTopics
  265. GeneralSubTopic_Retireve = 4100,
  266. GeneralSubTopic_Add = 4101,
  267. GeneralSubTopic_Edit = 4102,
  268. GeneralSubTopic_Delete = 4103,
  269.  
  270. //Topics
  271. Topic_Retrieve = 4110,
  272. Topic_Add = 4111,
  273. Topic_Edit = 4112,
  274. Topic_Delete = 4113,
  275.  
  276.  
  277. }
  278. }
  279. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement