httpmodels.go 6.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. package models
  2. import "time"
  3. type WxXcxLoginReq struct {
  4. Code string `json:"code"`
  5. }
  6. type WxXcxLoginResp struct {
  7. Token string `json:"token"`
  8. OpenId string `json:"openid"`
  9. }
  10. type SaveUserInfoReq struct {
  11. Phone string `json:"phone" COMMENT:"手机号码"`
  12. Email string `json:"email" COMMENT:"邮件"`
  13. //UnionId string `json:"union_id" COMMENT:"unionid"`
  14. NickName string `json:"nick_name" COMMENT:"昵称"`
  15. Avatar string `json:"avatar" COMMENT:"头像"`
  16. //PrivacyProtocolVersions int `json:"privacy_protocol_versions" COMMENT:"隐私政策版本"`
  17. RealName string `json:"real_name" gorm:"type:varchar(64); COMMENT:'真实姓名'"`
  18. IdCard string `json:"id_card" gorm:"type:varchar(64); COMMENT:'身份证号'"`
  19. InpatientRegPhone string `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'"`
  20. }
  21. type UserInfoResp struct {
  22. Id uint64 `json:"id" COMMENT:"Primary Key ID"`
  23. Phone string `json:"phone" COMMENT:"手机号码"`
  24. Email string `json:"email" COMMENT:"邮件"`
  25. OpenId string `json:"open_id" COMMENT:"OpenID"`
  26. UnionId string `json:"union_id" COMMENT:"unionid"`
  27. NickName string `json:"nick_name" COMMENT:"昵称"`
  28. Avatar string `json:"avatar" COMMENT:"头像"`
  29. Status int `json:"status" COMMENT:"状态(1:有效 0: 无效)"`
  30. Source string `json:"source" COMMENT:"用户来源"`
  31. PrivacyProtocolVersions int `json:"privacy_protocol_versions" COMMENT:"隐私政策版本"`
  32. RealName string `json:"real_name" gorm:"type:varchar(64); COMMENT:'真实姓名'"`
  33. IdCard string `json:"id_card" gorm:"type:varchar(64); COMMENT:'身份证号'"`
  34. InpatientRegPhone string `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'"`
  35. Ctime time.Time `json:"ctime" COMMENT:"创建时间"`
  36. Mtime time.Time `json:"mtime" COMMENT:"更新时间 "`
  37. }
  38. type SaveHealthProfileReq struct {
  39. Gender int `json:"gender" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'性别(0:未知 1:男 2:女)'"`
  40. Height int `json:"height" gorm:"type:int(11); COMMENT:'身高'"`
  41. Weight int `json:"weight" gorm:"type:int(11); COMMENT:'体重'"`
  42. BloodType string `json:"blood_type" gorm:"type:varchar(32); COMMENT:'血型'"`
  43. Birthday time.Time `json:"birthday" gorm:"type:datetime; COMMENT:'生日'"`
  44. IllnessState string `json:"illness_state" gorm:"type:varchar(255); COMMENT:'病情'"`
  45. RenalFunctionStatus int `json:"renal_function_status" gorm:"type:int(11); COMMENT:'肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)'"`
  46. Creatinine int `json:"creatinine" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'血肌酐'"`
  47. CreatinineUnit string `json:"creatinine_unit" gorm:"type:varchar(32); COMMENT:'肌酐单位(umol/L,mg/dl)'"`
  48. CreatineTime time.Time `json:"creatine_time" gorm:"type:datetime; COMMENT:'肌酐检测时间'"`
  49. UrineProtein24hUnit string `json:"urine_protein_24h_unit" gorm:"type:varchar(32); COMMENT:'24小时尿蛋白单位(g/24h,mg/24h)'"`
  50. UrineProtein24h int `json:"urine_protein_24h" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'"`
  51. UrineProtein24hTime time.Time `json:"urine_protein_24h_time" gorm:"type:datetime; COMMENT:'24小时尿蛋白检测时间'"`
  52. UrineProtein int `json:"urine_protein" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'"`
  53. UrineProteinUnit string `json:"urine_protein_unit" gorm:"type:varchar(32); COMMENT:'尿蛋白单位(g,mg)'"`
  54. UrineProteinTime time.Time `json:"urine_protein_time" gorm:"type:datetime; COMMENT:'尿蛋白检测时间'"`
  55. }
  56. type HealthProfileResp struct {
  57. Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'"`
  58. //UserId int64 `json:"user_id" gorm:"type:bigint(20); NOT NULL; COMMENT:'用户ID'"`
  59. //RealName string `json:"real_name" gorm:"type:varchar(64); COMMENT:'真实姓名'"`
  60. //IdCard string `json:"id_card" gorm:"type:varchar(64); COMMENT:'身份证号'"`
  61. //InpatientRegPhone string `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'"`
  62. Gender int `json:"gender" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'性别(0:未知 1:男 2:女)'"`
  63. Height int `json:"height" gorm:"type:int(11); COMMENT:'身高'"`
  64. Weight int `json:"weight" gorm:"type:int(11); COMMENT:'体重'"`
  65. BloodType string `json:"blood_type" gorm:"type:varchar(32); COMMENT:'血型'"`
  66. Birthday time.Time `json:"birthday" gorm:"type:datetime; COMMENT:'生日'"`
  67. IllnessState string `json:"illness_state" gorm:"type:varchar(255); COMMENT:'病情'"`
  68. RenalFunctionStatus int `json:"renal_function_status" gorm:"type:int(11); COMMENT:'肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)'"`
  69. Creatinine int `json:"creatinine" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'血肌酐'"`
  70. CreatinineUnit string `json:"creatinine_unit" gorm:"type:varchar(32); COMMENT:'肌酐单位(umol/L,mg/dl)'"`
  71. CreatineTime time.Time `json:"creatine_time" gorm:"type:datetime; COMMENT:'肌酐检测时间'"`
  72. UrineProtein24hUnit string `json:"urine_protein_24h_unit" gorm:"type:varchar(32); COMMENT:'24小时尿蛋白单位(g/24h,mg/24h)'"`
  73. UrineProtein24h int `json:"urine_protein_24h" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'"`
  74. UrineProtein24hTime time.Time `json:"urine_protein_24h_time" gorm:"type:datetime; COMMENT:'24小时尿蛋白检测时间'"`
  75. UrineProtein int `json:"urine_protein" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'"`
  76. UrineProteinUnit string `json:"urine_protein_unit" gorm:"type:varchar(32); COMMENT:'尿蛋白单位(g,mg)'"`
  77. UrineProteinTime time.Time `json:"urine_protein_time" gorm:"type:datetime; COMMENT:'尿蛋白检测时间'"`
  78. Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0:无效 )'"`
  79. Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
  80. Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '"`
  81. }
  82. type DicResp struct {
  83. Type string `json:"type"`
  84. Name string `json:"name"`
  85. Value int `json:"value"`
  86. }