mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-15 19:02:27 +08:00
chore: rename field name
This commit is contained in:
@@ -3,17 +3,19 @@ package model
|
||||
|
||||
import "time"
|
||||
|
||||
// use snake_case as column name
|
||||
|
||||
// Account 博客账户
|
||||
type Account struct {
|
||||
Username string `gorm:"primaryKey"` // 用户名
|
||||
Password string `gorm:"not null"` // 密码
|
||||
Email string `gorm:"not null"` // 邮件地址
|
||||
PhoneN string `gorm:"not null"` // 手机号
|
||||
Address string `gorm:"not null"` // 地址信息
|
||||
Username string `gorm:"column:username;primaryKey" bson:"username"` // 用户名
|
||||
Password string `gorm:"column:password;not null" bson:"password"` // 密码
|
||||
Email string `gorm:"column:email;not null" bson:"email"` // 邮件地址
|
||||
PhoneN string `gorm:"column:phone_n;not null" bson:"phone_n"` // 手机号
|
||||
Address string `gorm:"column:address;not null" bson:"address"` // 地址信息
|
||||
|
||||
LogoutTime time.Time `gorm:"default:null"` // 登出时间
|
||||
LoginIP string `gorm:"default:null"` // 最近登录IP
|
||||
LoginUA string `gorm:"default:null"` // 最近登录IP
|
||||
LoginTime time.Time `gorm:"default:now()"` // 最近登录时间
|
||||
CreateTime time.Time `gorm:"default:now()"` // 创建时间
|
||||
LogoutAt time.Time `gorm:"column:logout_at;default:null" bson:"logout_at"` // 登出时间
|
||||
LoginIP string `gorm:"column:login_ip;default:null" bson:"login_ip"` // 最近登录IP
|
||||
LoginUA string `gorm:"column:login_ua;default:null" bson:"login_ua"` // 最近登录IP
|
||||
LoginAt time.Time `gorm:"column:login_at;default:now()" bson:"login_at"` // 最近登录时间
|
||||
CreatedAt time.Time `gorm:"column:creatd_at;default:now()" bson:"created_at"` // 创建时间
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user