Files
go-user-service/models/user.go
2025-08-31 18:34:01 +08:00

22 lines
566 B
Go

package models
import "time"
type User struct {
ID int8 `gorm:"id;primary_key"`
Nickname string `gorm:"nickname"`
Username string `gorm:"username"`
Password string `gorm:"password"`
Email string `gorm:"email"`
Phone string `gorm:"phone"`
Status int `gorm:"status"`
Salt string `gorm:"salt"`
CreatedAt time.Time `gorm:"created_at;type:timestamptz"`
UpdatedAt time.Time `gorm:"updated_at;type:timestamptz"`
}
// 实现 TableName 方法指定表名
func (User) TableName() string {
return "d_user"
}