框架表改名 w_{name}

This commit is contained in:
ryan
2026-06-11 09:27:15 +08:00
parent 786fe71778
commit 312bc7d4d5
17 changed files with 245 additions and 21 deletions
+5
View File
@@ -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