✨ 完成基础脚手架
This commit is contained in:
21
model/entity/user.go
Normal file
21
model/entity/user.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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"
|
||||
}
|
Reference in New Issue
Block a user