mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 07:06:36 +08:00
框架表改名 w_{name}
This commit is contained in:
@@ -62,6 +62,11 @@ type User struct {
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime;index"`
|
||||
}
|
||||
|
||||
// TableName 表名
|
||||
func (User) TableName() string {
|
||||
return "w_users"
|
||||
}
|
||||
|
||||
// SetPassword 设置明文密码
|
||||
func (u *User) SetPassword(password string) error {
|
||||
u.Password = password
|
||||
|
||||
Reference in New Issue
Block a user