login_model.go 46KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. package models
  2. import "time"
  3. type SgjUserAdmin struct {
  4. ID int64 `gorm:"column:id" json:"id" form:"id"`
  5. Mobile string `gorm:"column:mobile" json:"mobile" form:"mobile"`
  6. Password string `gorm:"column:password" json:"password" form:"password"`
  7. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  8. Status int64 `gorm:"column:status" json:"status" form:"status"`
  9. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  10. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  11. Source int64 `gorm:"column:source" json:"source" form:"source"`
  12. Ttype int64 `gorm:"column:ttype" json:"ttype" form:"ttype"`
  13. Ttid int64 `gorm:"column:ttid" json:"ttid" form:"ttid"`
  14. Tuid int64 `gorm:"column:tuid" json:"tuid" form:"tuid"`
  15. }
  16. func (SgjUserAdmin) TableName() string {
  17. return "sgj_user_admin"
  18. }
  19. type SgjPatientArticles struct {
  20. ID int64 `gorm:"column:id" json:"id" form:"id"`
  21. Title string `gorm:"column:title" json:"title" form:"title"`
  22. Summary string `gorm:"column:summary" json:"summary" form:"summary"`
  23. Content string `gorm:"column:content" json:"content" form:"content"`
  24. Type int64 `gorm:"column:type" json:"type" form:"type"`
  25. Num int64 `gorm:"column:num" json:"num" form:"num"`
  26. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  27. RealReadNum int64 `gorm:"column:real_read_num" json:"real_read_num" form:"real_read_num"`
  28. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  29. ClassId int64 `gorm:"column:class_id" json:"class_id" form:"class_id"`
  30. Author string `gorm:"column:author" json:"author" form:"author"`
  31. Status int64 `gorm:"column:status" json:"status" form:"status"`
  32. Reason string `gorm:"column:reason" json:"reason" form:"reason"`
  33. StarNum int64 `gorm:"column:star_num" json:"star_num" form:"star_num"`
  34. CommentNum int64 `gorm:"column:comment_num" json:"comment_num" form:"comment_num"`
  35. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  36. ArticleStatus int64 `gorm:"column:article_status" json:"article_status" form:"article_status"`
  37. Imgs string `gorm:"column:imgs" json:"imgs" form:"imgs"`
  38. VideoUrl string `gorm:"column:video_url" json:"video_url" form:"video_url"`
  39. Source int64 `gorm:"column:source" json:"source" form:"source"`
  40. CategoryId int64 `gorm:"column:category_id" json:"category_id" form:"category_id"`
  41. Ttid int64 `gorm:"column:ttid" json:"ttid" form:"ttid"`
  42. Ttype int64 `gorm:"column:ttype" json:"ttype" form:"ttype"`
  43. Toid int64 `gorm:"column:toid" json:"toid" form:"toid"`
  44. }
  45. func (SgjPatientArticles) TableName() string {
  46. return "sgj_patient_articles"
  47. }
  48. type SgjUserDistrict struct {
  49. ID int64 `gorm:"column:id" json:"id" form:"id"`
  50. Name string `gorm:"column:name" json:"name" form:"name"`
  51. Level int64 `gorm:"column:level" json:"level" form:"level"`
  52. Upid int64 `gorm:"column:upid" json:"upid" form:"upid"`
  53. Path string `gorm:"column:path" json:"path" form:"path"`
  54. Namepath string `gorm:"column:namepath" json:"namepath" form:"namepath"`
  55. Initial string `gorm:"column:initial" json:"initial" form:"initial"`
  56. Longitude string `gorm:"column:longitude" json:"longitude" form:"longitude"`
  57. Latitude string `gorm:"column:latitude" json:"latitude" form:"latitude"`
  58. Adcode int64 `gorm:"column:adcode" json:"adcode" form:"adcode"`
  59. }
  60. func (SgjUserDistrict) TableName() string {
  61. return "sgj_user_district"
  62. }
  63. type SgjUserOrg struct {
  64. ID int64 `gorm:"column:id" json:"id" form:"id"`
  65. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  66. OrgName string `gorm:"column:org_name" json:"org_name" form:"org_name"`
  67. OrgShortName string `gorm:"column:org_short_name" json:"org_short_name" form:"org_short_name"`
  68. OrgLogo string `gorm:"column:org_logo" json:"org_logo" form:"org_logo"`
  69. OrgIntroduction string `gorm:"column:org_introduction" json:"org_introduction" form:"org_introduction"`
  70. Illness string `gorm:"column:illness" json:"illness" form:"illness"`
  71. Province int64 `gorm:"column:province" json:"province" form:"province"`
  72. City int64 `gorm:"column:city" json:"city" form:"city"`
  73. District int64 `gorm:"column:district" json:"district" form:"district"`
  74. Address string `gorm:"column:address" json:"address" form:"address"`
  75. Longitude string `gorm:"column:longitude" json:"longitude" form:"longitude"`
  76. Latitude string `gorm:"column:latitude" json:"latitude" form:"latitude"`
  77. OrgType int64 `gorm:"column:org_type" json:"org_type" form:"org_type"`
  78. Comments int64 `gorm:"column:comments" json:"comments" form:"comments"`
  79. Evaluate float64 `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  80. Gallery string `gorm:"column:gallery" json:"gallery" form:"gallery"`
  81. BusinessWeek string `gorm:"column:business_week" json:"business_week" form:"business_week"`
  82. BusinessTime string `gorm:"column:business_time" json:"business_time" form:"business_time"`
  83. ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
  84. Telephone string `gorm:"column:telephone" json:"telephone" form:"telephone"`
  85. Claim int64 `gorm:"column:claim" json:"claim" form:"claim"`
  86. OperatingState int64 `gorm:"column:operating_state" json:"operating_state" form:"operating_state"`
  87. Status int64 `gorm:"column:status" json:"status" form:"status"`
  88. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  89. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  90. Source int64 `gorm:"column:source" json:"source" form:"source"`
  91. Ttype int64 `gorm:"column:ttype" json:"ttype" form:"ttype"`
  92. Ttid int64 `gorm:"column:ttid" json:"ttid" form:"ttid"`
  93. Tuid int64 `gorm:"column:tuid" json:"tuid" form:"tuid"`
  94. Reason string `gorm:"column:reason" json:"reason" form:"reason"`
  95. Level int64 `gorm:"column:level" json:"level" form:"level"`
  96. Website string `gorm:"column:website" json:"website" form:"website"`
  97. Import int64 `gorm:"column:import" json:"import" form:"import"`
  98. Sortno int64 `gorm:"column:sortno" json:"sortno" form:"sortno"`
  99. }
  100. func (SgjUserOrg) TableName() string {
  101. return "sgj_user_org"
  102. }
  103. type SgjUserOrgType struct {
  104. ID int64 `gorm:"column:id" json:"id" form:"id"`
  105. Name string `gorm:"column:name" json:"name" form:"name"`
  106. ShortName string `gorm:"column:short_name" json:"short_name" form:"short_name"`
  107. Pid int64 `gorm:"column:pid" json:"pid" form:"pid"`
  108. Status int64 `gorm:"column:status" json:"status" form:"status"`
  109. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  110. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  111. SortNo int64 `gorm:"column:sort_no" json:"sort_no" form:"sort_no"`
  112. }
  113. func (SgjUserOrgType) TableName() string {
  114. return "sgj_user_org_type"
  115. }
  116. type Patients struct {
  117. ID int64 `gorm:"column:id" json:"id" form:"id"`
  118. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  119. UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
  120. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  121. PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
  122. DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
  123. AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
  124. Source int64 `gorm:"column:source" json:"source" form:"source"`
  125. Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
  126. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  127. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  128. Name string `gorm:"column:name" json:"name" form:"name"`
  129. Alias string `gorm:"column:alias" json:"alias" form:"alias"`
  130. Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
  131. MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
  132. IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
  133. Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
  134. ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
  135. HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
  136. HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
  137. HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
  138. Height int64 `gorm:"column:height" json:"height" form:"height"`
  139. BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
  140. Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
  141. HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
  142. EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
  143. Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
  144. Phone string `gorm:"column:phone" json:"phone" form:"phone"`
  145. HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
  146. RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
  147. RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
  148. HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
  149. WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
  150. UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
  151. Children int64 `gorm:"column:children" json:"children" form:"children"`
  152. ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
  153. IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
  154. FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
  155. FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
  156. PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
  157. PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
  158. PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
  159. HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
  160. InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
  161. InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
  162. TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
  163. AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
  164. HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
  165. Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
  166. Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
  167. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  168. RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
  169. Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
  170. QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
  171. BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
  172. PatientComplains string `gorm:"column:patient_complains" json:"patient_complains" form:"patient_complains"`
  173. PresentHistory string `gorm:"column:present_history" json:"present_history" form:"present_history"`
  174. PastHistory string `gorm:"column:past_history" json:"past_history" form:"past_history"`
  175. Temperature float64 `gorm:"column:temperature" json:"temperature" form:"temperature"`
  176. Pulse int64 `gorm:"column:pulse" json:"pulse" form:"pulse"`
  177. Respiratory int64 `gorm:"column:respiratory" json:"respiratory" form:"respiratory"`
  178. Sbp int64 `gorm:"column:sbp" json:"sbp" form:"sbp"`
  179. Dbp int64 `gorm:"column:dbp" json:"dbp" form:"dbp"`
  180. Status int64 `gorm:"column:status" json:"status" form:"status"`
  181. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  182. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  183. Nation string `gorm:"column:nation" json:"nation" form:"nation"`
  184. NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
  185. Age int64 `gorm:"column:age" json:"age" form:"age"`
  186. }
  187. func (Patients) TableName() string {
  188. return "xt_patients"
  189. }
  190. type DoctorAdvice struct {
  191. ID int64 `gorm:"column:id" json:"id" form:"id"`
  192. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  193. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  194. AdviceType int64 `gorm:"column:advice_type" json:"advice_type" form:"advice_type"`
  195. AdviceDate int64 `gorm:"column:advice_date" json:"advice_date" form:"advice_date"`
  196. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  197. AdviceName string `gorm:"column:advice_name" json:"advice_name" form:"advice_name"`
  198. AdviceDesc string `gorm:"column:advice_desc" json:"advice_desc" form:"advice_desc"`
  199. ReminderDate int64 `gorm:"column:reminder_date" json:"reminder_date" form:"reminder_date"`
  200. SingleDose float64 `gorm:"column:single_dose" json:"single_dose" form:"single_dose"`
  201. SingleDoseUnit string `gorm:"column:single_dose_unit" json:"single_dose_unit" form:"single_dose_unit"`
  202. PrescribingNumber float64 `gorm:"column:prescribing_number" json:"prescribing_number" form:"prescribing_number"`
  203. PrescribingNumberUnit string `gorm:"column:prescribing_number_unit" json:"prescribing_number_unit" form:"prescribing_number_unit"`
  204. DeliveryWay string `gorm:"column:delivery_way" json:"delivery_way" form:"delivery_way"`
  205. ExecutionFrequency string `gorm:"column:execution_frequency" json:"execution_frequency" form:"execution_frequency"`
  206. AdviceDoctor int64 `gorm:"column:advice_doctor" json:"advice_doctor" form:"advice_doctor"`
  207. Status int64 `gorm:"column:status" json:"status" form:"status"`
  208. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  209. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  210. AdviceAffirm string `gorm:"column:advice_affirm" json:"advice_affirm" form:"advice_affirm"`
  211. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  212. StopTime int64 `gorm:"column:stop_time" json:"stop_time" form:"stop_time"`
  213. StopReason string `gorm:"column:stop_reason" json:"stop_reason" form:"stop_reason"`
  214. StopDoctor int64 `gorm:"column:stop_doctor" json:"stop_doctor" form:"stop_doctor"`
  215. StopState int64 `gorm:"column:stop_state" json:"stop_state" form:"stop_state"`
  216. ParentId int64 `gorm:"column:parent_id" json:"parent_id" form:"parent_id"`
  217. ExecutionTime int64 `gorm:"column:execution_time" json:"execution_time" form:"execution_time"`
  218. ExecutionStaff int64 `gorm:"column:execution_staff" json:"execution_staff" form:"execution_staff"`
  219. ExecutionState int64 `gorm:"column:execution_state" json:"execution_state" form:"execution_state"`
  220. Checker int64 `gorm:"column:checker" json:"checker" form:"checker"`
  221. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  222. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  223. CheckTime int64 `gorm:"column:check_time" json:"check_time" form:"check_time"`
  224. CheckState int64 `gorm:"column:check_state" json:"check_state" form:"check_state"`
  225. DrugSpec float64 `gorm:"column:drug_spec" json:"drug_spec" form:"drug_spec"`
  226. DrugSpecUnit string `gorm:"column:drug_spec_unit" json:"drug_spec_unit" form:"drug_spec_unit"`
  227. Groupno int64 `gorm:"column:groupno" json:"groupno" form:"groupno"`
  228. }
  229. func (DoctorAdvice) TableName() string {
  230. return "xt_doctor_advice"
  231. }
  232. type SMSBatch struct {
  233. ID int64 `gorm:"column:id"`
  234. OrgID int64 `gorm:"column:org_id"` // 机构 ID
  235. TemplateID int64 `gorm:"column:sms_template_id"` // 对应短信平台上的模板 ID
  236. Autograph string // 短信签名
  237. Params string // 模板参数,以“,”隔开
  238. FullContent string `gorm:"column:full_content"` // 完整短信内容
  239. Mobiles string // 接收手机号,以“,”隔开
  240. SendTime int64 `gorm:"column:send_time"` // 发送时间
  241. Status int8 // 状态: 1.待审核 2.审核未通过 3.未发送 4.已发送 5.发送失败
  242. CreateTime int64 `gorm:"column:ctime"` // 创建时间
  243. ModifyTime int64 `gorm:"column:mtime"` // 修改时间
  244. }
  245. func (SMSBatch) TableName() string {
  246. return "sgj_patient_sms_batch"
  247. }
  248. type SMSSendStatus struct {
  249. ID int64 `gorm:"column:id"`
  250. BatchID int64 `gorm:"batch_id"` // 批次 ID,对应 SMSBatch.ID
  251. Mobile string // 接收手机号
  252. Status int8 // 发送结果状态: 0.失败 1.成功
  253. Code string // 短信平台返回的错误码
  254. Msg string // 短信平台返回的错误信息
  255. CreateTime int64 `gorm:"column:ctime"` // 创建时间
  256. ModifyTime int64 `gorm:"column:mtime"` // 修改时间
  257. }
  258. func (SMSSendStatus) TableName() string {
  259. return "sgj_patient_sms_send_status"
  260. }
  261. type SMSTemplate struct {
  262. ID int64 `gorm:"column:id"`
  263. TemplateType int8 `gorm:"column:template_type"` // 模板类型 1.默认模板 2.自定义模板
  264. TemplateID int64 `gorm:"column:template_id"` // 短信平台上的模板 id
  265. MessageType int8 `gorm:"column:message_type"` // 短信类型 1.通知短信 2.服务短信
  266. Content string // 模板内容
  267. // ParamTypes string `gorm:"column:param_types"` // 字段因业务没有采用默认模板的方式而弃用了!!!! 模板内容里的参数类型:1,2,3 。参数类型以逗号隔开,位置代表了参数‘{n+1}’,类型暂时有:1.用户名 2.商家简称 3.链接 4.商品名称 5.活动名称 6.验证码。(自定义模板是没有值的,因为它没有参数)
  268. Autograph string // 短信签名
  269. OrgID int64 `gorm:"column:org_id"` // 模板所属机构(自定义模板才有值)
  270. Status int8 // 模板状态 0.无效 1.有效 2.审核中
  271. CreateTime int64 `gorm:"column:ctime"` // 创建时间
  272. ModifyTime int64 `gorm:"column:mtime"` // 修改时间
  273. }
  274. func (SMSTemplate) TableName() string {
  275. return "sgj_patient_sms_template"
  276. }
  277. const (
  278. SMSBatchStatusInReview = int8(1)
  279. SMSBatchStatusUnapproved = int8(2)
  280. SMSBatchStatusUnsend = int8(3)
  281. SMSBatchStatusDidSend = int8(4)
  282. SMSBatchStatusSendFailed = int8(5)
  283. SMSBatchStatusSending = int8(6)
  284. )
  285. type UserSMSFreeLimit struct {
  286. ID int64 `gorm:"column:id"`
  287. OrgID int64 `gorm:"column:org_id"` // 机构 ID
  288. TotalCount int `gorm:"column:total_count"` // 免费额度,单位:条,下同
  289. UsedCount int `gorm:"column:used_count"` // 已用额度
  290. ValidMonth string `gorm:"column:valid_month"` // 生效月份,格式:201804
  291. Status int8 // 状态 0.无效 1.有效
  292. CreateTime int64 `gorm:"column:ctime"` // 创建时间
  293. ModifyTime int64 `gorm:"column:mtime"` // 修改时间
  294. }
  295. func (UserSMSFreeLimit) TableName() string {
  296. return "sgj_patient_user_sms_free_limit"
  297. }
  298. type PatientCourseOfDiseases struct {
  299. ID int64 `gorm:"column:id" json:"id" form:"id"`
  300. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  301. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  302. Recorder int64 `gorm:"column:recorder" json:"recorder" form:"recorder"`
  303. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  304. Content string `gorm:"column:content" json:"content" form:"content"`
  305. Status int64 `gorm:"column:status" json:"status" form:"status"`
  306. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  307. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  308. Title string `gorm:"column:title" json:"title" form:"title"`
  309. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  310. }
  311. type PatientCourseOfDisease struct {
  312. ID int64 `gorm:"column:id" json:"id" form:"id"`
  313. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  314. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  315. Recorder int64 `gorm:"column:recorder" json:"recorder" form:"recorder"`
  316. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  317. Content string `gorm:"column:content" json:"content" form:"content"`
  318. Status int64 `gorm:"column:status" json:"status" form:"status"`
  319. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  320. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  321. Title string `gorm:"column:title" json:"title" form:"title"`
  322. }
  323. func (PatientCourseOfDisease) TableName() string {
  324. return "xt_patient_course_of_disease"
  325. }
  326. //宣教信息
  327. type TreatmentSummary struct {
  328. ID int64 `gorm:"column:id" json:"id" form:"id"`
  329. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  330. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  331. AssessmentDate int64 `gorm:"column:assessment_date" json:"assessment_date" form:"assessment_date"`
  332. DialysisOrderId int64 `gorm:"column:dialysis_order_id" json:"dialysis_order_id" form:"dialysis_order_id"`
  333. Mission string `gorm:"column:mission" json:"mission" form:"mission"`
  334. DialysisSummary string `gorm:"column:dialysis_summary" json:"dialysis_summary" form:"dialysis_summary"`
  335. Change int64 `gorm:"column:change" json:"change" form:"change"`
  336. SjNurse int64 `gorm:"column:sj_nurse" json:"sj_nurse" form:"sj_nurse"`
  337. ZlNurse int64 `gorm:"column:zl_nurse" json:"zl_nurse" form:"zl_nurse"`
  338. HdNurse int64 `gorm:"column:hd_nurse" json:"hd_nurse" form:"hd_nurse"`
  339. XjNurse int64 `gorm:"column:xj_nurse" json:"xj_nurse" form:"xj_nurse"`
  340. ZlDoctor int64 `gorm:"column:zl_doctor" json:"zl_doctor" form:"zl_doctor"`
  341. ChannelImage string `gorm:"column:channel_image" json:"channel_image" form:"channel_image"`
  342. Puncture string `gorm:"column:puncture" json:"puncture" form:"puncture"`
  343. PunctureNeedle string `gorm:"column:puncture_needle" json:"puncture_needle" form:"puncture_needle"`
  344. PunctureDirection string `gorm:"column:puncture_direction" json:"puncture_direction" form:"puncture_direction"`
  345. Status int64 `gorm:"column:status" json:"status" form:"status"`
  346. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  347. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  348. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  349. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  350. }
  351. func (TreatmentSummary) TableName() string {
  352. return "xt_treatment_summary"
  353. }
  354. type UserOrgApp struct {
  355. ID int64 `gorm:"column:id" json:"id" form:"id"`
  356. AppType int64 `gorm:"column:app_type" json:"app_type" form:"app_type"`
  357. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  358. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  359. OpenStatus int64 `gorm:"column:open_status" json:"open_status" form:"open_status"`
  360. Status int64 `gorm:"column:status" json:"status" form:"status"`
  361. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  362. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  363. }
  364. func (UserOrgApp) TableName() string {
  365. return "sgj_user_org_app"
  366. }
  367. type UserRole struct {
  368. ID int64 `gorm:"column:id" json:"id" form:"id"`
  369. RoleName string `gorm:"column:role_name" json:"role_name" form:"role_name"`
  370. RoleIntroduction string `gorm:"column:role_introduction" json:"role_introduction" form:"role_introduction"`
  371. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  372. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  373. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  374. IsSuperAdmin int64 `gorm:"column:is_super_admin" json:"is_super_admin" form:"is_super_admin"`
  375. Status int64 `gorm:"column:status" json:"status" form:"status"`
  376. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  377. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  378. }
  379. func (UserRole) TableName() string {
  380. return "sgj_user_role"
  381. }
  382. type UserAdminRole struct {
  383. ID int64 `gorm:"column:id" json:"id" form:"id"`
  384. AdminUserId int64 `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`
  385. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  386. AppId int64 `gorm:"column:app_id" json:"app_id" form:"app_id"`
  387. RoleId int64 `gorm:"column:role_id" json:"role_id" form:"role_id"`
  388. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  389. Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
  390. UserType int64 `gorm:"column:user_type" json:"user_type" form:"user_type"`
  391. UserTitle int64 `gorm:"column:user_title" json:"user_title" form:"user_title"`
  392. Intro string `gorm:"column:intro" json:"intro" form:"intro"`
  393. Status int64 `gorm:"column:status" json:"status" form:"status"`
  394. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  395. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  396. }
  397. func (UserAdminRole) TableName() string {
  398. return "sgj_user_admin_role"
  399. }
  400. type PatientRescueRecords struct {
  401. ID int64 `gorm:"column:id" json:"id" form:"id"`
  402. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  403. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  404. Recorder int64 `gorm:"column:recorder" json:"recorder" form:"recorder"`
  405. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  406. Content string `gorm:"column:content" json:"content" form:"content"`
  407. Status int64 `gorm:"column:status" json:"status" form:"status"`
  408. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  409. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  410. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  411. }
  412. type PatientRescueRecord struct {
  413. ID int64 `gorm:"column:id" json:"id" form:"id"`
  414. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  415. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  416. Recorder int64 `gorm:"column:recorder" json:"recorder" form:"recorder"`
  417. RecordTime int64 `gorm:"column:record_time" json:"record_time" form:"record_time"`
  418. Content string `gorm:"column:content" json:"content" form:"content"`
  419. Status int64 `gorm:"column:status" json:"status" form:"status"`
  420. Ctime int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
  421. Mtime int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
  422. }
  423. func (PatientRescueRecord) TableName() string {
  424. return "xt_patient_rescue_record"
  425. }
  426. //长期处方
  427. type DialysisPrescription struct {
  428. ID int64 `gorm:"column:id" json:"id" form:"id"`
  429. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  430. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  431. Dialyzer int64 `gorm:"column:dialyzer" json:"dialyzer" form:"dialyzer"`
  432. MachineType string `gorm:"column:machine_type" json:"machine_type" form:"machine_type"`
  433. DewaterAmount float64 `gorm:"column:dewater_amount" json:"dewater_amount" form:"dewater_amount"`
  434. DialyzerPerfusionApparatus string `gorm:"column:dialyzer_perfusion_apparatus" json:"dialyzer_perfusion_apparatus" form:"dialyzer_perfusion_apparatus"`
  435. PrescriptionDewatering float64 `gorm:"column:prescription_dewatering" json:"prescription_dewatering" form:"prescription_dewatering"`
  436. Anticoagulant int64 `gorm:"column:anticoagulant" json:"anticoagulant" form:"anticoagulant"`
  437. AnticoagulantShouji float64 `gorm:"column:anticoagulant_shouji" json:"anticoagulant_shouji" form:"anticoagulant_shouji"`
  438. AnticoagulantWeichi float64 `gorm:"column:anticoagulant_weichi" json:"anticoagulant_weichi" form:"anticoagulant_weichi"`
  439. AnticoagulantZongliang float64 `gorm:"column:anticoagulant_zongliang" json:"anticoagulant_zongliang" form:"anticoagulant_zongliang"`
  440. AnticoagulantGaimingcheng string `gorm:"column:anticoagulant_gaimingcheng" json:"anticoagulant_gaimingcheng" form:"anticoagulant_gaimingcheng"`
  441. AnticoagulantGaijiliang string `gorm:"column:anticoagulant_gaijiliang" json:"anticoagulant_gaijiliang" form:"anticoagulant_gaijiliang"`
  442. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  443. DialysisDurationHour int64 `gorm:"column:dialysis_duration_hour" json:"dialysis_duration_hour" form:"dialysis_duration_hour"`
  444. DialysisDurationMinute int64 `gorm:"column:dialysis_duration_minute" json:"dialysis_duration_minute" form:"dialysis_duration_minute"`
  445. DialysisDuration float64 `gorm:"column:dialysis_duration" json:"dialysis_duration" form:"dialysis_duration"`
  446. ReplacementTotal float64 `gorm:"column:replacement_total" json:"replacement_total" form:"replacement_total"`
  447. ReplacementWay int64 `gorm:"column:replacement_way" json:"replacement_way" form:"replacement_way"`
  448. HemodialysisMachine int64 `gorm:"column:hemodialysis_machine" json:"hemodialysis_machine" form:"hemodialysis_machine"`
  449. BloodFilter int64 `gorm:"column:blood_filter" json:"blood_filter" form:"blood_filter"`
  450. PerfusionApparatus int64 `gorm:"column:perfusion_apparatus" json:"perfusion_apparatus" form:"perfusion_apparatus"`
  451. DryWeight float64 `gorm:"column:dry_weight" json:"dry_weight" form:"dry_weight"`
  452. VascularAccessMode int64 `gorm:"column:vascular_access_mode" json:"vascular_access_mode" form:"vascular_access_mode"`
  453. VascularAccess int64 `gorm:"column:vascular_access" json:"vascular_access" form:"vascular_access"`
  454. BloodFlowVolume float64 `gorm:"column:blood_flow_volume" json:"blood_flow_volume" form:"blood_flow_volume"`
  455. DialysateFlow float64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
  456. DisplaceLiqui float64 `gorm:"column:displace_liqui" json:"displace_liqui" form:"displace_liqui"`
  457. Kalium float64 `gorm:"column:kalium" json:"kalium" form:"kalium"`
  458. Sodium float64 `gorm:"column:sodium" json:"sodium" form:"sodium"`
  459. Calcium float64 `gorm:"column:calcium" json:"calcium" form:"calcium"`
  460. Bicarbonate float64 `gorm:"column:bicarbonate" json:"bicarbonate" form:"bicarbonate"`
  461. Glucose float64 `gorm:"column:glucose" json:"glucose" form:"glucose"`
  462. DialysateTemperature float64 `gorm:"column:dialysate_temperature" json:"dialysate_temperature" form:"dialysate_temperature"`
  463. Conductivity float64 `gorm:"column:conductivity" json:"conductivity" form:"conductivity"`
  464. PrescriptionDoctor int64 `gorm:"column:prescription_doctor" json:"prescription_doctor" form:"prescription_doctor"`
  465. Creater int64 `gorm:"column:creater" json:"creater" form:"creater"`
  466. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  467. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  468. Status int64 `gorm:"column:status" json:"status" form:"status"`
  469. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  470. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  471. RecordDate int64 `gorm:"column:record_date" json:"record_date" form:"record_date"`
  472. RecordId int64 `gorm:"column:record_id" json:"record_id" form:"record_id"`
  473. TargetUltrafiltration float64 `gorm:"column:target_ultrafiltration" json:"target_ultrafiltration" form:"target_ultrafiltration"`
  474. DialysateFormulation int64 `gorm:"column:dialysate_formulation" json:"dialysate_formulation" form:"dialysate_formulation"`
  475. BodyFluid int64 `gorm:"column:body_fluid" json:"body_fluid" form:"body_fluid"`
  476. SpecialMedicine int64 `gorm:"column:special_medicine" json:"special_medicine" form:"special_medicine"`
  477. SpecialMedicineOther string `gorm:"column:special_medicine_other" json:"special_medicine_other" form:"special_medicine_other"`
  478. DisplaceLiquiPart int64 `gorm:"column:displace_liqui_part" json:"displace_liqui_part" form:"displace_liqui_part"`
  479. BloodAccess int64 `gorm:"column:blood_access" json:"blood_access" form:"blood_access"`
  480. DisplaceLiquiValue float64 `gorm:"column:displace_liqui_value" json:"displace_liqui_value" form:"displace_liqui_value"`
  481. Ultrafiltration float64 `gorm:"column:ultrafiltration" json:"ultrafiltration" form:"ultrafiltration"`
  482. BodyFluidOther string `gorm:"column:body_fluid_other" json:"body_fluid_other" form:"body_fluid_other"`
  483. Niprocart int64 `gorm:"column:niprocart" json:"niprocart" form:"niprocart"`
  484. Jms int64 `gorm:"column:jms" json:"jms" form:"jms"`
  485. FistulaNeedleSet int64 `gorm:"column:fistula_needle_set" json:"fistula_needle_set" form:"fistula_needle_set"`
  486. FistulaNeedleSet16 int64 `gorm:"column:fistula_needle_set_16" json:"fistula_needle_set_16" form:"fistula_needle_set_16"`
  487. Hemoperfusion int64 `gorm:"column:hemoperfusion" json:"hemoperfusion" form:"hemoperfusion"`
  488. DialyserSterilised int64 `gorm:"column:dialyser_sterilised" json:"dialyser_sterilised" form:"dialyser_sterilised"`
  489. Filtryzer int64 `gorm:"column:filtryzer" json:"filtryzer" form:"filtryzer"`
  490. TargetKtv float64 `gorm:"column:target_ktv" json:"target_ktv" form:"target_ktv"`
  491. Dialyzers int64 `gorm:"column:dialyzers" json:"dialyzers" form:"dialyzers"`
  492. Injector int64 `gorm:"column:injector" json:"injector" form:"injector"`
  493. Bloodlines int64 `gorm:"column:bloodlines" json:"bloodlines" form:"bloodlines"`
  494. TubingHemodialysis int64 `gorm:"column:tubing_hemodialysis" json:"tubing_hemodialysis" form:"tubing_hemodialysis"`
  495. Package int64 `gorm:"column:package" json:"package" form:"package"`
  496. ALiquid int64 `gorm:"column:a_liquid" json:"a_liquid" form:"a_liquid"`
  497. }
  498. func (DialysisPrescription) TableName() string {
  499. return "xt_dialysis_prescription"
  500. }
  501. type DialysisOrder struct {
  502. ID int64 `gorm:"column:id" json:"id" form:"id"`
  503. DialysisDate int64 `gorm:"column:dialysis_date" json:"dialysis_date" form:"dialysis_date"`
  504. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  505. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  506. PrescriptionId int64 `gorm:"column:prescription_id" json:"prescription_id" form:"prescription_id"`
  507. Stage int64 `gorm:"column:stage" json:"stage" form:"stage"`
  508. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  509. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  510. StartNurse int64 `gorm:"column:start_nurse" json:"start_nurse" form:"start_nurse"`
  511. FinishNurse int64 `gorm:"column:finish_nurse" json:"finish_nurse" form:"finish_nurse"`
  512. Status int64 `gorm:"column:status" json:"status" form:"status"`
  513. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  514. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  515. StartTime int64 `gorm:"column:start_time" json:"start_time" form:"start_time"`
  516. EndTime int64 `gorm:"column:end_time" json:"end_time" form:"end_time"`
  517. PunctureNurse int64 `gorm:"column:puncture_nurse" json:"puncture_nurse" form:"puncture_nurse"`
  518. Creator int64 `gorm:"column:creator" json:"creator" form:"creator"`
  519. Modifier int64 `gorm:"column:modifier" json:"modifier" form:"modifier"`
  520. FinishCreator int64 `gorm:"column:finish_creator" json:"finish_creator" form:"finish_creator"`
  521. FinishModifier int64 `gorm:"column:finish_modifier" json:"finish_modifier" form:"finish_modifier"`
  522. }
  523. func (DialysisOrder) TableName() string {
  524. return "xt_dialysis_order"
  525. }
  526. type PatientsInfectiousDiseases struct {
  527. ID int64 `gorm:"column:id" json:"id" form:"id"`
  528. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  529. DiseaseId int64 `gorm:"column:disease_id" json:"disease_id" form:"disease_id"`
  530. Status int64 `gorm:"column:status" json:"status" form:"status"`
  531. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  532. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  533. }
  534. func (PatientsInfectiousDiseases) TableName() string {
  535. return "xt_patients_infectious_diseases"
  536. }
  537. type PatientsType struct {
  538. ID int64 `gorm:"column:id" json:"id" form:"id"`
  539. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  540. Text int64 `gorm:"column:text" json:"text" form:"text"`
  541. Status int64 `gorm:"column:status" json:"status" form:"status"`
  542. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  543. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  544. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  545. }
  546. func (PatientsType) TableName() string {
  547. return "xt_patients_type"
  548. }
  549. type Schedule struct {
  550. ID int64 `gorm:"column:id" json:"id" form:"id"`
  551. UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
  552. PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
  553. BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
  554. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  555. ScheduleDate int64 `gorm:"column:schedule_date" json:"schedule_date" form:"schedule_date"`
  556. ScheduleType int64 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
  557. ScheduleWeek int64 `gorm:"column:schedule_week" json:"schedule_week" form:"schedule_week"`
  558. ModeId int64 `gorm:"column:mode_id" json:"mode_id" form:"mode_id"`
  559. Status int64 `gorm:"column:status" json:"status" form:"status"`
  560. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  561. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  562. }
  563. func (Schedule) TableName() string {
  564. return "xt_schedule"
  565. }
  566. type DeviceZone struct {
  567. ID int64 `gorm:"column:id" json:"id"`
  568. OrgID int64 `gorm:"column:org_id" json:"-"`
  569. Name string `json:"name"`
  570. Type int `json:"type"`
  571. Status int8 `json:"-"`
  572. CreateTime int64 `gorm:"column:ctime" json:"-"`
  573. ModifyTime int64 `gorm:"column:mtime" json:"-"`
  574. }
  575. func (DeviceZone) TableName() string {
  576. return "xt_device_zone"
  577. }
  578. type DeviceNumber struct {
  579. ID int64 `gorm:"column:id" json:"id"`
  580. OrgID int64 `gorm:"column:org_id" json:"-"`
  581. Number string `json:"number"`
  582. GroupID int64 `gorm:"column:group_id" json:"group_id"`
  583. ZoneID int64 `gorm:"column:zone_id" json:"zone_id"`
  584. Status int8 `json:"-"`
  585. CreateTime int64 `gorm:"column:ctime" json:"-"`
  586. ModifyTime int64 `gorm:"column:mtime" json:"-"`
  587. }
  588. func (DeviceNumber) TableName() string {
  589. return "xt_device_number"
  590. }
  591. type TreatmentMode struct {
  592. ID int64 `gorm:"column:id" json:"id" form:"id"`
  593. Name string `gorm:"column:name" json:"name" form:"name"`
  594. DialysisDuration int64 `gorm:"column:dialysis_duration" json:"dialysis_duration" form:"dialysis_duration"`
  595. ReplacementWay int64 `gorm:"column:replacement_way" json:"replacement_way" form:"replacement_way"`
  596. HemodialysisMachine int64 `gorm:"column:hemodialysis_machine" json:"hemodialysis_machine" form:"hemodialysis_machine"`
  597. BloodFilter int64 `gorm:"column:blood_filter" json:"blood_filter" form:"blood_filter"`
  598. PerfusionApparatus int64 `gorm:"column:perfusion_apparatus" json:"perfusion_apparatus" form:"perfusion_apparatus"`
  599. BloodFlowVolume int64 `gorm:"column:blood_flow_volume" json:"blood_flow_volume" form:"blood_flow_volume"`
  600. DialysateFlow int64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
  601. Kalium int64 `gorm:"column:kalium" json:"kalium" form:"kalium"`
  602. Sodium int64 `gorm:"column:sodium" json:"sodium" form:"sodium"`
  603. Calcium int64 `gorm:"column:calcium" json:"calcium" form:"calcium"`
  604. Bicarbonate int64 `gorm:"column:bicarbonate" json:"bicarbonate" form:"bicarbonate"`
  605. Remark string `gorm:"column:remark" json:"remark" form:"remark"`
  606. Status int64 `gorm:"column:status" json:"status" form:"status"`
  607. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  608. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  609. }
  610. func (TreatmentMode) TableName() string {
  611. return "xt_treatment_mode"
  612. }
  613. type PatientSchedule struct {
  614. Schedule
  615. DeviceZone DeviceZone `json:"zone" gorm:"foreignkey:PartitionId"`
  616. DeviceNumber DeviceNumber `json:"bed" gorm:"foreignkey:BedId"`
  617. Week int64 `gorm:"-" json:"week" form:"week"`
  618. TreatmentMode TreatmentMode `json:"mode" gorm:"foreignkey:ModeId"`
  619. }
  620. type ServeSubscibe struct {
  621. ID int64 `gorm:"column:id" json:"id" form:"id"`
  622. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  623. PeriodStart int64 `gorm:"column:period_start" json:"period_start" form:"period_start"`
  624. PeriodEnd int64 `gorm:"column:period_end" json:"period_end" form:"period_end"`
  625. PeriodStartTime time.Time `gorm:"column:period_start_time" json:"period_start_time" form:"period_start_time"`
  626. PeriodEndTime time.Time `gorm:"column:period_end_time" json:"period_end_time" form:"period_end_time"`
  627. Status int64 `gorm:"column:status" json:"status" form:"status"`
  628. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  629. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  630. State int64 `gorm:"column:state" json:"state" form:"state"`
  631. }
  632. func (ServeSubscibe) TableName() string {
  633. return "sgj_serve_subscibe"
  634. }
  635. type Inspection struct {
  636. ID int64 `gorm:"column:id" json:"id" form:"id"`
  637. PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
  638. OrgId int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
  639. ProjectId int64 `gorm:"column:project_id" json:"project_id" form:"project_id"`
  640. ItemId int64 `gorm:"column:item_id" json:"item_id" form:"item_id"`
  641. ItemName string `gorm:"column:item_name" json:"item_name" form:"item_name"`
  642. ProjectName string `gorm:"column:project_name" json:"project_name" form:"project_name"`
  643. InspectType int64 `gorm:"column:inspect_type" json:"inspect_type" form:"inspect_type"`
  644. InspectValue string `gorm:"column:inspect_value" json:"inspect_value" form:"inspect_value"`
  645. InspectDate int64 `gorm:"column:inspect_date" json:"inspect_date" form:"inspect_date"`
  646. Status int64 `gorm:"column:status" json:"status" form:"status"`
  647. CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
  648. UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
  649. }
  650. func (Inspection) TableName() string {
  651. return "xt_inspection"
  652. }