修改数据库模型
This commit is contained in:
@@ -3,7 +3,7 @@ package models
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
ID int8 `gorm:"id;primary_key"`
|
ID int64 `gorm:"id;primary_key"`
|
||||||
Nickname string `gorm:"nickname"`
|
Nickname string `gorm:"nickname"`
|
||||||
Username string `gorm:"username"`
|
Username string `gorm:"username"`
|
||||||
Password string `gorm:"password"`
|
Password string `gorm:"password"`
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package models
|
|||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
type UserToken struct {
|
type UserToken struct {
|
||||||
ID int8 `gorm:"id;primary_key"`
|
ID int64 `gorm:"id;primary_key"`
|
||||||
UserId int8 `gorm:"UserId"`
|
UserId int64 `gorm:"UserId"`
|
||||||
Token string `gorm:"token"`
|
Token string `gorm:"token"`
|
||||||
ExpirationTime time.Time `gorm:"expiration_time"`
|
ExpirationTime time.Time `gorm:"expiration_time"`
|
||||||
CreatedAt time.Time `gorm:"created_at;type:timestamptz"`
|
CreatedAt time.Time `gorm:"created_at;type:timestamptz"`
|
||||||
|
|||||||
Reference in New Issue
Block a user