You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
797 B
19 lines
797 B
package entity |
|
|
|
import "sig-pub/api/pb" |
|
|
|
// User 用户 |
|
type User struct { |
|
UserId int64 `gorm:"column:userid;primaryKey;" json:"userId"` // 用户id |
|
Account string `gorm:"column:account" json:"account"` // 登录账号 |
|
Username string `gorm:"column:username" json:"username"` // 用户名 |
|
Password string `gorm:"column:password" json:"password"` // 密码 |
|
Avatar string `gorm:"column:avatar" json:"avatar"` // 头像 |
|
Role pb.Role `gorm:"column:role" json:"role"` // 角色 0:普通用户 1:管理员 |
|
CreateAt int64 `gorm:"column:create_at" json:"createAt"` // 创建时间 |
|
UpdateAt int64 `gorm:"column:update_at" json:"updateAt"` // 更新时间 |
|
} |
|
|
|
func (User) TableName() string { |
|
return "t_user" |
|
}
|
|
|