获取用户菜单列表,新增医生管理

This commit is contained in:
2023-07-03 15:35:42 +08:00
parent 869666a831
commit 28df69f9e2
9 changed files with 401 additions and 5 deletions
+25
View File
@@ -0,0 +1,25 @@
package model
// User 用户主表
type User struct {
UserId int64 `gorm:"column:user_id;type:bigint(19);primary_key;comment:主键" json:"user_id"`
UserName string `gorm:"column:user_name;type:varchar(50);comment:用户名称" json:"user_name"`
UserAccount string `gorm:"column:user_account;type:varchar(50);comment:账号" json:"user_account"`
Mobile string `gorm:"column:mobile;type:varchar(20);comment:手机号" json:"mobile"`
WxMobile string `gorm:"column:wx_mobile;type:varchar(20);comment:微信手机号" json:"wx_mobile"`
UserPassword string `gorm:"column:user_password;type:varchar(50);comment:密码" json:"user_password"`
Salt string `gorm:"column:salt;type:varchar(50);comment:密码混淆码" json:"salt"`
UserType int `gorm:"column:user_type;type:tinyint(1);comment:用户类型(1:患者 2:医师 3:药师);NOT NULL" json:"user_type"`
UserStatus int `gorm:"column:user_status;type:tinyint(4);default:1;comment:状态(0:禁用 1:正常 2:删除)" json:"user_status"`
RegisterMethod int `gorm:"column:register_method;type:tinyint(1);comment:注册方式(1:微信小程序 " json:"register_method"`
Age uint `gorm:"column:age;type:int(10) unsigned;comment:年龄" json:"age"`
Sex int `gorm:"column:sex;type:tinyint(1);default:0;comment:性别(0:未知 1:男 2:女)" json:"sex"`
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`
LoginIp string `gorm:"column:login_ip;type:varchar(255);comment:登陆ip" json:"login_ip"`
LastLoginAt LocalTime `gorm:"column:last_login_at;type:datetime;comment:最后登陆时间" json:"last_login_at"`
Model
}
func (m *User) TableName() string {
return "gdxz_user"
}