This commit is contained in:
aozhiwei 2024-11-06 11:56:00 +08:00
parent 728396d024
commit b7c8fdfa2a

View File

@ -2,7 +2,7 @@ package model
type User struct {
Idx int64 `gorm:"column:idx;AUTO_INCREMENT"`
AccountId string `gorm:"column:account_id"`
AccountId string `gorm:"column:account_id;primaryKey"`
Avatar string `gorm:"column:avatar"`
NickName string `gorm:"column:nickname"`
Score string `gorm:"column:score"`
@ -12,6 +12,6 @@ type User struct {
ModifyTime int32 `gorm:"column:modifytime"`
}
func (this User) TableName() string {
func (this *User) TableName() string {
return "t_user"
}