intergration_models.go 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. package models
  2. type MiddleSyncInfo struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  5. SyncTime int64 `gorm:"column:sync_time" json:"sync_time" form:"sync_time"`
  6. SyncResultType int `gorm:"column:sync_result_type" json:"sync_result_type" form:"sync_result_type"`
  7. SyncRsultRemark string `gorm:"column:sync_result_remark" json:"sync_result_remark" form:"sync_result_remark"`
  8. SyncTotalNum int64 `gorm:"column:sync_total_num" json:"sync_total_num" form:"sync_total_num"`
  9. SyncSuccessNum int64 `gorm:"column:sync_success_num" json:"sync_success_num" form:"sync_success_num"`
  10. SyncInfo string `gorm:"column:sync_info" json:"sync_info" form:"sync_info"`
  11. CreateTime int64 `gorm:"column:create_time" json:"create_time" form:"create_time"`
  12. UpdateTime int64 `gorm:"column:update_time" json:"update_time" form:"update_time"`
  13. }
  14. func (MiddleSyncInfo) TableName() string {
  15. return "xt_middle_sync_info"
  16. }
  17. type MiddleInterface struct {
  18. ID int64 `gorm:"column:id" json:"id" form:"id"`
  19. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  20. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  21. Pattern int `gorm:"column:pattern" json:"pattern" form:"pattern"`
  22. Dbhost string `gorm:"column:dbhost" json:"dbhost" form:"dbhost"`
  23. Dbuser string `gorm:"column:dbuser" json:"dbuser" form:"dbuser"`
  24. Dbpassword string `gorm:"column:dbpassword" json:"dbpassword" form:"dbpassword"`
  25. Dbname string `gorm:"column:dbname" json:"dbname" form:"dbname"`
  26. InterfaceUrl string `gorm:"column:interface_url" json:"interface_url" form:"interface_url"`
  27. InterFaceToken string `gorm:"column:interface_token" json:"interface_token" form:"interface_token"`
  28. AllowIp string `gorm:"column:allow_ip" json:"allow_ip" form:"allow_ip"`
  29. AllowToken string `gorm:"column:allow_token" json:"allow_token" form:"allow_token"`
  30. SyncFrequency int `gorm:"column:sync_frequency" json:"sync_frequency" form:"sync_frequency"`
  31. Status int `gorm:"column:status" json:"status" form:"status"`
  32. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  33. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  34. }
  35. func (MiddleInterface) TableName() string {
  36. return "xt_middle_interface"
  37. }
  38. type VMPatients struct {
  39. ID int64 `gorm:"column:id" json:"id" form:"id"`
  40. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  41. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  42. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  43. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  44. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  45. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  46. Source int64 `gorm:"column:source" json:"source" form:"source"`
  47. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  48. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  49. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  50. Name string `gorm:"column:name" json:"name" form:"name"`
  51. Alias string `gorm:"column:alias" json:"alias" form:"alias"`
  52. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  53. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  54. NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
  55. MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
  56. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  57. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  58. ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
  59. HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
  60. HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
  61. HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
  62. Height int64 `gorm:"column:height" json:"height" form:"height"`
  63. BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
  64. Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
  65. HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
  66. EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
  67. Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
  68. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  69. HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
  70. RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
  71. RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
  72. HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
  73. WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
  74. UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
  75. Children int64 `gorm:"column:children" json:"children" form:"children"`
  76. ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
  77. IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
  78. FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
  79. FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
  80. PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
  81. PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
  82. PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
  83. HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
  84. InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
  85. InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
  86. TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
  87. AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
  88. HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
  89. Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  90. Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
  91. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  92. RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
  93. Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
  94. QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
  95. BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
  96. PatientComplains string `gorm:"column:patient_complains" json:"patient_complains"` // 主诉
  97. PresentHistory string `gorm:"column:present_history" json:"present_history"` // 现病史
  98. PastHistory string `gorm:"column:past_history" json:"past_history"` // 既往史
  99. Temperature float64 `gorm:"column:temperature" json:"temperature"` // 体格检查-体温
  100. Pulse int64 `gorm:"column:pulse" json:"pulse"` // 体格检查-脉搏
  101. Respiratory int64 `gorm:"column:respiratory" json:"respiratory"` // 体格检查-呼吸频率
  102. SBP int64 `gorm:"column:sbp" json:"sbp"` // 体格检查-收缩压
  103. DBP int64 `gorm:"column:dbp" json:"dbp"` // 体格检查-舒张压
  104. Status int64 `gorm:"column:status" json:"status" form:"status"`
  105. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  106. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  107. DialysisSolutions []DialysisSolution `json:"solutions" gorm:"foreignkey:PatientId"`
  108. Age int64 `gorm:"column:age" json:"age"`
  109. Schedules []Schedule `json:"schedules" gorm:"foreignkey:PatientId"`
  110. Contagions []InfectiousDiseases `json:"contagions" gorm:"foreignkey:PatientId"`
  111. Diseases []ChronicDiseases `json:"diseases" gorm:"foreignkey:PatientId"`
  112. InfectiousNextRecordTime int64 `gorm:"column:infectious_next_record_time" json:"infectious_next_record_time"`
  113. IsInfectious int64 `gorm:"column:is_infectious" json:"is_infectious"`
  114. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle"`
  115. ResponseResult string `gorm:"column:response_result" json:"response_result"`
  116. IsOpenRemind int64 `gorm:"column:is_open_remind" json:"is_open_remind"`
  117. DialysisAge int64 `gorm:"column:dialysis_age" json:"dialysis_age" form:"dialysis_age"`
  118. ExpenseKind int64 `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
  119. TellPhone string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
  120. FirstTreatmentDate int64 `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
  121. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  122. VMHisPatients VMHisPatients `gorm:"ForeignKey:XtPatientId;AssociationForeignKey:ID" json:"his_patient"`
  123. UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
  124. }
  125. func (VMPatients) TableName() string {
  126. return "xt_patients"
  127. }
  128. type VMHisPatients struct {
  129. ID int64 `gorm:"column:id" json:"id" form:"id"`
  130. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  131. HisUserId string `gorm:"column:his_user_id" json:"his_user_id" form:"his_user_id"`
  132. XtPatientId int64 `gorm:"column:xt_patient_id" json:"xt_patient_id" form:"xt_patient_id"`
  133. }
  134. func (VMHisPatients) TableName() string {
  135. return "xt_middle_patients"
  136. }
  137. type HisPatients struct {
  138. ID int64 `gorm:"column:id" json:"id" form:"id"`
  139. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  140. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  141. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  142. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  143. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  144. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  145. Source int64 `gorm:"column:source" json:"source" form:"source"`
  146. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  147. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  148. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  149. Name string `gorm:"column:name" json:"name" form:"name"`
  150. Alias string `gorm:"column:alias" json:"alias" form:"alias"`
  151. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  152. MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
  153. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  154. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  155. ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
  156. HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
  157. HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
  158. HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
  159. Height int64 `gorm:"column:height" json:"height" form:"height"`
  160. BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
  161. Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
  162. HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
  163. EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
  164. Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
  165. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  166. HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
  167. RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
  168. RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
  169. HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
  170. WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
  171. UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
  172. Children int64 `gorm:"column:children" json:"children" form:"children"`
  173. ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
  174. IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
  175. FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
  176. FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
  177. PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
  178. PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
  179. PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
  180. HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
  181. InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
  182. InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
  183. TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
  184. AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
  185. HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
  186. Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  187. Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
  188. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  189. RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
  190. Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
  191. QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
  192. BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
  193. PatientComplains string `gorm:"column:patient_complains" json:"patient_complains" form:"patient_complains"`
  194. PresentHistory string `gorm:"column:present_history" json:"present_history" form:"present_history"`
  195. PastHistory string `gorm:"column:past_history" json:"past_history" form:"past_history"`
  196. Temperature float64 `gorm:"column:temperature" json:"temperature" form:"temperature"`
  197. Pulse int64 `gorm:"column:pulse" json:"pulse" form:"pulse"`
  198. Respiratory int64 `gorm:"column:respiratory" json:"respiratory" form:"respiratory"`
  199. Sbp int64 `gorm:"column:sbp" json:"sbp" form:"sbp"`
  200. Dbp int64 `gorm:"column:dbp" json:"dbp" form:"dbp"`
  201. Status int64 `gorm:"column:status" json:"status" form:"status"`
  202. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  203. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  204. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  205. NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
  206. Age int64 `gorm:"column:age" json:"age" form:"age"`
  207. InfectiousNextRecordTime int64 `gorm:"column:infectious_next_record_time" json:"infectious_next_record_time" form:"infectious_next_record_time"`
  208. IsInfectious int64 `gorm:"column:is_infectious" json:"is_infectious" form:"is_infectious"`
  209. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle" form:"remind_cycle"`
  210. ResponseResult string `gorm:"column:response_result" json:"response_result" form:"response_result"`
  211. IsOpenRemind int64 `gorm:"column:is_open_remind" json:"is_open_remind" form:"is_open_remind"`
  212. FirstTreatmentDate int64 `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
  213. DialysisAge int64 `gorm:"column:dialysis_age" json:"dialysis_age" form:"dialysis_age"`
  214. ExpenseKind int64 `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
  215. TellPhone string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
  216. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  217. HisUserId string `gorm:"column:his_user_id" json:"his_user_id" form:"his_user_id"`
  218. XtPatientId int64 `gorm:"column:xt_patient_id" json:"xt_patient_id" form:"xt_patient_id"`
  219. }
  220. func (HisPatients) TableName() string {
  221. return "xt_middle_patients"
  222. }
  223. type HisUserAdminRole struct {
  224. ID int64 `gorm:"column:id" json:"id" form:"id"`
  225. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  226. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  227. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  228. RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"`
  229. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  230. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  231. UserType int64 `gorm:"column:user_type" json:"user_type" form:"user_type"`
  232. UserTitle int64 `gorm:"column:user_title" json:"user_title" form:"user_title"`
  233. Intro string `gorm:"column:intro" json:"intro" form:"intro"`
  234. Status int64 `gorm:"column:status" json:"status" form:"status"`
  235. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  236. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  237. HisUserId string `gorm:"column:his_user_id" json:"his_user_id" form:"his_user_id"`
  238. XtRoleId int64 `gorm:"column:xt_role_id" json:"xt_role_id" form:"xt_role_id"`
  239. }
  240. func (HisUserAdminRole) TableName() string {
  241. return "xt_middle_user_admin_role"
  242. }
  243. type VMUserAdminRole struct {
  244. ID int64 `gorm:"column:id" json:"id" form:"id"`
  245. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  246. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  247. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  248. RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"`
  249. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  250. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  251. UserType int64 `gorm:"column:user_type" json:"user_type" form:"user_type"`
  252. UserTitle int64 `gorm:"column:user_title" json:"user_title" form:"user_title"`
  253. Intro string `gorm:"column:intro" json:"intro" form:"intro"`
  254. Status int64 `gorm:"column:status" json:"status" form:"status"`
  255. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  256. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  257. VMUserAdmin VMUserAdmin `gorm:"ForeignKey:ID;AssociationForeignKey:AdminUserId" json:"admin"`
  258. HisUserAdminRole HisUserAdminRole `gorm:"ForeignKey:XtRoleId;AssociationForeignKey:ID" json:"middle_admin_role"`
  259. VMUserRole VMUserRole `gorm:"ForeignKey:ID;AssociationForeignKey:RoleId" json:"role"`
  260. }
  261. func (VMUserAdminRole) TableName() string {
  262. return "sgj_user_admin_role"
  263. }
  264. type VMUserAdmin struct {
  265. ID int64 `gorm:"column:id" json:"id" form:"id"`
  266. Mobile string `gorm:"column:mobile" json:"mobile" form:"mobile"`
  267. Password string `gorm:"column:password" json:"password" form:"password"`
  268. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  269. Status int64 `gorm:"column:status" json:"status" form:"status"`
  270. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  271. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  272. Source int64 `gorm:"column:source" json:"source" form:"source"`
  273. Ttype int64 `gorm:"column:ttype" json:"ttype" form:"ttype"`
  274. Ttid int64 `gorm:"column:ttid" json:"ttid" form:"ttid"`
  275. Tuid int64 `gorm:"column:tuid" json:"tuid" form:"tuid"`
  276. }
  277. func (VMUserAdmin) TableName() string {
  278. return "sgj_user_admin"
  279. }
  280. type VMUserRole struct {
  281. ID int64 `gorm:"column:id" json:"id" form:"id"`
  282. RoleName string `gorm:"column:role_name" json:"role_name" form:"role_name"`
  283. RoleIntroduction string `gorm:"column:role_introduction" json:"role_introduction" form:"role_introduction"`
  284. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  285. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  286. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  287. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  288. Status int64 `gorm:"column:status" json:"status" form:"status"`
  289. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  290. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  291. }
  292. func (VMUserRole) TableName() string {
  293. return "sgj_user_role"
  294. }