完成基础脚手架

This commit is contained in:
LeeX
2022-05-09 09:00:14 +08:00
parent 632c76dfa6
commit 5fd8e0a694
37 changed files with 2867 additions and 0 deletions

21
model/entity/user.go Normal file
View 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"
}