Support longer legacy token keys

This commit is contained in:
XiaoAI1024
2026-04-23 13:29:00 +08:00
parent 01c2e909a0
commit 2431efc01f
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ import (
type Token struct {
Id int `json:"id"`
UserId int `json:"user_id" gorm:"index"`
Key string `json:"key" gorm:"type:char(48);uniqueIndex"`
Key string `json:"key" gorm:"type:varchar(128);uniqueIndex"`
Status int `json:"status" gorm:"default:1"`
Name string `json:"name" gorm:"index" `
CreatedTime int64 `json:"created_time" gorm:"bigint"`