mirror of
https://gitee.com/shikong-sk/gofiber-study
synced 2025-02-25 00:02:17 +08:00
26 lines
1.2 KiB
Go
26 lines
1.2 KiB
Go
package models
|
|
|
|
import (
|
|
"gofiber.study.skcks.cn/common/time"
|
|
)
|
|
|
|
type User struct {
|
|
Id string `xorm:"not null pk default '' VARCHAR(32)" json:"id"`
|
|
Account string `xorm:"not null default '' unique VARCHAR(255)" json:"account"`
|
|
Active bool `xorm:"not null default 0 TINYINT(1)" json:"active"`
|
|
Alias string `xorm:"not null default '' VARCHAR(255)" json:"alias"`
|
|
Contact string `xorm:"not null default '' VARCHAR(255)" json:"contact"`
|
|
Email string `xorm:"not null default '' unique VARCHAR(255)" json:"email"`
|
|
EmailVerify bool `xorm:"not null default 0 TINYINT(1)" json:"emailVerify"`
|
|
LastLoginTime time.Time `xorm:"not null index DATETIME(6) updated" json:"lastLoginTime"`
|
|
Memo string `xorm:"not null default '' VARCHAR(255)" json:"memo"`
|
|
Password string `xorm:"not null default '' VARCHAR(255)" json:"-"`
|
|
RegisterTime time.Time `xorm:"not null index DATETIME(6) created" json:"registerTime"`
|
|
Salt string `xorm:"not null default '' VARCHAR(255)" json:"-"`
|
|
UserName string `xorm:"not null default '' unique VARCHAR(255)" json:"userName"`
|
|
}
|
|
|
|
func (m *User) TableName() string {
|
|
return "user"
|
|
}
|