新增部分模块

This commit is contained in:
zyj
2025-08-31 18:34:01 +08:00
parent ee6914e92f
commit a94f6b5a25
9 changed files with 353 additions and 5 deletions

21
models/user.go Normal file
View File

@@ -0,0 +1,21 @@
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"
}