22 lines
818 B
Go
22 lines
818 B
Go
package entity
|
|
|
|
import (
|
|
"ginDemo/common/types"
|
|
)
|
|
|
|
// User 普通用户表
|
|
type User struct {
|
|
types.BaseDbModel
|
|
Phone string `json:"phone" gorm:"type:varchar(255) not null comment '手机号'"`
|
|
Password string `json:"password" gorm:"type:varchar(255) not null comment '密码'"`
|
|
Nickname string `json:"nickname" gorm:"type:varchar(255) comment '昵称'"`
|
|
Avatar string `json:"avatar" gorm:"type:varchar(255) comment '头像'"`
|
|
Birthday *string `json:"birthday" gorm:"type:varchar(10); comment 生日"`
|
|
LastLoginAt *types.DateTime `json:"last_login_at" gorm:"comment:'最后登录时间'"`
|
|
LastLoginIp *string `json:"last_login_ip" gorm:"type:varchar(255) comment '最后登录ip'"`
|
|
}
|
|
|
|
func (User) TableName() string {
|
|
return "t_user"
|
|
}
|