完成基础功能

This commit is contained in:
zyj
2025-09-02 11:39:06 +08:00
parent a94f6b5a25
commit b67fef0683
7 changed files with 126 additions and 18 deletions

17
models/user_token.go Normal file
View File

@@ -0,0 +1,17 @@
package models
import "time"
type UserToken struct {
ID int8 `gorm:"id;primary_key"`
UserId int8 `gorm:"UserId"`
Token string `gorm:"token"`
ExpirationTime time.Time `gorm:"expiration_time"`
CreatedAt time.Time `gorm:"created_at;type:timestamptz"`
UpdatedAt time.Time `gorm:"updated_at;type:timestamptz"`
}
// 实现 TableName 方法指定表名
func (UserToken) TableName() string {
return "user_token"
}