|
@@ -2,6 +2,29 @@ package models
|
2
|
2
|
|
3
|
3
|
import "time"
|
4
|
4
|
|
|
5
|
+type Time time.Time
|
|
6
|
+
|
|
7
|
+const (
|
|
8
|
+ timeFormart = "2006-01-02 15:04:05"
|
|
9
|
+)
|
|
10
|
+
|
|
11
|
+func (t *Time) UnmarshalJSON(data []byte) (err error) {
|
|
12
|
+ now, err := time.ParseInLocation(`"`+timeFormart+`"`, string(data), time.Local)
|
|
13
|
+ *t = Time(now)
|
|
14
|
+ return
|
|
15
|
+}
|
|
16
|
+
|
|
17
|
+func (t Time) MarshalJSON() ([]byte, error) {
|
|
18
|
+ b := make([]byte, 0, len(timeFormart)+2)
|
|
19
|
+ b = append(b, '"')
|
|
20
|
+ b = time.Time(t).AppendFormat(b, timeFormart)
|
|
21
|
+ b = append(b, '"')
|
|
22
|
+ return b, nil
|
|
23
|
+}
|
|
24
|
+func (t Time) String() string {
|
|
25
|
+ return time.Time(t).Format(timeFormart)
|
|
26
|
+}
|
|
27
|
+
|
5
|
28
|
type WxXcxLoginReq struct {
|
6
|
29
|
Code string `json:"code"`
|
7
|
30
|
}
|
|
@@ -40,27 +63,27 @@ type UserInfoResp struct {
|
40
|
63
|
IdCard string `json:"id_card" description:"身份证号"`
|
41
|
64
|
InpatientRegPhone string `json:"inpatient_reg_phone" description:"住院登记手机号"`
|
42
|
65
|
|
43
|
|
- Ctime time.Time `json:"ctime" description:"创建时间"`
|
44
|
|
- Mtime time.Time `json:"mtime" description:"更新时间 "`
|
|
66
|
+ Ctime Time `json:"ctime" description:"创建时间"`
|
|
67
|
+ Mtime Time `json:"mtime" description:"更新时间 "`
|
45
|
68
|
}
|
46
|
69
|
|
47
|
70
|
type SaveHealthProfileReq struct {
|
48
|
|
- Gender int `json:"gender" description:"性别(0:未知 1:男 2:女)"`
|
49
|
|
- Height int `json:"height" description:"身高"`
|
50
|
|
- Weight int `json:"weight" description:"体重"`
|
51
|
|
- BloodType string `json:"blood_type" description:"血型"`
|
52
|
|
- Birthday time.Time `json:"birthday" description:"生日"`
|
53
|
|
- IllnessState string `json:"illness_state" description:"病情"`
|
54
|
|
- RenalFunctionStatus int `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
|
55
|
|
- Creatinine int `json:"creatinine" description:"血肌酐"`
|
56
|
|
- CreatinineUnit string `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
|
57
|
|
- CreatineTime time.Time `json:"creatine_time" description:"肌酐检测时间"`
|
58
|
|
- UrineProtein24hUnit string `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
|
59
|
|
- UrineProtein24h int `json:"urine_protein_24h" description:"24小时尿蛋白"`
|
60
|
|
- UrineProtein24hTime time.Time `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间"`
|
61
|
|
- UrineProtein int `json:"urine_protein" description:"尿蛋白"`
|
62
|
|
- UrineProteinUnit string `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
|
63
|
|
- UrineProteinTime time.Time `json:"urine_protein_time" description:"尿蛋白检测时间"`
|
|
71
|
+ Gender int `json:"gender" description:"性别(0:未知 1:男 2:女)"`
|
|
72
|
+ Height int `json:"height" description:"身高"`
|
|
73
|
+ Weight int `json:"weight" description:"体重"`
|
|
74
|
+ BloodType string `json:"blood_type" description:"血型"`
|
|
75
|
+ Birthday Time `json:"birthday" description:"生日"`
|
|
76
|
+ IllnessState string `json:"illness_state" description:"病情"`
|
|
77
|
+ RenalFunctionStatus int `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
|
|
78
|
+ Creatinine int `json:"creatinine" description:"血肌酐"`
|
|
79
|
+ CreatinineUnit string `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
|
|
80
|
+ CreatineTime Time `json:"creatine_time" description:"肌酐检测时间"`
|
|
81
|
+ UrineProtein24hUnit string `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
|
|
82
|
+ UrineProtein24h int `json:"urine_protein_24h" description:"24小时尿蛋白"`
|
|
83
|
+ UrineProtein24hTime Time `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间"`
|
|
84
|
+ UrineProtein int `json:"urine_protein" description:"尿蛋白"`
|
|
85
|
+ UrineProteinUnit string `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
|
|
86
|
+ UrineProteinTime Time `json:"urine_protein_time" description:"尿蛋白检测时间"`
|
64
|
87
|
}
|
65
|
88
|
|
66
|
89
|
type HealthProfileResp struct {
|
|
@@ -69,25 +92,25 @@ type HealthProfileResp struct {
|
69
|
92
|
//RealName string `json:"real_name" description:"真实姓名"`
|
70
|
93
|
//IdCard string `json:"id_card" description:"身份证号"`
|
71
|
94
|
//InpatientRegPhone string `json:"inpatient_reg_phone" description:"住院登记手机号"`
|
72
|
|
- Gender int `json:"gender" description:"性别(0:未知 1:男 2:女)"`
|
73
|
|
- Height int `json:"height" description:"身高"`
|
74
|
|
- Weight int `json:"weight" description:"体重"`
|
75
|
|
- BloodType string `json:"blood_type" description:"血型"`
|
76
|
|
- Birthday time.Time `json:"birthday" description:"生日"`
|
77
|
|
- IllnessState string `json:"illness_state" description:"病情"`
|
78
|
|
- RenalFunctionStatus int `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
|
79
|
|
- Creatinine int `json:"creatinine" description:"血肌酐"`
|
80
|
|
- CreatinineUnit string `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
|
81
|
|
- CreatineTime time.Time `json:"creatine_time" description:"肌酐检测时间"`
|
82
|
|
- UrineProtein24hUnit string `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
|
83
|
|
- UrineProtein24h int `json:"urine_protein_24h" description:"24小时尿蛋白"`
|
84
|
|
- UrineProtein24hTime time.Time `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间"`
|
85
|
|
- UrineProtein int `json:"urine_protein" description:"尿蛋白"`
|
86
|
|
- UrineProteinUnit string `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
|
87
|
|
- UrineProteinTime time.Time `json:"urine_protein_time" description:"尿蛋白检测时间"`
|
88
|
|
- Status int `json:"status" description:"状态(1:有效 0:无效 )"`
|
89
|
|
- Ctime time.Time `json:"ctime" description:"创建时间"`
|
90
|
|
- Mtime time.Time `json:"mtime" description:"更新时间 "`
|
|
95
|
+ Gender int `json:"gender" description:"性别(0:未知 1:男 2:女)"`
|
|
96
|
+ Height int `json:"height" description:"身高"`
|
|
97
|
+ Weight int `json:"weight" description:"体重"`
|
|
98
|
+ BloodType string `json:"blood_type" description:"血型"`
|
|
99
|
+ Birthday Time `json:"birthday" description:"生日"`
|
|
100
|
+ IllnessState string `json:"illness_state" description:"病情"`
|
|
101
|
+ RenalFunctionStatus int `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
|
|
102
|
+ Creatinine int `json:"creatinine" description:"血肌酐"`
|
|
103
|
+ CreatinineUnit string `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
|
|
104
|
+ CreatineTime Time `json:"creatine_time" description:"肌酐检测时间"`
|
|
105
|
+ UrineProtein24hUnit string `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
|
|
106
|
+ UrineProtein24h int `json:"urine_protein_24h" description:"24小时尿蛋白"`
|
|
107
|
+ UrineProtein24hTime Time `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间"`
|
|
108
|
+ UrineProtein int `json:"urine_protein" description:"尿蛋白"`
|
|
109
|
+ UrineProteinUnit string `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
|
|
110
|
+ UrineProteinTime Time `json:"urine_protein_time" description:"尿蛋白检测时间"`
|
|
111
|
+ Status int `json:"status" description:"状态(1:有效 0:无效 )"`
|
|
112
|
+ Ctime Time `json:"ctime" description:"创建时间"`
|
|
113
|
+ Mtime Time `json:"mtime" description:"更新时间 "`
|
91
|
114
|
}
|
92
|
115
|
|
93
|
116
|
type DicResp struct {
|
|
@@ -95,3 +118,40 @@ type DicResp struct {
|
95
|
118
|
Name string `json:"name" description:"字典名称"`
|
96
|
119
|
Value int `json:"value" description:"字典值"`
|
97
|
120
|
}
|
|
121
|
+
|
|
122
|
+type OpenEmqMsgReqV0 struct {
|
|
123
|
+ UserName string `json:"username" description:"用户名"`
|
|
124
|
+ Topic string `json:"topic" description:"主题"`
|
|
125
|
+ PeerHost string `json:"peerhost" description:"主机"`
|
|
126
|
+ Payload string `json:"payload" description:"负载"`
|
|
127
|
+ Id string `json:"id"`
|
|
128
|
+ ProductKey string `json:"productKey" description:"产品key"`
|
|
129
|
+ DeviceName string `json:"deviceName" description:"设备名称"`
|
|
130
|
+ Acc int `json:"acc"`
|
|
131
|
+ Type int `json:"type"`
|
|
132
|
+ Count int `json:"count"`
|
|
133
|
+ DataType int `json:"datatype"`
|
|
134
|
+ VerifyCode string `json:"verifycode"`
|
|
135
|
+ Data string `json:"data"`
|
|
136
|
+ Origin string `json:"origin"`
|
|
137
|
+ Len int `json:"len"`
|
|
138
|
+}
|
|
139
|
+
|
|
140
|
+type OpenEmqPayloadReqVO struct {
|
|
141
|
+ ProductKey string `json:"productKey"` // 产品密钥
|
|
142
|
+ DeviceName string `json:"deviceName"` // 设备名称
|
|
143
|
+ Acc int `json:"acc"` // 准确度
|
|
144
|
+ Type int `json:"type"` // 类型
|
|
145
|
+ Count int `json:"count"` // 计数
|
|
146
|
+ Datatype int `json:"datatype"` // 数据类型
|
|
147
|
+ Verifycode int `json:"verifycode"` // 验证码
|
|
148
|
+ Data string `json:"data"` // 数据
|
|
149
|
+ Origin string `json:"origin"` // 来源
|
|
150
|
+ Len int `json:"len"` // 长度
|
|
151
|
+}
|
|
152
|
+type CheckItemScopeVO struct {
|
|
153
|
+ Index int `json:"index"`
|
|
154
|
+ Type int `json:"type"`
|
|
155
|
+ Value string `json:"value"`
|
|
156
|
+ Num float64 `json:"num"`
|
|
157
|
+}
|