role_models.go 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. package models
  2. type Role struct {
  3. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"`
  4. RoleName string `gorm:"column:role_name" json:"name"`
  5. RoleIntro string `gorm:"column:role_introduction" json:"intro"`
  6. Creator int64 `json:"-"`
  7. OrgId int64 `gorm:"column:org_id" json:"-"`
  8. AppId int64 `gorm:"column:app_id" json:"-"`
  9. IsSuperAdmin bool `gorm:"column:is_super_admin" json:"is_super_admin"`
  10. Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用
  11. CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间
  12. ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间
  13. StaffNumber int64 `gorm:"-" json:"staff_number"`
  14. Number int64 `gorm:"number" json:"number"`
  15. IsSystem int64 `gorm:"column:is_system" json:"is_system" form:"is_system"`
  16. }
  17. func (Role) TableName() string {
  18. return "sgj_user_role"
  19. }
  20. type App_Roles struct {
  21. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"`
  22. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id"`
  23. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  24. AppId int64 `gorm:"column:app_id" json:"app_id"`
  25. RoleId int64 `gorm:"column:role_id" json:"role_id"`
  26. Avatar string `json:"avatar" json:"avatar"`
  27. UserName string `gorm:"column:user_name" json:"user_name"` // 用户名称
  28. Intro string `json:"intro"` // 简介
  29. UserType int8 `gorm:"column:user_type" json:"user_type"` // 用户类型(1.管理员;2.医生;3.护士;4.运营)
  30. UserTitle int8 `gorm:"column:user_title" json:"user_title"` // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管)
  31. Status int8 `json:"status"` // 状态 0.无效 1.有效
  32. CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间
  33. ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间
  34. Url string `gorm:"column:url" json:"url" form:"url"`
  35. }
  36. type App_Role struct {
  37. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"`
  38. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id"`
  39. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  40. AppId int64 `gorm:"column:app_id" json:"app_id"`
  41. RoleId int64 `gorm:"column:role_id" json:"role_id"`
  42. Avatar string `json:"avatar" json:"avatar"`
  43. UserName string `gorm:"column:user_name" json:"user_name"` // 用户名称
  44. Intro string `json:"intro"` // 简介
  45. UserType int8 `gorm:"column:user_type" json:"user_type"` // 用户类型(1.管理员;2.医生;3.护士;4.运营)
  46. UserTitle int8 `gorm:"column:user_title" json:"user_title"` // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管)
  47. Status int8 `json:"status"` // 状态 0.无效 1.有效
  48. CreateTime int64 `gorm:"column:ctime" json:"ctime"` // 创建时间
  49. ModifyTime int64 `gorm:"column:mtime" json:"mtime"` // 修改时间UserTitleName string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"`
  50. UserTitleName string `gorm:"column:user_title_name" json:"user_title_name" form:"user_title_name"`
  51. RoleIds string `gorm:"column:role_ids" json:"role_ids" form:"role_ids"`
  52. AdminUser AdminUser `gorm:"ForeignKey:ID;AssociationForeignKey:AdminUserId" json:"admin"`
  53. //AdminUser AdminUser `gorm:"ForeignKey:ID;AssociationForeignKey:AdminUserId" json:"admin"`
  54. IsSubSuperAdmin bool `gorm:"-" json:"is_sub_super_admin" form:"is_sub_super_admin"`
  55. Message string `gorm:"column:message" json:"message" form:"message"`
  56. Sex int64 `gorm:"column:sex" json:"sex" form:"sex"`
  57. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  58. Sort int64 `gorm:"column:sort" json:"sort" form:"sort"`
  59. IsSort int64 `gorm:"column:is_sort" json:"is_sort" form:"is_sort"`
  60. DepartmentId int64 `gorm:"column:department_id" json:"department_id" form:"department_id"`
  61. Department string `gorm:"column:department" json:"department" form:"department"`
  62. Age int64 `gorm:"column:age" json:"age" form:"age"`
  63. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  64. CardType int64 `gorm:"column:card_type" json:"card_type" form:"card_type"`
  65. IdCard string `gorm:"column:id_card" json:"id_card" form:"id_card"`
  66. Education int64 `gorm:"column:education" json:"education" form:"education"`
  67. StudyMajorName string `gorm:"column:study_major_name" json:"study_major_name" form:"study_major_name"`
  68. WorkMajorName string `gorm:"column:work_major_name" json:"work_major_name" form:"work_major_name"`
  69. RoleType int64 `gorm:"column:role_type" json:"role_type" form:"role_type"`
  70. MedicalCode string `gorm:"column:medical_code" json:"medical_code" form:"medical_code"`
  71. DoctorCode string `gorm:"column:doctor_code" json:"doctor_code" form:"doctor_code"`
  72. Licensing int64 `gorm:"column:licensing" json:"licensing" form:"licensing"`
  73. JobNumber string `gorm:"column:job_number" json:"job_number" form:"job_number"`
  74. PrescriptionQualificationIdentification int64 `gorm:"column:prescription_qualification_identification" json:"prescription_qualification_identification" form:"prescription_qualification_identification"`
  75. IdentificationOutpatients int64 `gorm:"column:identification_outpatients" json:"identification_outpatients" form:"identification_outpatients"`
  76. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  77. MedicalRangeCode int64 `gorm:"column:medical_range_code" json:"medical_range_code" form:"medical_range_code"`
  78. MedicalLevel int64 `gorm:"column:medical_level" json:"medical_level" form:"medical_level"`
  79. MedicalTypeJob int64 `gorm:"column:medical_type_job" json:"medical_type_job" form:"medical_type_job"`
  80. PharmacistRegistrationNumber string `gorm:"column:pharmacist_registration_number" json:"pharmacist_registration_number" form:"pharmacist_registration_number"`
  81. DoctorRangeCode int64 `gorm:"column:doctor_range_code" json:"doctor_range_code" form:"doctor_range_code"`
  82. DoctorLevel int64 `gorm:"column:doctor_level" json:"doctor_level" form:"doctor_level"`
  83. DoctorTypeJob int64 `gorm:"column:doctor_type_job" json:"doctor_type_job" form:"doctor_type_job"`
  84. DoctorNumber string `gorm:"column:doctor_number" json:"doctor_number" form:"doctor_number"`
  85. OutpatientIllnesscategory string `gorm:"column:outpatient_illness_category" json:"outpatient_illness_category" form:"outpatient_illness_category"`
  86. IsActive int64 `gorm:"column:is_active" json:"is_active" form:"is_active"`
  87. ActiveStatus int64 `gorm:"column:active_status" json:"active_status" form:"active_status"`
  88. }
  89. func (App_Role) TableName() string {
  90. return "sgj_user_admin_role"
  91. }
  92. var UserType = map[int]string{
  93. 1: "管理员",
  94. 2: "医生",
  95. 3: "护士",
  96. 4: "运营",
  97. }
  98. var UserTitle = map[int]string{
  99. 1: "医士",
  100. 2: "医师",
  101. 3: "住院医师",
  102. 4: "主治医师",
  103. 5: "副主任医师",
  104. 6: "主任医师",
  105. 7: "护士",
  106. 8: "护师",
  107. 9: "主管护师",
  108. 10: "副主任护师",
  109. 11: "主任护师",
  110. 12: "运营专员",
  111. 13: "运营主管",
  112. }
  113. type SgjUserRoleFuncPurview struct {
  114. ID int64 `gorm:"column:id" json:"id" form:"id"`
  115. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  116. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  117. RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"`
  118. PurviewIds string `gorm:"column:purview_ids" json:"purview_ids" form:"purview_ids"`
  119. Status int64 `gorm:"column:status" json:"status" form:"status"`
  120. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  121. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  122. }
  123. func (SgjUserRoleFuncPurview) TableName() string {
  124. return "sgj_user_role_func_purview"
  125. }
  126. type Roles struct {
  127. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"`
  128. RoleName string `gorm:"column:role_name" json:"role_name"`
  129. RoleIntro string `gorm:"column:role_introduction" json:"intro"`
  130. Creator int64 `json:"-"`
  131. OrgId int64 `gorm:"column:org_id" json:"-"`
  132. AppId int64 `gorm:"column:app_id" json:"-"`
  133. IsSuperAdmin bool `gorm:"column:is_super_admin" json:"is_super_admin"`
  134. Status int8 `json:"status"` // 状态 0.无效 1.有效 2.禁用
  135. CreateTime int64 `gorm:"column:ctime" json:"-"` // 创建时间
  136. ModifyTime int64 `gorm:"column:mtime" json:"-"` // 修改时间
  137. StaffNumber int64 `gorm:"-" json:"staff_number"`
  138. Number int64 `gorm:"column:number" json:"number" form:"number"`
  139. IsSystem int64 `gorm:"column:is_system" json:"is_system" form:"is_system"`
  140. }
  141. func (Roles) TableName() string {
  142. return "sgj_user_role"
  143. }
  144. type XtDialysisGatherSetting struct {
  145. ID int64 `gorm:"column:id" json:"id" form:"id"`
  146. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  147. IndexNumber int64 `gorm:"column:index_number" json:"index_number" form:"index_number"`
  148. Zone int64 `gorm:"column:zone" json:"zone" form:"zone"`
  149. Number int64 `gorm:"column:number" json:"number" form:"number"`
  150. Birth int64 `gorm:"column:birth" json:"birth" form:"birth"`
  151. Name int64 `gorm:"column:name" json:"name" form:"name"`
  152. Age int64 `gorm:"column:age" json:"age" form:"age"`
  153. ModeType int64 `gorm:"column:mode_type" json:"mode_type" form:"mode_type"`
  154. PrescriptionStatus int64 `gorm:"column:prescription_status" json:"prescription_status" form:"prescription_status"`
  155. AdmissionNumber int64 `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  156. DialysisNo int64 `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  157. DryWeight int64 `gorm:"column:dry_weight" json:"dry_weight" form:"dry_weight"`
  158. DialysisDialyszers int64 `gorm:"column:dialysis_dialyszers" json:"dialysis_dialyszers" form:"dialysis_dialyszers"`
  159. DialysisStrainer int64 `gorm:"column:dialysis_strainer" json:"dialysis_strainer" form:"dialysis_strainer"`
  160. DialysisIrrigation int64 `gorm:"column:dialysis_irrigation" json:"dialysis_irrigation" form:"dialysis_irrigation"`
  161. Calcium int64 `gorm:"column:calcium" json:"calcium" form:"calcium"`
  162. Kalium int64 `gorm:"column:kalium" json:"kalium" form:"kalium"`
  163. ChangeNurse int64 `gorm:"column:change_nurse" json:"change_nurse" form:"change_nurse"`
  164. PunctureNeedle int64 `gorm:"column:puncture_needle" json:"puncture_needle" form:"puncture_needle"`
  165. Anticoagulant int64 `gorm:"column:anticoagulant" json:"anticoagulant" form:"anticoagulant"`
  166. Tube int64 `gorm:"column:tube" json:"tube" form:"tube"`
  167. Cuhong int64 `gorm:"column:cuhong" json:"cuhong" form:"cuhong"`
  168. Zuoka int64 `gorm:"column:zuoka" json:"zuoka" form:"zuoka"`
  169. Zhetangtie int64 `gorm:"column:zhetangtie" json:"zhetangtie" form:"zhetangtie"`
  170. Paligu int64 `gorm:"column:paligu" json:"paligu" form:"paligu"`
  171. Guhuachun int64 `gorm:"column:guhuachun" json:"guhuachun" form:"guhuachun"`
  172. Niaojimei int64 `gorm:"column:niaojimei" json:"niaojimei" form:"niaojimei"`
  173. Putaosuangai int64 `gorm:"column:putaosuangai" json:"putaosuangai" form:"putaosuangai"`
  174. Jiaguan int64 `gorm:"column:jiaguan" json:"jiaguan" form:"jiaguan"`
  175. Xiongxiewutai int64 `gorm:"column:xiongxiewutai" json:"xiongxiewutai" form:"xiongxiewutai"`
  176. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  177. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  178. Status int64 `gorm:"column:status" json:"status" form:"status"`
  179. }
  180. func (XtDialysisGatherSetting) TableName() string {
  181. return "xt_dialysis_gather_setting"
  182. }