sso

vm_models.go 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. package models
  2. type VMOrgPatients struct {
  3. ID int64 `gorm:"column:id" json:"id" form:"id"`
  4. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  5. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  6. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  7. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  8. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  9. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  10. Source int64 `gorm:"column:source" json:"source" form:"source"`
  11. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  12. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  13. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  14. Name string `gorm:"column:name" json:"name" form:"name"`
  15. Alias string `gorm:"column:alias" json:"alias" form:"alias"`
  16. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  17. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  18. NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
  19. MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
  20. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  21. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  22. ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
  23. HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
  24. HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
  25. HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
  26. Height int64 `gorm:"column:height" json:"height" form:"height"`
  27. BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
  28. Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
  29. HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
  30. EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
  31. Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
  32. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  33. HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
  34. RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
  35. RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
  36. HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
  37. WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
  38. UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
  39. Children int64 `gorm:"column:children" json:"children" form:"children"`
  40. ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
  41. IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
  42. FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
  43. FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
  44. PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
  45. PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
  46. PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
  47. HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
  48. InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
  49. InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
  50. TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
  51. AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
  52. HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
  53. Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  54. Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
  55. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  56. RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
  57. Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
  58. QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
  59. BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
  60. PatientComplains string `gorm:"column:patient_complains" json:"patient_complains"` // 主诉
  61. PresentHistory string `gorm:"column:present_history" json:"present_history"` // 现病史
  62. PastHistory string `gorm:"column:past_history" json:"past_history"` // 既往史
  63. Temperature float64 `gorm:"column:temperature" json:"temperature"` // 体格检查-体温
  64. Pulse int64 `gorm:"column:pulse" json:"pulse"` // 体格检查-脉搏
  65. Respiratory int64 `gorm:"column:respiratory" json:"respiratory"` // 体格检查-呼吸频率
  66. SBP int64 `gorm:"column:sbp" json:"sbp"` // 体格检查-收缩压
  67. DBP int64 `gorm:"column:dbp" json:"dbp"` // 体格检查-舒张压
  68. Status int64 `gorm:"column:status" json:"status" form:"status"`
  69. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  70. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  71. Age int64 `gorm:"column:age" json:"age"`
  72. InfectiousNextRecordTime int64 `gorm:"column:infectious_next_record_time" json:"infectious_next_record_time"`
  73. IsInfectious int64 `gorm:"column:is_infectious" json:"is_infectious"`
  74. RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle"`
  75. ResponseResult string `gorm:"column:response_result" json:"response_result"`
  76. IsOpenRemind int64 `gorm:"column:is_open_remind" json:"is_open_remind"`
  77. DialysisAge int64 `gorm:"column:dialysis_age" json:"dialysis_age" form:"dialysis_age"`
  78. ExpenseKind int64 `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
  79. TellPhone string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
  80. FirstTreatmentDate int64 `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
  81. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  82. }
  83. func (VMOrgPatients) TableName() string {
  84. return "xt_patients"
  85. }
  86. type VMDeviceGroup struct {
  87. ID int64 `gorm:"column:id" json:"id" form:"id"`
  88. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  89. Name string `gorm:"column:name" json:"name" form:"name"`
  90. Status int64 `gorm:"column:status" json:"status" form:"status"`
  91. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  92. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  93. }
  94. func (VMDeviceGroup) TableName() string {
  95. return "xt_device_group"
  96. }
  97. type VMDeviceZone struct {
  98. ID int64 `gorm:"column:id" json:"id" form:"id"`
  99. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  100. Name string `gorm:"column:name" json:"name" form:"name"`
  101. Type int64 `gorm:"column:type" json:"type" form:"type"`
  102. Status int64 `gorm:"column:status" json:"status" form:"status"`
  103. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  104. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  105. }
  106. func (VMDeviceZone) TableName() string {
  107. return "xt_device_zone"
  108. }
  109. type VMDeviceNumber struct {
  110. ID int64 `gorm:"column:id" json:"id" form:"id"`
  111. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  112. Number string `gorm:"column:number" json:"number" form:"number"`
  113. GroupId int64 `gorm:"column:group_id" json:"group_id" form:"group_id"`
  114. ZoneId int64 `gorm:"column:zone_id" json:"zone_id" form:"zone_id"`
  115. Status int64 `gorm:"column:status" json:"status" form:"status"`
  116. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  117. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  118. }
  119. func (VMDeviceNumber) TableName() string {
  120. return "xt_device_number"
  121. }
  122. type VMSchedule struct {
  123. ID int64 `gorm:"column:id" json:"id" form:"id"`
  124. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  125. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  126. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  127. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  128. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  129. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  130. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  131. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  132. Status int64 `gorm:"column:status" json:"status" form:"status"`
  133. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  134. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  135. }
  136. func (VMSchedule) TableName() string {
  137. return "xt_schedule"
  138. }
  139. type VMApp_Role struct {
  140. Id int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"`
  141. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id"`
  142. OrgId int64 `gorm:"column:org_id" json:"org_id"`
  143. Org []*Org `gorm:"ForeignKey:ID;AssociationForeignKey:OrgId" json:"orgs"`
  144. }
  145. func (VMApp_Role) TableName() string {
  146. return "sgj_user_admin_role"
  147. }
  148. type VMAdminUser struct {
  149. ID int64 `gorm:"PRIMARY_KEY;AUTO_INCREMENT" json:"id"` // 管理员用户 ID
  150. Org []*Org `gorm:"ForeignKey:Creator;AssociationForeignKey:ID" json:"orgs"`
  151. VMApp_Role []*VMApp_Role `gorm:"ForeignKey:AdminUserId;AssociationForeignKey:ID" json:"roles"`
  152. }
  153. func (VMAdminUser) TableName() string {
  154. return "sgj_user_admin"
  155. }
  156. type VMAdminBanner struct {
  157. ID int64 `gorm:"column:id" json:"id" form:"id"`
  158. Thumb string `gorm:"column:thumb" json:"thumb" form:"thumb"`
  159. Url string `gorm:"column:url" json:"url" form:"url"`
  160. Status int64 `gorm:"column:status" json:"status" form:"status"`
  161. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  162. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  163. Title string `gorm:"column:title" json:"title" form:"title"`
  164. Desc string `gorm:"column:desc" json:"desc" form:"desc"`
  165. }
  166. func (VMAdminBanner) TableName() string {
  167. return "sgj_admin_banner"
  168. }
  169. type VMPatientScheduleTemplateId struct {
  170. ID int64 `gorm:"column:id" json:"id" form:"id"`
  171. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  172. Status int64 `gorm:"column:status" json:"status" form:"status"`
  173. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  174. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  175. }
  176. func (VMPatientScheduleTemplateId) TableName() string {
  177. return "xt_patient_schedule_template_id"
  178. }
  179. type VMPatientScheduleTemplateItem struct {
  180. ID int64 `gorm:"column:id" json:"id" form:"id"`
  181. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  182. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  183. DeviceNumberId int64 `gorm:"column:device_number_id" json:"device_number_id" form:"device_number_id"`
  184. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  185. TreatMode int64 `gorm:"column:treat_mode" json:"treat_mode" form:"treat_mode"`
  186. Weekday int64 `gorm:"column:weekday" json:"weekday" form:"weekday"`
  187. TimeType int64 `gorm:"column:time_type" json:"time_type" form:"time_type"`
  188. Status int64 `gorm:"column:status" json:"status" form:"status"`
  189. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  190. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  191. }
  192. func (VMPatientScheduleTemplateItem) TableName() string {
  193. return "xt_patient_schedule_template_item"
  194. }
  195. type VMPatientScheduleTemplateMode struct {
  196. ID int64 `gorm:"column:id" json:"id" form:"id"`
  197. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  198. Mode int64 `gorm:"column:mode" json:"mode" form:"mode"`
  199. ExecuteTimes int64 `gorm:"column:execute_times" json:"execute_times" form:"execute_times"`
  200. Status int64 `gorm:"column:status" json:"status" form:"status"`
  201. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  202. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  203. }
  204. func (VMPatientScheduleTemplateMode) TableName() string {
  205. return "xt_patient_schedule_template_mode"
  206. }
  207. type VMDeviceMode struct {
  208. ID int64 `gorm:"column:id" json:"id" form:"id"`
  209. DeviceMode string `gorm:"column:device_mode" json:"device_mode" form:"device_mode"`
  210. Status int64 `gorm:"column:status" json:"status" form:"status"`
  211. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  212. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  213. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  214. }
  215. func (VMDeviceMode) TableName() string {
  216. return "xt_device_mode"
  217. }
  218. type VmDeviceAddmacher struct {
  219. ID int64 `gorm:"column:id" json:"id" form:"id"`
  220. SerialNumber string `gorm:"column:serial_number" json:"serial_number" form:"serial_number"`
  221. DeviceType int64 `gorm:"column:device_type" json:"device_type" form:"device_type"`
  222. BedNumber string `gorm:"column:bed_number" json:"bed_number" form:"bed_number"`
  223. DeviceName string `gorm:"column:device_name" json:"device_name" form:"device_name"`
  224. ManufactureFactory string `gorm:"column:manufacture_factory" json:"manufacture_factory" form:"manufacture_factory"`
  225. ServiceManufacturer string `gorm:"column:service_manufacturer" json:"service_manufacturer" form:"service_manufacturer"`
  226. UnitType int64 `gorm:"column:unit_type" json:"unit_type" form:"unit_type"`
  227. UseSection string `gorm:"column:use_section" json:"use_section" form:"use_section"`
  228. SectionNumber string `gorm:"column:section_number" json:"section_number" form:"section_number"`
  229. BuyDate int64 `gorm:"column:buy_date" json:"buy_date" form:"buy_date"`
  230. InstallDate int64 `gorm:"column:install_date" json:"install_date" form:"install_date"`
  231. StartDate int64 `gorm:"column:start_date" json:"start_date" form:"start_date"`
  232. MaintenaceEngineer string `gorm:"column:maintenace_engineer" json:"maintenace_engineer" form:"maintenace_engineer"`
  233. Telephone string `gorm:"column:telephone" json:"telephone" form:"telephone"`
  234. GuaranteeDate string `gorm:"column:guarantee_date" json:"guarantee_date" form:"guarantee_date"`
  235. MachineStatus int64 `gorm:"column:machine_status" json:"machine_status" form:"machine_status"`
  236. UserTotal string `gorm:"column:user_total" json:"user_total" form:"user_total"`
  237. DisinfectionMode int64 `gorm:"column:disinfection_mode" json:"disinfection_mode" form:"disinfection_mode"`
  238. Remarks string `gorm:"column:remarks" json:"remarks" form:"remarks"`
  239. RubbishDate int64 `gorm:"column:rubbish_date" json:"rubbish_date" form:"rubbish_date"`
  240. RubbishReason int64 `gorm:"column:rubbish_reason" json:"rubbish_reason" form:"rubbish_reason"`
  241. UserYear string `gorm:"column:user_year" json:"user_year" form:"user_year"`
  242. WorkTime string `gorm:"column:work_time" json:"work_time" form:"work_time"`
  243. ReversMode int64 `gorm:"column:revers_mode" json:"revers_mode" form:"revers_mode"`
  244. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  245. Status int64 `gorm:"column:status" json:"status" form:"status"`
  246. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  247. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  248. ZoneId int64 `gorm:"column:zone_id" json:"zone_id" form:"zone_id"`
  249. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  250. }
  251. func (VmDeviceAddmacher) TableName() string {
  252. return "xt_device_addmacher"
  253. }
  254. type VmDeviceTreatmentmode struct {
  255. ID int64 `gorm:"column:id" json:"id" form:"id"`
  256. MachineId int64 `gorm:"column:machine_id" json:"machine_id" form:"machine_id"`
  257. Status int64 `gorm:"column:status" json:"status" form:"status"`
  258. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  259. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  260. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  261. TreateMode int64 `gorm:"column:treate_mode" json:"treate_mode" form:"treate_mode"`
  262. }
  263. func (VmDeviceTreatmentmode) TableName() string {
  264. return "xt_device_treatmentmode"
  265. }
  266. type VMUserRoleAndPurview struct {
  267. ID int64 `gorm:"column:id" json:"id" form:"id"`
  268. RoleName string `gorm:"column:role_name" json:"role_name" form:"role_name"`
  269. RoleIntroduction string `gorm:"column:role_introduction" json:"role_introduction" form:"role_introduction"`
  270. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  271. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  272. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  273. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  274. Status int64 `gorm:"column:status" json:"status" form:"status"`
  275. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  276. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  277. Number int64 `gorm:"column:number" json:"number" form:"number"`
  278. PurviewIds string `gorm:"column:-" json:"purview_ids" form:"purview_ids"`
  279. FuncIds string `gorm:"column:-" json:"func_ids" form:"func_ids"`
  280. IsSystem int64 `gorm:"column:is_system" json:"is_system" form:"is_system"`
  281. }
  282. func (VMUserRoleAndPurview) TableName() string {
  283. return "sgj_user_role"
  284. }
  285. type VMGobalTemplate struct {
  286. ID int64 `gorm:"column:id" json:"id" form:"id"`
  287. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  288. TemplateId int64 `gorm:"column:template_id" json:"template_id" form:"template_id"`
  289. Status int64 `gorm:"column:status" json:"status" form:"status"`
  290. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  291. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  292. }
  293. func (VMGobalTemplate) TableName() string {
  294. return "xt_gobal_template"
  295. }