修改数据库模型

This commit is contained in:
zyj
2025-09-12 18:24:52 +08:00
parent b67fef0683
commit 46fc102608
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ package models
import "time"
type User struct {
ID int8 `gorm:"id;primary_key"`
ID int64 `gorm:"id;primary_key"`
Nickname string `gorm:"nickname"`
Username string `gorm:"username"`
Password string `gorm:"password"`

View File

@@ -3,8 +3,8 @@ package models
import "time"
type UserToken struct {
ID int8 `gorm:"id;primary_key"`
UserId int8 `gorm:"UserId"`
ID int64 `gorm:"id;primary_key"`
UserId int64 `gorm:"UserId"`
Token string `gorm:"token"`
ExpirationTime time.Time `gorm:"expiration_time"`
CreatedAt time.Time `gorm:"created_at;type:timestamptz"`