123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- package models
-
- import "time"
-
- //检测项目
- type CheckItem struct {
- Id int `json:"id" gorm:"type:int(11) auto_increment; NOT NULL; primary_key; COMMENT:'检测项目ID'" description:"检测项目ID"`
- CheckItemNumber int `json:"check_item_number" gorm:"type:int(11); COMMENT:'排序'" description:"排序"`
- Language string `json:"language" gorm:"type:varchar(255); COMMENT:'cn: 中文 en 英文'" description:"cn: 中文 en 英文"`
- NameEn string `json:"name_en" gorm:"type:varchar(255); COMMENT:'检测项目英文名'" description:"检测项目英文名"`
- NameCn string `json:"name_cn" gorm:"type:varchar(255); COMMENT:'检测项目中文名'" description:"检测项目中文名"`
- DeviceType string `json:"device_type" gorm:"type:varchar(11); COMMENT:'设备类型'" description:"设备类型"`
- CheckType string `json:"check_type" gorm:"type:varchar(255); COMMENT:'检测类型(试纸类型)'" description:"检测类型(试纸类型)"`
- ReferenceValue string `json:"reference_value" gorm:"type:varchar(255); COMMENT:' 参考值'" description:" 参考值"`
- ScopeList string `json:"scope_list" gorm:"type:text; COMMENT:'范围value 值,type =1为正常、2及以上为异 常'" description:"范围value 值,type =1为正常、2及以上为异 常"`
- Text string `json:"text" gorm:"type:varchar(255); COMMENT:'文本'" description:"文本"`
- Details string `json:"details" gorm:"type:text; COMMENT:'描述'" description:"描述"`
- Unit string `json:"unit" gorm:"type:varchar(255); COMMENT:'单位'" description:"单位"`
- Remark string `json:"remark" gorm:"type:varchar(255); COMMENT:'备注'" description:"备注"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); COMMENT:'删除标志'" description:"删除标志"`
- }
-
- func (CheckItem) TableName() string {
- return "check_item"
- }
-
- //检测记录
- type CheckRecord struct {
- Id int64 `json:"id" gorm:"type:bigint(20); NOT NULL; primary_key; COMMENT:'检测记录ID'" description:"检测记录ID"`
- CheckType string `json:"check_type" gorm:"type:varchar(255); COMMENT:'检测类型(试纸类型)'" description:"检测类型(试纸类型)"`
- PutSources string `json:"put_sources" gorm:"type:varchar(255); COMMENT:'上传数据来源'" description:"上传数据来源"`
- DeviceId uint64 `json:"device_id" gorm:"type:bigint(20) unsigned; COMMENT:'设备ID'" description:"设备ID"`
- DeviceStatus int `json:"device_status" gorm:"type:int(2); COMMENT:'设备状态'" description:"设备状态"`
- MessageId string `json:"message_id" gorm:"type:varchar(255); COMMENT:'设备消息id'" description:"设备消息id"`
- UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; DEFAULT:'0'; COMMENT:'用户ID'" description:"用户ID"`
- UserHealthProfileId int64 `json:"user_health_profile_id" gorm:"type:bigint(20); DEFAULT:'0'; COMMENT:'健康档案ID'" description:"健康档案ID"`
- View int `json:"view" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'查看:1(已查看) 0(未查看)'" description:"查看:1(已查看) 0(未查看)"`
- AlertItemIds string `json:"alert_item_ids" gorm:"type:varchar(255); COMMENT:'异常项目id (1,2,3)'" description:"异常项目id (1,2,3)"`
- Acc int `json:"acc" gorm:"type:int(10); COMMENT:'设备检测次数'" description:"设备检测次数"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间 '" description:"创建时间 "`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间'" description:"更新时间"`
- DeleteFlag int `json:"delete_flag" gorm:"type:int(1); DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
- }
-
- func (CheckRecord) TableName() string {
- return "check_record"
- }
-
- //检测记录详情
- type CheckRecordItem struct {
- Id int64 `json:"id" gorm:"type:bigint(20) auto_increment; NOT NULL; primary_key"`
- CheckId int64 `json:"check_id" gorm:"type:bigint(20); NOT NULL; DEFAULT:'0'"`
- CheckItemId int `json:"check_item_id" gorm:"type:int(11); COMMENT:'检测项目id'" description:"检测项目id"`
- CheckValue string `json:"check_value" gorm:"type:varchar(255); COMMENT:'检测结果数值'" description:"检测结果数值"`
- CheckValueIndex int `json:"check_value_index" gorm:"type:int(3); COMMENT:'check_item value index'" description:"check_item value index"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP"`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"`
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); COMMENT:'删除标志'" description:"删除标志"`
- }
-
- func (CheckRecordItem) TableName() string {
- return "check_record_item"
- }
-
- //设备表
- type Device struct {
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'设备ID'" description:"设备ID"`
- Name string `json:"name" gorm:"type:varchar(255); COMMENT:'设备名称'" description:"设备名称"`
- Serialno string `json:"serialno" gorm:"type:varchar(64); COMMENT:'设备编号'" description:"设备编号"`
- DeviceName string `json:"device_name" gorm:"type:varchar(255); COMMENT:'设备名称'" description:"设备名称"`
- DeviceType string `json:"device_type" gorm:"type:varchar(11); COMMENT:'设备类型'" description:"设备类型"`
- InformType int `json:"inform_type" gorm:"type:int(1); COMMENT:'通知类型:0跳转小程序、1跳转网页 、默认跳转小程序'" description:"通知类型:0跳转小程序、1跳转网页 、默认跳转小程序"`
- Mac string `json:"mac" gorm:"type:varchar(255)"`
- Mcu string `json:"mcu" gorm:"type:varchar(255)"`
- BatchNumber int `json:"batch_number" gorm:"type:int(10); COMMENT:'批号'" description:"批号"`
- ProductionDateNumber int `json:"production_date_number" gorm:"type:int(10); COMMENT:'生产日期'" description:"生产日期"`
- Number int `json:"number" gorm:"type:int(10); COMMENT:'序号'" description:"序号"`
- QrCode string `json:"qr_code" gorm:"type:varchar(255)"`
- EmqPassword string `json:"emq_password" gorm:"type:varchar(255); COMMENT:'emq密码'" description:"emq密码"`
- 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:已售出)"`
- Ver string `json:"ver" gorm:"type:varchar(255); COMMENT:'软件版本'" description:"软件版本"`
- OemCompany int `json:"oem_company" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'厂商(0:自营 1:艾玛OEM)'" description:"厂商(0:自营 1:艾玛OEM)"`
- McuType string `json:"mcu_type" gorm:"type:varchar(32); COMMENT:'MCU芯片类型'" description:"MCU芯片类型"`
- SensorMode string `json:"sensor_mode" gorm:"type:varchar(32); COMMENT:'传感放大倍数'" description:"传感放大倍数"`
- Language string `json:"language" gorm:"type:varchar(32); COMMENT:'语言'" description:"语言"`
- PaperCheck int `json:"paper_check" gorm:"type:int(11); COMMENT:'试纸检查状态'" description:"试纸检查状态"`
- WifiVer string `json:"wifi_ver" gorm:"type:varchar(32); COMMENT:'WIFI版本'" description:"WIFI版本"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
- OrgID int64 `json:"org_id" gorm:"type:bigint(20); NOT NULL; default:0; COMMENT:'所属机构'" description:"所属机构"`
- }
-
- func (Device) TableName() string {
- return "device"
- }
-
- //设备消息日志
- type DeviceMessageLog struct {
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key"`
- MessageId string `json:"message_id" gorm:"type:varchar(255)"`
- DeviceName string `json:"device_name" gorm:"type:varchar(255)"`
- Topic string `json:"topic" gorm:"type:varchar(255)"`
- EventType string `json:"event_type" gorm:"type:varchar(255)"`
- Content string `json:"content" gorm:"type:text; COMMENT:'消息内容'" description:"消息内容"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
- }
-
- func (DeviceMessageLog) TableName() string {
- return "device_message_log"
- }
-
- //设备绑定表
- type DeviceRelate struct {
- Id int64 `json:"id" gorm:"type:bigint(20) auto_increment; NOT NULL; primary_key; COMMENT:'id'" description:"id"`
- Name string `json:"name" gorm:"type:varchar(255); COMMENT:'名称'" description:"名称"`
- DeviceId uint64 `json:"device_id" gorm:"type:bigint(20) unsigned; COMMENT:'设备Id'" description:"设备Id"`
- UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; COMMENT:'会员Id'" description:"会员Id"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志(解绑时标记为删除)'" description:"删除标志(解绑时标记为删除)"`
- OrgID int64 `json:"org_id" gorm:"type:bigint(20); NOT NULL; default:0; COMMENT:'所属机构'" description:"所属机构"`
- }
-
- func (DeviceRelate) TableName() string {
- return "device_relate"
- }
-
- type SysDictionary struct {
- Id int `json:"id" gorm:"type:int(11) auto_increment; NOT NULL; primary_key"`
- NameEn string `json:"name_en" gorm:"type:varchar(255)"`
- NameCh string `json:"name_ch" gorm:"type:text"`
- Type string `json:"type" gorm:"type:varchar(255)"`
- ParentId int `json:"parent_id" gorm:"type:int(11)"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP"`
- DeleteFlag int `json:"delete_flag" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
- }
-
- func (SysDictionary) TableName() string {
- return "sys_dictionary"
- }
-
- //用户健康档案
- type UserHealthProfile struct {
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'" description:"Primary Key ID"`
- UserId uint64 `json:"user_id" gorm:"type:bigint(20) unsigned; NOT NULL; COMMENT:'用户ID'" description:"用户ID"`
- RealName string `json:"real_name" gorm:"type:varchar(64); COMMENT:'真实姓名'" description:"真实姓名"`
- IdCard string `json:"id_card" gorm:"type:varchar(64); COMMENT:'身份证号'" description:"身份证号"`
- InpatientRegPhone string `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'" description:"住院登记手机号"`
- Gender int `json:"gender" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'性别(0:未知 1:男 2:女)'" description:"性别(0:未知 1:男 2:女)"`
- Height int `json:"height" gorm:"type:int(11); COMMENT:'身高'" description:"身高"`
- Weight float64 `json:"weight" gorm:"COMMENT:'体重'" description:"体重"`
- BloodType string `json:"blood_type" gorm:"type:varchar(32); COMMENT:'血型'" description:"血型"`
- Birthday time.Time `json:"birthday" gorm:"type:datetime; COMMENT:'生日'" description:"生日"`
- IllnessState string `json:"illness_state" gorm:"type:varchar(255); COMMENT:'病情'" description:"病情"`
- RenalFunctionStatus int `json:"renal_function_status" gorm:"type:int(11); COMMENT:'肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)'" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
- Creatinine float64 `json:"creatinine" gorm:"DEFAULT:'0'; COMMENT:'血肌酐'" description:"血肌酐"`
- CreatinineUnit string `json:"creatinine_unit" gorm:"type:varchar(32); COMMENT:'肌酐单位(umol/L,mg/dl)'" description:"肌酐单位(umol/L,mg/dl)"`
- CreatineTime time.Time `json:"creatine_time" gorm:"type:datetime; COMMENT:'肌酐检测时间'" description:"肌酐检测时间"`
- UrineProtein24hUnit string `json:"urine_protein_24h_unit" gorm:"column:urine_protein_24h_unit; type:varchar(32); COMMENT:'24小时尿蛋白单位(g/24h,mg/24h)'" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
- UrineProtein24h float64 `json:"urine_protein_24h" gorm:"column:urine_protein_24h;NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'" description:"24小时尿蛋白"`
- UrineProtein24hTime time.Time `json:"urine_protein_24h_time" gorm:"column:urine_protein_24h_time;type:datetime; COMMENT:'24小时尿蛋白检测时间'" description:"24小时尿蛋白检测时间"`
- UrineProtein float64 `json:"urine_protein" gorm:" NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'" description:"尿蛋白"`
- UrineProteinUnit string `json:"urine_protein_unit" gorm:"column:urine_protein_unit; type:varchar(32); COMMENT:'尿蛋白单位(g,mg)'" description:"尿蛋白单位(g,mg)"`
- UrineProteinTime time.Time `json:"urine_protein_time" gorm:"column:urine_protein_time;type:datetime; COMMENT:'尿蛋白检测时间'" description:"尿蛋白检测时间"`
- Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0:无效 )'" description:"状态(1:有效 0:无效 )"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
- }
-
- func (UserHealthProfile) TableName() string {
- return "user_health_profile"
- }
-
- //小程序用户表(个人中心)
- type XcxUser struct {
- Id uint64 `json:"id" gorm:"type:bigint(20) unsigned auto_increment; NOT NULL; primary_key; COMMENT:'Primary Key ID'" description:"Primary Key ID"`
- Phone string `json:"phone" gorm:"type:varchar(32); COMMENT:'手机号码'" description:"手机号码"`
- Email string `json:"email" gorm:"type:varchar(255); COMMENT:'邮件'" description:"邮件"`
- OpenId string `json:"open_id" gorm:"type:varchar(255); COMMENT:'OpenID'" description:"OpenID"`
- UnionId string `json:"union_id" gorm:"type:varchar(255); COMMENT:'unionid'" description:"unionid"`
- NickName string `json:"nick_name" gorm:"type:varchar(64); COMMENT:'昵称'" description:"昵称"`
- Avatar string `json:"avatar" gorm:"type:varchar(255); COMMENT:'头像'" description:"头像"`
- Status int `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0: 无效)'" description:"状态(1:有效 0: 无效)"`
- RoleType int `json:"role_type" gorm:"type:int(2); COMMENT:'角色类型 0或空:普通 1:管理员 2:测试'" description:"角色类型 0或空:普通 1:管理员 2:测试"`
- Source string `json:"source" gorm:"type:varchar(255); COMMENT:'用户来源'" description:"用户来源"`
- PrivacyProtocolVersions int `json:"privacy_protocol_versions" gorm:"type:int(2); COMMENT:'隐私政策版本'" description:"隐私政策版本"`
- PatientId int64 `gorm:"column:patient_id" json:"patient_id" form:"patient_id"`
- UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
- Ctime time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
- Mtime time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
-
- SessionKey string `json:"session_key" gorm:"-"`
- }
-
- func (XcxUser) TableName() string {
- return "xcx_user"
- }
-
- type XcxPatients struct {
- ID int64 `gorm:"column:id" json:"id" form:"id"`
- UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
- UserId int64 `gorm:"column:user_id" json:"user_id" form:"user_id"`
- Avatar string `gorm:"column:avatar" json:"avatar" form:"avatar"`
- PatientType int64 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
- DialysisNo string `gorm:"column:dialysis_no" json:"dialysis_no" form:"dialysis_no"`
- AdmissionNumber string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
- Source int64 `gorm:"column:source" json:"source" form:"source"`
- Lapseto int64 `gorm:"column:lapseto" json:"lapseto" form:"lapseto"`
- PartitionId int64 `gorm:"column:partition_id" json:"partition_id" form:"partition_id"`
- BedId int64 `gorm:"column:bed_id" json:"bed_id" form:"bed_id"`
- Name string `gorm:"column:name" json:"name" form:"name"`
- Alias string `gorm:"column:alias" json:"alias" form:"alias"`
- Gender int64 `gorm:"column:gender" json:"gender" form:"gender"`
- MaritalStatus int64 `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
- IdCardNo string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
- Birthday int64 `gorm:"column:birthday" json:"birthday" form:"birthday"`
- ReimbursementWayId int64 `gorm:"column:reimbursement_way_id" json:"reimbursement_way_id" form:"reimbursement_way_id"`
- HealthCareType int64 `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
- HealthCareNo string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
- HealthCareDueDate int64 `gorm:"column:health_care_due_date" json:"health_care_due_date" form:"health_care_due_date"`
- Height int64 `gorm:"column:height" json:"height" form:"height"`
- BloodType int64 `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
- Rh int64 `gorm:"column:rh" json:"rh" form:"rh"`
- HealthCareDueAlertDate int64 `gorm:"column:health_care_due_alert_date" json:"health_care_due_alert_date" form:"health_care_due_alert_date"`
- EducationLevel int64 `gorm:"column:education_level" json:"education_level" form:"education_level"`
- Profession int64 `gorm:"column:profession" json:"profession" form:"profession"`
- Phone string `gorm:"column:phone" json:"phone" form:"phone"`
- HomeTelephone string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
- RelativePhone string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
- RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
- HomeAddress string `gorm:"column:home_address" json:"home_address" form:"home_address"`
- WorkUnit string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
- UnitAddress string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
- Children int64 `gorm:"column:children" json:"children" form:"children"`
- ReceivingDate int64 `gorm:"column:receiving_date" json:"receiving_date" form:"receiving_date"`
- IsHospitalFirstDialysis int64 `gorm:"column:is_hospital_first_dialysis" json:"is_hospital_first_dialysis" form:"is_hospital_first_dialysis"`
- FirstDialysisDate int64 `gorm:"column:first_dialysis_date" json:"first_dialysis_date" form:"first_dialysis_date"`
- FirstDialysisHospital string `gorm:"column:first_dialysis_hospital" json:"first_dialysis_hospital" form:"first_dialysis_hospital"`
- PredialysisCondition string `gorm:"column:predialysis_condition" json:"predialysis_condition" form:"predialysis_condition"`
- PreHospitalDialysisFrequency string `gorm:"column:pre_hospital_dialysis_frequency" json:"pre_hospital_dialysis_frequency" form:"pre_hospital_dialysis_frequency"`
- PreHospitalDialysisTimes int64 `gorm:"column:pre_hospital_dialysis_times" json:"pre_hospital_dialysis_times" form:"pre_hospital_dialysis_times"`
- HospitalFirstDialysisDate int64 `gorm:"column:hospital_first_dialysis_date" json:"hospital_first_dialysis_date" form:"hospital_first_dialysis_date"`
- InductionPeriod int64 `gorm:"column:induction_period" json:"induction_period" form:"induction_period"`
- InitialDialysis int64 `gorm:"column:initial_dialysis" json:"initial_dialysis" form:"initial_dialysis"`
- TotalDialysis int64 `gorm:"column:total_dialysis" json:"total_dialysis" form:"total_dialysis"`
- AttendingDoctorId int64 `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
- HeadNurseId int64 `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
- Evaluate string `gorm:"column:evaluate" json:"evaluate" form:"evaluate"`
- Diagnose string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
- Remark string `gorm:"column:remark" json:"remark" form:"remark"`
- RegistrarsId int64 `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
- Registrars string `gorm:"column:registrars" json:"registrars" form:"registrars"`
- QrCode string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
- BindingState int64 `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
- PatientComplains string `gorm:"column:patient_complains" json:"patient_complains" form:"patient_complains"`
- PresentHistory string `gorm:"column:present_history" json:"present_history" form:"present_history"`
- PastHistory string `gorm:"column:past_history" json:"past_history" form:"past_history"`
- Temperature float64 `gorm:"column:temperature" json:"temperature" form:"temperature"`
- Pulse int64 `gorm:"column:pulse" json:"pulse" form:"pulse"`
- Respiratory int64 `gorm:"column:respiratory" json:"respiratory" form:"respiratory"`
- Sbp int64 `gorm:"column:sbp" json:"sbp" form:"sbp"`
- Dbp int64 `gorm:"column:dbp" json:"dbp" form:"dbp"`
- Status int64 `gorm:"column:status" json:"status" form:"status"`
- CreatedTime int64 `gorm:"column:created_time" json:"created_time" form:"created_time"`
- UpdatedTime int64 `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
- Nation string `gorm:"column:nation" json:"nation" form:"nation"`
- NativePlace string `gorm:"column:native_place" json:"native_place" form:"native_place"`
- Age int64 `gorm:"column:age" json:"age" form:"age"`
- InfectiousNextRecordTime int64 `gorm:"column:infectious_next_record_time" json:"infectious_next_record_time" form:"infectious_next_record_time"`
- IsInfectious int64 `gorm:"column:is_infectious" json:"is_infectious" form:"is_infectious"`
- RemindCycle int64 `gorm:"column:remind_cycle" json:"remind_cycle" form:"remind_cycle"`
- ResponseResult string `gorm:"column:response_result" json:"response_result" form:"response_result"`
- IsOpenRemind int64 `gorm:"column:is_open_remind" json:"is_open_remind" form:"is_open_remind"`
- FirstTreatmentDate int64 `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
- DialysisAge int64 `gorm:"column:dialysis_age" json:"dialysis_age" form:"dialysis_age"`
- ExpenseKind int64 `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
- TellPhone string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
- ContactName string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
- UserSysBeforeCount int64 `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
- IsExcelExport int64 `gorm:"column:is_excel_export" json:"is_excel_export" form:"is_excel_export"`
- SchRemark string `gorm:"column:sch_remark" json:"sch_remark" form:"sch_remark"`
- OutReason string `gorm:"column:out_reason" json:"out_reason" form:"out_reason"`
- DeathTime int64 `gorm:"column:death_time" json:"death_time" form:"death_time"`
- }
-
- func (XcxPatients) TableName() string {
-
- return "xt_patients"
- }
-
- // SyhArticles 表示文章表的模型
- type SyhArticles struct {
- ID uint `json:"id" gorm:"column:id; type:int(10) unsigned; primary_key; auto_increment; comment:'自增主键ID'" description:"自增主键ID"`
- Title string `json:"title" gorm:"column:title; type:varchar(255); not null; comment:'标题'" description:"标题"`
- Summary string `json:"summary" gorm:"column:summary; type:varchar(255); not null; default:''; comment:'简介'" description:"简介"`
- Content string `json:"content" gorm:"column:content; type:longtext; not null; comment:'内容'" description:"内容"`
- ArticleType uint8 `json:"article_type" gorm:"column:article_type; type:tinyint(1) unsigned; not null; default:'1'; comment:'1普通2视频'" description:"文章类型"`
- Num uint `json:"num" gorm:"column:num; type:int(10) unsigned; default:'0'; comment:'点击次数'" description:"点击次数"`
- Ctime int `json:"ctime" gorm:"column:ctime; type:int(10); not null; default:'0'; comment:'创建时间'" description:"创建时间"`
- NewTime int `json:"new_time" gorm:"column:new_time; type:int(10); not null; default:'0'; comment:'作为新建时间,ctime作为发布修改时间'" description:"新建时间"`
- Img string `json:"img" gorm:"column:img; type:varchar(255); comment:'图片'" description:"图片"`
- MenuID uint `json:"menu_id" gorm:"column:menu_id; type:int(10) unsigned; not null; default:'1'; comment:'辅分类'" description:"辅分类"`
- ClassID uint `json:"class_id" gorm:"column:class_id; type:int(10) unsigned; not null; default:'1'; comment:'主分类'" description:"主分类"`
- Author string `json:"author" gorm:"column:author; type:varchar(20); not null; default:''; comment:'作者'" description:"作者"`
- Tags string `json:"tags" gorm:"column:tags; type:varchar(50); comment:'标签'" description:"标签"`
- IsDel uint8 `json:"is_del" gorm:"column:is_del; type:tinyint(1) unsigned; not null; default:'0'; comment:'是否删除'" description:"是否删除"`
- Status uint8 `json:"status" gorm:"column:status; type:tinyint(1) unsigned; not null; default:'0'; comment:'状态'" description:"状态"`
- Reason string `json:"reason" gorm:"column:reason; type:varchar(100); comment:'原因'" description:"原因"`
- FromID uint `json:"from_id" gorm:"column:from_id; type:int(10) unsigned; not null; default:'0'; comment:'医生/机构ID'" description:"医生/机构ID"`
- Type uint8 `json:"type" gorm:"column:type; type:tinyint(1) unsigned; not null; default:'0'; comment:'类型'" description:"类型"`
- StarNum uint `json:"star_num" gorm:"column:star_num; type:int(10) unsigned; not null; default:'0'; comment:'点赞数'" description:"点赞数"`
- CommentNum uint `json:"comment_num" gorm:"column:comment_num; type:int(10) unsigned; not null; default:'0'; comment:'评论数'" description:"评论数"`
- TID uint `json:"t_id" gorm:"column:t_id; type:int(10) unsigned; comment:'原表ID,移动数据用'" description:"原表ID"`
- TModule string `json:"t_module" gorm:"column:t_module; type:varchar(50); comment:'模块'" description:"模块"`
- OrgID uint `json:"org_id" gorm:"column:org_id; type:int(10); comment:'orgId'" description:"orgId"`
- }
-
- // TableName 设置表名
- func (SyhArticles) TableName() string {
- return "syh_articles"
- }
-
- type SyhArticlesMenu struct {
- ID uint `json:"id" gorm:"column:id; type:int(10) unsigned; primary_key; auto_increment; comment:'自增主键ID'" description:"自增主键ID"`
- Name string `json:"name" gorm:"column:name; type:varchar(255); not null; default:''; comment:'分类名'" description:"分类名"`
- Order uint16 `json:"order" gorm:"column:order; type:smallint(4) unsigned; not null; default:'0'; comment:'排序'" description:"排序"`
- Status uint8 `json:"status" gorm:"column:status; type:tinyint(1) unsigned; not null; default:'1'; comment:'状态'" description:"状态"`
- Img string `json:"img" gorm:"column:img; type:varchar(255); comment:'图片'" description:"图片"`
- Summary string `json:"summary" gorm:"column:summary; type:varchar(255); default:''; comment:'介绍'" description:"介绍"`
- Type uint8 `json:"type" gorm:"column:type; type:tinyint(1) unsigned; not null; comment:'分类1主2辅'" description:"分类类型"`
- }
-
- // TableName 设置表名
- func (SyhArticlesMenu) TableName() string {
- return "syh_articles_menu"
- }
-
- // SyhArticlesComment 表示文章评论表的模型
- type SyhArticlesComment struct {
- ID uint `json:"id" gorm:"column:id; type:int(10) unsigned; primary_key; auto_increment; comment:'自增主键ID'" description:"自增主键ID"`
- ArticleID uint `json:"article_id" gorm:"column:article_id; type:int(10) unsigned; not null; comment:'动态ID'" description:"动态ID"`
- UserID uint `json:"user_id" gorm:"column:user_id; type:int(10) unsigned; not null; comment:'评论者用户ID'" description:"评论者用户ID"`
- PID uint `json:"pid" gorm:"column:pid; type:int(10) unsigned; not null; default:'0'; comment:'父级ID'" description:"父级ID"`
- Content string `json:"content" gorm:"column:content; type:text; not null; comment:'评论内容'" description:"评论内容"`
- Ctime time.Time `json:"ctime" gorm:"column:ctime; type:int(10) unsigned; not null; comment:'评论时间'" description:"评论时间"`
- Status uint8 `json:"status" gorm:"column:status; type:tinyint(1) unsigned; not null; default:'1'; comment:'状态'" description:"状态"`
- IsDel uint8 `json:"is_del" gorm:"column:is_del; type:tinyint(1) unsigned; not null; default:'0'; comment:'1:删除 0:未删除'" description:"是否删除"`
- Type uint8 `json:"type" gorm:"column:type; type:tinyint(1) unsigned zerofill; not null; default:'1'; comment:'0用户1医生2科室3企业'" description:"类型"`
- TAID uint `json:"t_aid" gorm:"column:t_aid; type:int(10) unsigned; comment:'原表ID,移动数据用'" description:"原表ID"`
- TModule string `json:"t_module" gorm:"column:t_module; type:varchar(50); not null; default:'0'; comment:'模块'" description:"模块"`
- TID int `json:"t_id" gorm:"column:t_id; type:int(11); not null; default:'0'; comment:'备用ID'" description:"备用ID"`
- StarNum uint `json:"star_num" gorm:"column:star_num; type:int(10) unsigned; not null; default:'0'; comment:'点赞数'" description:"点赞数"`
- CommentNum uint `json:"comment_num" gorm:"column:comment_num; type:int(10) unsigned; not null; default:'0'; comment:'评论数'" description:"评论数"`
- CommentID uint `json:"comment_id" gorm:"column:comment_id; type:int(10) unsigned; not null; default:'0'; comment:'在评论详情页面时用'" description:"评论ID"`
- }
-
- // CheckItemNews 表示新闻条目的结构体
- type CheckItemNews struct {
- ID int64 `gorm:"column:id;primary_key;auto_increment:false" json:"id" description:"主键,唯一标识每条记录"`
- AuthorID int64 `gorm:"column:author_id" json:"author_id" description:"新闻作者的ID"`
- Title string `gorm:"column:title" json:"title" description:"新闻标题"`
- Introduction string `gorm:"column:introduction" json:"introduction" description:"新闻简介或摘要"`
- Tags string `gorm:"column:tags" json:"tags" description:"新闻标签,用以分类或检索"`
- ReadingQuantity int `gorm:"column:reading_quantity" json:"reading_quantity" description:"阅读量"`
- ContentImages string `gorm:"column:content_images" json:"content_images" description:"存储新闻内容中的图片路径,可能为逗号分隔的字符串或JSON格式"`
- CommentCount int `gorm:"column:comment_count" json:"comment_count" description:"评论数"`
- LikeCount int `gorm:"column:like_count" json:"like_count" description:"点赞数"`
- CollectCount int `gorm:"column:collect_count" json:"collect_count" description:"收藏数"`
- Content string `gorm:"column:content" json:"content" description:"新闻正文内容"`
- Status int `gorm:"column:status" json:"status" description:"新闻状态(例如,草稿、已发布等)"`
- DeleteFlag int `gorm:"column:delete_flag" json:"delete_flag" description:"删除标记,0表示未删除,1表示已删除"`
- StyleType int `gorm:"column:style_type" json:"style_type" description:"显示样式类型,可能用于控制前端展示效果"`
- SortInTag string `gorm:"column:sort_in_tag" json:"sort_in_tag" description:"在特定标签内的排序规则"`
- UpdateTime time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP;on_update:CURRENT_TIMESTAMP" json:"update_time" description:"记录最后更新的时间,自动更新"`
- CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP" json:"create_time" description:"创建时间"`
- }
-
- // TableName 返回表名
- func (CheckItemNews) TableName() string {
- return "check_item_news"
- }
-
- // SysAdmin 管理员信息表
- type SysAdmin struct {
- ID int `gorm:"column:id;primaryKey;autoIncrement" json:"id" description:"用户ID"` // 用户ID
- DeptID int `gorm:"column:dept_id" json:"dept_id" description:"部门ID"` // 部门ID
- UserName string `gorm:"column:user_name;not null" json:"user_name" description:"用户账号"` // 用户账号
- NickName string `gorm:"column:nick_name;not null" json:"nick_name" description:"用户昵称"` // 用户昵称
- UserType string `gorm:"column:user_type;default:'00'" json:"user_type" description:"用户类型(00系统用户)"` // 用户类型(00系统用户)
- Email string `gorm:"column:email;default:''" json:"email" description:"用户邮箱"` // 用户邮箱
- Phonenumber string `gorm:"column:phonenumber;default:''" json:"phonenumber" description:"手机号码"` // 手机号码
- Sex string `gorm:"column:sex;default:'0'" json:"sex" description:"用户性别(0男 1女 2未知)"` // 用户性别(0男 1女 2未知)
- Avatar string `gorm:"column:avatar;default:''" json:"avatar" description:"头像地址"` // 头像地址
- Password string `gorm:"column:password;default:''" json:"password" description:"密码"` // 密码
- Status string `gorm:"column:status;default:'0'" json:"status" description:"帐号状态(0正常 1停用)"` // 帐号状态(0正常 1停用)
- DelFlag string `gorm:"column:del_flag;default:'0'" json:"del_flag" description:"删除标志(0代表存在 2代表删除)"` // 删除标志(0代表存在 2代表删除)
- LoginIP string `gorm:"column:login_ip;default:''" json:"login_ip" description:"最后登录IP"` // 最后登录IP
- LoginDate time.Time `gorm:"column:login_date" json:"login_date" description:"最后登录时间"` // 最后登录时间
- Ctime time.Time `gorm:"column:ctime" json:"ctime" description:"创建时间"` // 创建时间
- Mtime time.Time `gorm:"column:mtime" json:"mtime" description:"更新时间"` // 更新时间
- Remark string `gorm:"column:remark" json:"remark" description:"备注"` // 备注
- }
-
- // TableName 设置表名
- func (SysAdmin) TableName() string {
- return "sys_admin"
- }
|