2025-10-16 13:28:24 +08:00

52 lines
6.5 KiB
Go

// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
)
const TableNamePatient = "patient"
// Patient 患者表
type Patient struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"` // 主键
Mobile string `gorm:"column:mobile;not null;comment:手机号" json:"mobile"` // 手机号
Username string `gorm:"column:username;not null;comment:姓名" json:"username"` // 姓名
Sex int32 `gorm:"column:sex;not null;comment:性别(1:男 2:女)" json:"sex"` // 性别(1:男 2:女)
Password string `gorm:"column:password;not null;comment:密码" json:"password"` // 密码
Avatar string `gorm:"column:avatar;not null;comment:头像地址" json:"avatar"` // 头像地址
IDNumber string `gorm:"column:id_number;not null;comment:身份证号" json:"id_number"` // 身份证号
Birthday time.Time `gorm:"column:birthday;comment:出生日期" json:"birthday"` // 出生日期
BirthWeight int32 `gorm:"column:birth_weight;not null;comment:出生体重(克)" json:"birth_weight"` // 出生体重(克)
OperativeDate time.Time `gorm:"column:operative_date;comment:手术日期" json:"operative_date"` // 手术日期
NextFollowDate time.Time `gorm:"column:next_follow_date;comment:下次随访时间" json:"next_follow_date"` // 下次随访时间
ParityNumber int32 `gorm:"column:parity_number;not null;comment:胎次(0:未知 1:1胎 2:胎 3:胎 4:≥4胎)" json:"parity_number"` // 胎次(0:未知 1:1胎 2:胎 3:胎 4:≥4胎)
BirthNumber int32 `gorm:"column:birth_number;not null;comment:产次(0:未知 1:1产 2:2产 3:≥3产)" json:"birth_number"` // 产次(0:未知 1:1产 2:2产 3:≥3产)
ConceptionType int32 `gorm:"column:conception_type;not null;comment:受孕方式(0:未知 1:自然受孕 2:辅助生殖技术)" json:"conception_type"` // 受孕方式(0:未知 1:自然受孕 2:辅助生殖技术)
GestationalWeek int32 `gorm:"column:gestational_week;not null;comment:孕周" json:"gestational_week"` // 孕周
PrenatalCheckType int32 `gorm:"column:prenatal_check_type;not null;comment:产检是否异常(0:未知 1:有 2:无)" json:"prenatal_check_type"` // 产检是否异常(0:未知 1:有 2:无)
PrenatalCheckRemark string `gorm:"column:prenatal_check_remark;not null;comment:产检异常备注" json:"prenatal_check_remark"` // 产检异常备注
DeliveryType int32 `gorm:"column:delivery_type;not null;comment:分娩方式(0:未知 1:顺产 2:剖宫产)" json:"delivery_type"` // 分娩方式(0:未知 1:顺产 2:剖宫产)
RiskType int32 `gorm:"column:risk_type;not null;comment:风险类型(0:未知 1:低危 2:中危 3:高危)" json:"risk_type"` // 风险类型(0:未知 1:低危 2:中危 3:高危)
RiskValue string `gorm:"column:risk_value;not null;comment:风险值" json:"risk_value"` // 风险值
HeightGenerateCurveType int32 `gorm:"column:height_generate_curve_type;not null;comment:身高生长曲线类型(0:未知 1:轻度偏离 2:正常 3:重度偏离)" json:"height_generate_curve_type"` // 身高生长曲线类型(0:未知 1:轻度偏离 2:正常 3:重度偏离)
WeightGenerateCurveType int32 `gorm:"column:weight_generate_curve_type;not null;comment:体重生长曲线类型(0:未知 1:轻度偏离 2:正常 3:重度偏离)" json:"weight_generate_curve_type"` // 体重生长曲线类型(0:未知 1:轻度偏离 2:正常 3:重度偏离)
LoginStatus int32 `gorm:"column:login_status;not null;default:1;comment:登录状态(1:启用 0:禁用)" json:"login_status"` // 登录状态(1:启用 0:禁用)
LastLoginTime time.Time `gorm:"column:last_login_time;not null;default:CURRENT_TIMESTAMP;comment:最后一次登录时间" json:"last_login_time"` // 最后一次登录时间
LastLoginIP string `gorm:"column:last_login_ip;not null;comment:最后一次登录IP" json:"last_login_ip"` // 最后一次登录IP
LastLoginHash string `gorm:"column:last_login_hash;not null;comment:最后一次登录 Hash" json:"last_login_hash"` // 最后一次登录 Hash
WxUserID string `gorm:"column:wx_user_id;not null;comment:微信ID" json:"wx_user_id"` // 微信ID
CreatedUser string `gorm:"column:created_user;not null;comment:创建人" json:"created_user"` // 创建人
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
UpdatedUser string `gorm:"column:updated_user;not null;comment:更新人" json:"updated_user"` // 更新人
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
}
// TableName Patient's table name
func (*Patient) TableName() string {
return TableNamePatient
}