|
@@ -4,22 +4,22 @@ import "time"
|
4
|
4
|
|
5
|
5
|
//检测项目
|
6
|
6
|
type CheckItem struct {
|
7
|
|
- Id int `json:"id" gorm:"type:int(11) auto_increment; NOT NULL; primary_key; COMMENT:'检测项目ID'"`
|
8
|
|
- CheckItemNumber int `json:"check_item_number" gorm:"type:int(11); COMMENT:'排序'"`
|
9
|
|
- Language string `json:"language" gorm:"type:varchar(255); COMMENT:'cn: 中文 en 英文'"`
|
10
|
|
- NameEn string `json:"name_en" gorm:"type:varchar(255); COMMENT:'检测项目英文名'"`
|
11
|
|
- NameCn string `json:"name_cn" gorm:"type:varchar(255); COMMENT:'检测项目中文名'"`
|
12
|
|
- DeviceType string `json:"device_type" gorm:"type:varchar(11); COMMENT:'设备类型'"`
|
13
|
|
- CheckType string `json:"check_type" gorm:"type:varchar(255); COMMENT:'检测类型(试纸类型)'"`
|
14
|
|
- ReferenceValue string `json:"reference_value" gorm:"type:varchar(255); COMMENT:' 参考值'"`
|
15
|
|
- ScopeList string `json:"scope_list" gorm:"type:text; COMMENT:'范围value 值,type =1为正常、2及以上为异 常'"`
|
16
|
|
- Text string `json:"text" gorm:"type:varchar(255); COMMENT:'文本'"`
|
17
|
|
- Details string `json:"details" gorm:"type:text; COMMENT:'描述'"`
|
18
|
|
- Unit string `json:"unit" gorm:"type:varchar(255); COMMENT:'单位'"`
|
19
|
|
- Remark string `json:"remark" gorm:"type:varchar(255); COMMENT:'备注'"`
|
20
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
|
21
|
|
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '"`
|
22
|
|
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); COMMENT:'删除标志'"`
|
|
7
|
+ Id int `json:"id" gorm:"type:int(11) auto_increment; NOT NULL; primary_key; COMMENT:'检测项目ID'" description:"检测项目ID"`
|
|
8
|
+ CheckItemNumber int `json:"check_item_number" gorm:"type:int(11); COMMENT:'排序'" description:"排序"`
|
|
9
|
+ Language string `json:"language" gorm:"type:varchar(255); COMMENT:'cn: 中文 en 英文'" description:"cn: 中文 en 英文"`
|
|
10
|
+ NameEn string `json:"name_en" gorm:"type:varchar(255); COMMENT:'检测项目英文名'" description:"检测项目英文名"`
|
|
11
|
+ NameCn string `json:"name_cn" gorm:"type:varchar(255); COMMENT:'检测项目中文名'" description:"检测项目中文名"`
|
|
12
|
+ DeviceType string `json:"device_type" gorm:"type:varchar(11); COMMENT:'设备类型'" description:"设备类型"`
|
|
13
|
+ CheckType string `json:"check_type" gorm:"type:varchar(255); COMMENT:'检测类型(试纸类型)'" description:"检测类型(试纸类型)"`
|
|
14
|
+ ReferenceValue string `json:"reference_value" gorm:"type:varchar(255); COMMENT:' 参考值'" description:" 参考值"`
|
|
15
|
+ ScopeList string `json:"scope_list" gorm:"type:text; COMMENT:'范围value 值,type =1为正常、2及以上为异 常'" description:"范围value 值,type =1为正常、2及以上为异 常"`
|
|
16
|
+ Text string `json:"text" gorm:"type:varchar(255); COMMENT:'文本'" description:"文本"`
|
|
17
|
+ Details string `json:"details" gorm:"type:text; COMMENT:'描述'" description:"描述"`
|
|
18
|
+ Unit string `json:"unit" gorm:"type:varchar(255); COMMENT:'单位'" description:"单位"`
|
|
19
|
+ Remark string `json:"remark" gorm:"type:varchar(255); COMMENT:'备注'" description:"备注"`
|
|
20
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
|
|
21
|
+ Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
|
|
22
|
+ DeleteFlag int `json:"delete_flag" gorm:"type:int(11); COMMENT:'删除标志'" description:"删除标志"`
|
23
|
23
|
}
|
24
|
24
|
|
25
|
25
|
func (CheckItem) TableName() string {
|
|
@@ -28,20 +28,20 @@ func (CheckItem) TableName() string {
|
28
|
28
|
|
29
|
29
|
//检测记录
|
30
|
30
|
type CheckRecord struct {
|
31
|
|
- Id int64 `json:"id" gorm:"type:bigint(20); NOT NULL; primary_key; COMMENT:'检测记录ID'"`
|
32
|
|
- CheckType string `json:"check_type" gorm:"type:varchar(255); COMMENT:'检测类型(试纸类型)'"`
|
33
|
|
- PutSources string `json:"put_sources" gorm:"type:varchar(255); COMMENT:'上传数据来源'"`
|
34
|
|
- DeviceId uint64 `json:"device_id" gorm:"type:bigint(20) unsigned; COMMENT:'设备ID'"`
|
35
|
|
- DeviceStatus int `json:"device_status" gorm:"type:int(2); COMMENT:'设备状态'"`
|
36
|
|
- MessageId string `json:"message_id" gorm:"type:varchar(255); COMMENT:'设备消息id'"`
|
37
|
|
- UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; DEFAULT:'0'; COMMENT:'用户ID'"`
|
38
|
|
- UserHealthProfileId int64 `json:"user_health_profile_id" gorm:"type:bigint(20); DEFAULT:'0'; COMMENT:'健康档案ID'"`
|
39
|
|
- View int `json:"view" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'查看:1(已查看) 0(未查看)'"`
|
40
|
|
- AlertItemIds string `json:"alert_item_ids" gorm:"type:varchar(255); COMMENT:'异常项目id (1,2,3)'"`
|
41
|
|
- Acc int `json:"acc" gorm:"type:int(10); COMMENT:'设备检测次数'"`
|
42
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间 '"`
|
43
|
|
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间'"`
|
44
|
|
- DeleteFlag int `json:"delete_flag" gorm:"type:int(1); DEFAULT:'0'; COMMENT:'删除标志'"`
|
|
31
|
+ Id int64 `json:"id" gorm:"type:bigint(20); NOT NULL; primary_key; COMMENT:'检测记录ID'" description:"检测记录ID"`
|
|
32
|
+ CheckType string `json:"check_type" gorm:"type:varchar(255); COMMENT:'检测类型(试纸类型)'" description:"检测类型(试纸类型)"`
|
|
33
|
+ PutSources string `json:"put_sources" gorm:"type:varchar(255); COMMENT:'上传数据来源'" description:"上传数据来源"`
|
|
34
|
+ DeviceId uint64 `json:"device_id" gorm:"type:bigint(20) unsigned; COMMENT:'设备ID'" description:"设备ID"`
|
|
35
|
+ DeviceStatus int `json:"device_status" gorm:"type:int(2); COMMENT:'设备状态'" description:"设备状态"`
|
|
36
|
+ MessageId string `json:"message_id" gorm:"type:varchar(255); COMMENT:'设备消息id'" description:"设备消息id"`
|
|
37
|
+ UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; DEFAULT:'0'; COMMENT:'用户ID'" description:"用户ID"`
|
|
38
|
+ UserHealthProfileId int64 `json:"user_health_profile_id" gorm:"type:bigint(20); DEFAULT:'0'; COMMENT:'健康档案ID'" description:"健康档案ID"`
|
|
39
|
+ View int `json:"view" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'查看:1(已查看) 0(未查看)'" description:"查看:1(已查看) 0(未查看)"`
|
|
40
|
+ AlertItemIds string `json:"alert_item_ids" gorm:"type:varchar(255); COMMENT:'异常项目id (1,2,3)'" description:"异常项目id (1,2,3)"`
|
|
41
|
+ Acc int `json:"acc" gorm:"type:int(10); COMMENT:'设备检测次数'" description:"设备检测次数"`
|
|
42
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间 '" description:"创建时间 "`
|
|
43
|
+ Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间'" description:"更新时间"`
|
|
44
|
+ DeleteFlag int `json:"delete_flag" gorm:"type:int(1); DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
|
45
|
45
|
}
|
46
|
46
|
|
47
|
47
|
func (CheckRecord) TableName() string {
|
|
@@ -52,12 +52,12 @@ func (CheckRecord) TableName() string {
|
52
|
52
|
type CheckRecordItem struct {
|
53
|
53
|
Id int64 `json:"id" gorm:"type:bigint(20) auto_increment; NOT NULL; primary_key"`
|
54
|
54
|
CheckId int64 `json:"check_id" gorm:"type:bigint(20); NOT NULL; DEFAULT:'0'"`
|
55
|
|
- CheckItemId int `json:"check_item_id" gorm:"type:int(11); COMMENT:'检测项目id'"`
|
56
|
|
- CheckValue string `json:"check_value" gorm:"type:varchar(255); COMMENT:'检测结果数值'"`
|
57
|
|
- CheckValueIndex int `json:"check_value_index" gorm:"type:int(3); COMMENT:'check_item value index'"`
|
|
55
|
+ CheckItemId int `json:"check_item_id" gorm:"type:int(11); COMMENT:'检测项目id'" description:"检测项目id"`
|
|
56
|
+ CheckValue string `json:"check_value" gorm:"type:varchar(255); COMMENT:'检测结果数值'" description:"检测结果数值"`
|
|
57
|
+ CheckValueIndex int `json:"check_value_index" gorm:"type:int(3); COMMENT:'check_item value index'" description:"check_item value index"`
|
58
|
58
|
Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP"`
|
59
|
59
|
Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"`
|
60
|
|
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); COMMENT:'删除标志'"`
|
|
60
|
+ DeleteFlag int `json:"delete_flag" gorm:"type:int(11); COMMENT:'删除标志'" description:"删除标志"`
|
61
|
61
|
}
|
62
|
62
|
|
63
|
63
|
func (CheckRecordItem) TableName() string {
|
|
@@ -66,30 +66,30 @@ func (CheckRecordItem) TableName() string {
|
66
|
66
|
|
67
|
67
|
//设备表
|
68
|
68
|
type Device struct {
|
69
|
|
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'设备ID'"`
|
70
|
|
- Name string `json:"name" gorm:"type:varchar(255); COMMENT:'设备名称'"`
|
71
|
|
- Serialno string `json:"serialno" gorm:"type:varchar(64); COMMENT:'设备编号'"`
|
72
|
|
- DeviceName string `json:"device_name" gorm:"type:varchar(255); COMMENT:'设备名称'"`
|
73
|
|
- DeviceType string `json:"device_type" gorm:"type:varchar(11); COMMENT:'设备类型'"`
|
74
|
|
- InformType int `json:"inform_type" gorm:"type:int(1); COMMENT:'通知类型:0跳转小程序、1跳转网页 、默认跳转小程序'"`
|
|
69
|
+ Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'设备ID'" description:"设备ID"`
|
|
70
|
+ Name string `json:"name" gorm:"type:varchar(255); COMMENT:'设备名称'" description:"设备名称"`
|
|
71
|
+ Serialno string `json:"serialno" gorm:"type:varchar(64); COMMENT:'设备编号'" description:"设备编号"`
|
|
72
|
+ DeviceName string `json:"device_name" gorm:"type:varchar(255); COMMENT:'设备名称'" description:"设备名称"`
|
|
73
|
+ DeviceType string `json:"device_type" gorm:"type:varchar(11); COMMENT:'设备类型'" description:"设备类型"`
|
|
74
|
+ InformType int `json:"inform_type" gorm:"type:int(1); COMMENT:'通知类型:0跳转小程序、1跳转网页 、默认跳转小程序'" description:"通知类型:0跳转小程序、1跳转网页 、默认跳转小程序"`
|
75
|
75
|
Mac string `json:"mac" gorm:"type:varchar(255)"`
|
76
|
76
|
Mcu string `json:"mcu" gorm:"type:varchar(255)"`
|
77
|
|
- BatchNumber int `json:"batch_number" gorm:"type:int(10); COMMENT:'批号'"`
|
78
|
|
- ProductionDateNumber int `json:"production_date_number" gorm:"type:int(10); COMMENT:'生产日期'"`
|
79
|
|
- Number int `json:"number" gorm:"type:int(10); COMMENT:'序号'"`
|
|
77
|
+ BatchNumber int `json:"batch_number" gorm:"type:int(10); COMMENT:'批号'" description:"批号"`
|
|
78
|
+ ProductionDateNumber int `json:"production_date_number" gorm:"type:int(10); COMMENT:'生产日期'" description:"生产日期"`
|
|
79
|
+ Number int `json:"number" gorm:"type:int(10); COMMENT:'序号'" description:"序号"`
|
80
|
80
|
QrCodeId int64 `json:"qr_code_id" gorm:"type:bigint(20)"`
|
81
|
|
- EmqPassword string `json:"emq_password" gorm:"type:varchar(255); COMMENT:'emq密码'"`
|
82
|
|
- Status int `json:"status" gorm:"type:int(2); DEFAULT:'0'; COMMENT:'状态(0:未分配 1:已分配 2:包装中 3:待出厂 6:废弃 99:已出厂 100:销售中 101:已售出)'"`
|
83
|
|
- Ver string `json:"ver" gorm:"type:varchar(255); COMMENT:'软件版本'"`
|
84
|
|
- OemCompany int `json:"oem_company" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'厂商(0:自营 1:艾玛OEM)'"`
|
85
|
|
- McuType string `json:"mcu_type" gorm:"type:varchar(32); COMMENT:'MCU芯片类型'"`
|
86
|
|
- SensorMode string `json:"sensor_mode" gorm:"type:varchar(32); COMMENT:'传感放大倍数'"`
|
87
|
|
- Language string `json:"language" gorm:"type:varchar(32); COMMENT:'语言'"`
|
88
|
|
- PaperCheck int `json:"paper_check" gorm:"type:int(11); COMMENT:'试纸检查状态'"`
|
89
|
|
- WifiVer string `json:"wifi_ver" gorm:"type:varchar(32); COMMENT:'WIFI版本'"`
|
90
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
|
91
|
|
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '"`
|
92
|
|
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志'"`
|
|
81
|
+ EmqPassword string `json:"emq_password" gorm:"type:varchar(255); COMMENT:'emq密码'" description:"emq密码"`
|
|
82
|
+ Status int `json:"status" gorm:"type:int(2); DEFAULT:'0'; COMMENT:'状态(0:未分配 1:已分配 2:包装中 3:待出厂 6:废弃 99:已出厂 100:销售中 101:已售出)'" description:"状态(0:未分配 1:已分配 2:包装中 3:待出厂 6:废弃 99:已出厂 100:销售中 101:已售出)"`
|
|
83
|
+ Ver string `json:"ver" gorm:"type:varchar(255); COMMENT:'软件版本'" description:"软件版本"`
|
|
84
|
+ OemCompany int `json:"oem_company" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'厂商(0:自营 1:艾玛OEM)'" description:"厂商(0:自营 1:艾玛OEM)"`
|
|
85
|
+ McuType string `json:"mcu_type" gorm:"type:varchar(32); COMMENT:'MCU芯片类型'" description:"MCU芯片类型"`
|
|
86
|
+ SensorMode string `json:"sensor_mode" gorm:"type:varchar(32); COMMENT:'传感放大倍数'" description:"传感放大倍数"`
|
|
87
|
+ Language string `json:"language" gorm:"type:varchar(32); COMMENT:'语言'" description:"语言"`
|
|
88
|
+ PaperCheck int `json:"paper_check" gorm:"type:int(11); COMMENT:'试纸检查状态'" description:"试纸检查状态"`
|
|
89
|
+ WifiVer string `json:"wifi_ver" gorm:"type:varchar(32); COMMENT:'WIFI版本'" description:"WIFI版本"`
|
|
90
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
|
|
91
|
+ Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
|
|
92
|
+ DeleteFlag int `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
|
93
|
93
|
}
|
94
|
94
|
|
95
|
95
|
func (Device) TableName() string {
|
|
@@ -103,8 +103,8 @@ type DeviceMessageLog struct {
|
103
|
103
|
DeviceName string `json:"device_name" gorm:"type:varchar(255)"`
|
104
|
104
|
Topic string `json:"topic" gorm:"type:varchar(255)"`
|
105
|
105
|
EventType string `json:"event_type" gorm:"type:varchar(255)"`
|
106
|
|
- Content string `json:"content" gorm:"type:text; COMMENT:'消息内容'"`
|
107
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
|
|
106
|
+ Content string `json:"content" gorm:"type:text; COMMENT:'消息内容'" description:"消息内容"`
|
|
107
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
|
108
|
108
|
}
|
109
|
109
|
|
110
|
110
|
func (DeviceMessageLog) TableName() string {
|
|
@@ -113,13 +113,13 @@ func (DeviceMessageLog) TableName() string {
|
113
|
113
|
|
114
|
114
|
//设备绑定表
|
115
|
115
|
type DeviceRelate struct {
|
116
|
|
- Id int64 `json:"id" gorm:"type:bigint(20) auto_increment; NOT NULL; primary_key; COMMENT:'id'"`
|
117
|
|
- Name string `json:"name" gorm:"type:varchar(255); COMMENT:'名称'"`
|
118
|
|
- DeviceId uint64 `json:"device_id" gorm:"type:bigint(20) unsigned; COMMENT:'设备Id'"`
|
119
|
|
- UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; COMMENT:'会员Id'"`
|
120
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
|
121
|
|
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '"`
|
122
|
|
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志(解绑时标记为删除)'"`
|
|
116
|
+ Id int64 `json:"id" gorm:"type:bigint(20) auto_increment; NOT NULL; primary_key; COMMENT:'id'" description:"id"`
|
|
117
|
+ Name string `json:"name" gorm:"type:varchar(255); COMMENT:'名称'" description:"名称"`
|
|
118
|
+ DeviceId uint64 `json:"device_id" gorm:"type:bigint(20) unsigned; COMMENT:'设备Id'" description:"设备Id"`
|
|
119
|
+ UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; COMMENT:'会员Id'" description:"会员Id"`
|
|
120
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
|
|
121
|
+ Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
|
|
122
|
+ DeleteFlag int `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志(解绑时标记为删除)'" description:"删除标志(解绑时标记为删除)"`
|
123
|
123
|
}
|
124
|
124
|
|
125
|
125
|
func (DeviceRelate) TableName() string {
|
|
@@ -133,7 +133,7 @@ type SysDictionary struct {
|
133
|
133
|
Type string `json:"type" gorm:"type:varchar(255)"`
|
134
|
134
|
ParentId int `json:"parent_id" gorm:"type:int(11)"`
|
135
|
135
|
Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP"`
|
136
|
|
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'删除标志'"`
|
|
136
|
+ DeleteFlag int `json:"delete_flag" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
|
137
|
137
|
}
|
138
|
138
|
|
139
|
139
|
func (SysDictionary) TableName() string {
|
|
@@ -142,30 +142,30 @@ func (SysDictionary) TableName() string {
|
142
|
142
|
|
143
|
143
|
//用户健康档案
|
144
|
144
|
type UserHealthProfile struct {
|
145
|
|
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'"`
|
146
|
|
- UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; NOT NULL; COMMENT:'用户ID'"`
|
147
|
|
- RealName string `json:"real_name" gorm:"type:varchar(64); COMMENT:'真实姓名'"`
|
148
|
|
- IdCard string `json:"id_card" gorm:"type:varchar(64); COMMENT:'身份证号'"`
|
149
|
|
- InpatientRegPhone string `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'"`
|
150
|
|
- Gender int `json:"gender" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'性别(0:未知 1:男 2:女)'"`
|
151
|
|
- Height int `json:"height" gorm:"type:int(11); COMMENT:'身高'"`
|
152
|
|
- Weight int `json:"weight" gorm:"type:int(11); COMMENT:'体重'"`
|
153
|
|
- BloodType string `json:"blood_type" gorm:"type:varchar(32); COMMENT:'血型'"`
|
154
|
|
- Birthday time.Time `json:"birthday" gorm:"type:datetime; COMMENT:'生日'"`
|
155
|
|
- IllnessState string `json:"illness_state" gorm:"type:varchar(255); COMMENT:'病情'"`
|
156
|
|
- RenalFunctionStatus int `json:"renal_function_status" gorm:"type:int(11); COMMENT:'肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)'"`
|
157
|
|
- Creatinine int `json:"creatinine" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'血肌酐'"`
|
158
|
|
- CreatinineUnit string `json:"creatinine_unit" gorm:"type:varchar(32); COMMENT:'肌酐单位(umol/L,mg/dl)'"`
|
159
|
|
- CreatineTime time.Time `json:"creatine_time" gorm:"type:datetime; COMMENT:'肌酐检测时间'"`
|
160
|
|
- UrineProtein24hUnit string `json:"urine_protein_24h_unit" gorm:"type:varchar(32); COMMENT:'24小时尿蛋白单位(g/24h,mg/24h)'"`
|
161
|
|
- UrineProtein24h int `json:"urine_protein_24h" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'"`
|
162
|
|
- UrineProtein24hTime time.Time `json:"urine_protein_24h_time" gorm:"type:datetime; COMMENT:'24小时尿蛋白检测时间'"`
|
163
|
|
- UrineProtein int `json:"urine_protein" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'"`
|
164
|
|
- UrineProteinUnit string `json:"urine_protein_unit" gorm:"type:varchar(32); COMMENT:'尿蛋白单位(g,mg)'"`
|
165
|
|
- UrineProteinTime time.Time `json:"urine_protein_time" gorm:"type:datetime; COMMENT:'尿蛋白检测时间'"`
|
166
|
|
- Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0:无效 )'"`
|
167
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
|
168
|
|
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '"`
|
|
145
|
+ Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'" description:"Primary Key ID"`
|
|
146
|
+ UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; NOT NULL; COMMENT:'用户ID'" description:"用户ID"`
|
|
147
|
+ RealName string `json:"real_name" gorm:"type:varchar(64); COMMENT:'真实姓名'" description:"真实姓名"`
|
|
148
|
+ IdCard string `json:"id_card" gorm:"type:varchar(64); COMMENT:'身份证号'" description:"身份证号"`
|
|
149
|
+ InpatientRegPhone string `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'" description:"住院登记手机号"`
|
|
150
|
+ Gender int `json:"gender" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'性别(0:未知 1:男 2:女)'" description:"性别(0:未知 1:男 2:女)"`
|
|
151
|
+ Height int `json:"height" gorm:"type:int(11); COMMENT:'身高'" description:"身高"`
|
|
152
|
+ Weight int `json:"weight" gorm:"type:int(11); COMMENT:'体重'" description:"体重"`
|
|
153
|
+ BloodType string `json:"blood_type" gorm:"type:varchar(32); COMMENT:'血型'" description:"血型"`
|
|
154
|
+ Birthday time.Time `json:"birthday" gorm:"type:datetime; COMMENT:'生日'" description:"生日"`
|
|
155
|
+ IllnessState string `json:"illness_state" gorm:"type:varchar(255); COMMENT:'病情'" description:"病情"`
|
|
156
|
+ RenalFunctionStatus int `json:"renal_function_status" gorm:"type:int(11); COMMENT:'肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)'" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
|
|
157
|
+ Creatinine int `json:"creatinine" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'血肌酐'" description:"血肌酐"`
|
|
158
|
+ CreatinineUnit string `json:"creatinine_unit" gorm:"type:varchar(32); COMMENT:'肌酐单位(umol/L,mg/dl)'" description:"肌酐单位(umol/L,mg/dl)"`
|
|
159
|
+ CreatineTime time.Time `json:"creatine_time" gorm:"type:datetime; COMMENT:'肌酐检测时间'" description:"肌酐检测时间"`
|
|
160
|
+ UrineProtein24hUnit string `json:"urine_protein_24h_unit" gorm:"type:varchar(32); COMMENT:'24小时尿蛋白单位(g/24h,mg/24h)'" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
|
|
161
|
+ UrineProtein24h int `json:"urine_protein_24h" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'" description:"24小时尿蛋白"`
|
|
162
|
+ UrineProtein24hTime time.Time `json:"urine_protein_24h_time" gorm:"type:datetime; COMMENT:'24小时尿蛋白检测时间'" description:"24小时尿蛋白检测时间"`
|
|
163
|
+ UrineProtein int `json:"urine_protein" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'" description:"尿蛋白"`
|
|
164
|
+ UrineProteinUnit string `json:"urine_protein_unit" gorm:"type:varchar(32); COMMENT:'尿蛋白单位(g,mg)'" description:"尿蛋白单位(g,mg)"`
|
|
165
|
+ UrineProteinTime time.Time `json:"urine_protein_time" gorm:"type:datetime; COMMENT:'尿蛋白检测时间'" description:"尿蛋白检测时间"`
|
|
166
|
+ Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0:无效 )'" description:"状态(1:有效 0:无效 )"`
|
|
167
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
|
|
168
|
+ Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
|
169
|
169
|
}
|
170
|
170
|
|
171
|
171
|
func (UserHealthProfile) TableName() string {
|
|
@@ -174,19 +174,19 @@ func (UserHealthProfile) TableName() string {
|
174
|
174
|
|
175
|
175
|
//小程序用户表(个人中心)
|
176
|
176
|
type XcxUser struct {
|
177
|
|
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'"`
|
178
|
|
- Phone string `json:"phone" gorm:"type:varchar(32); COMMENT:'手机号码'"`
|
179
|
|
- Email string `json:"email" gorm:"type:varchar(255); COMMENT:'邮件'"`
|
180
|
|
- OpenId string `json:"open_id" gorm:"type:varchar(255); COMMENT:'OpenID'"`
|
181
|
|
- UnionId string `json:"union_id" gorm:"type:varchar(255); COMMENT:'unionid'"`
|
182
|
|
- NickName string `json:"nick_name" gorm:"type:varchar(64); COMMENT:'昵称'"`
|
183
|
|
- Avatar string `json:"avatar" gorm:"type:varchar(255); COMMENT:'头像'"`
|
184
|
|
- Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0: 无效)'"`
|
185
|
|
- RoleType int `json:"role_type" gorm:"type:int(2); COMMENT:'角色类型 0或空:普通 1:管理员 2:测试'"`
|
186
|
|
- Source string `json:"source" gorm:"type:varchar(255); COMMENT:'用户来源'"`
|
187
|
|
- PrivacyProtocolVersions int `json:"privacy_protocol_versions" gorm:"type:int(2); COMMENT:'隐私政策版本'"`
|
188
|
|
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'"`
|
189
|
|
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '"`
|
|
177
|
+ Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'" description:"Primary Key ID"`
|
|
178
|
+ Phone string `json:"phone" gorm:"type:varchar(32); COMMENT:'手机号码'" description:"手机号码"`
|
|
179
|
+ Email string `json:"email" gorm:"type:varchar(255); COMMENT:'邮件'" description:"邮件"`
|
|
180
|
+ OpenId string `json:"open_id" gorm:"type:varchar(255); COMMENT:'OpenID'" description:"OpenID"`
|
|
181
|
+ UnionId string `json:"union_id" gorm:"type:varchar(255); COMMENT:'unionid'" description:"unionid"`
|
|
182
|
+ NickName string `json:"nick_name" gorm:"type:varchar(64); COMMENT:'昵称'" description:"昵称"`
|
|
183
|
+ Avatar string `json:"avatar" gorm:"type:varchar(255); COMMENT:'头像'" description:"头像"`
|
|
184
|
+ Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0: 无效)'" description:"状态(1:有效 0: 无效)"`
|
|
185
|
+ RoleType int `json:"role_type" gorm:"type:int(2); COMMENT:'角色类型 0或空:普通 1:管理员 2:测试'" description:"角色类型 0或空:普通 1:管理员 2:测试"`
|
|
186
|
+ Source string `json:"source" gorm:"type:varchar(255); COMMENT:'用户来源'" description:"用户来源"`
|
|
187
|
+ PrivacyProtocolVersions int `json:"privacy_protocol_versions" gorm:"type:int(2); COMMENT:'隐私政策版本'" description:"隐私政策版本"`
|
|
188
|
+ Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
|
|
189
|
+ Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
|
190
|
190
|
|
191
|
191
|
SessionKey string `json:"session_key" gorm:"-"`
|
192
|
192
|
}
|