feat: Token生成|存储|验证

This commit is contained in:
Akkia
2022-05-18 10:10:35 +08:00
parent 5d356a30e2
commit 990394bf46
6 changed files with 188 additions and 55 deletions

View File

@@ -1,10 +1,7 @@
package model
import "time"
type ApiToken struct {
Common
UserId uint64 `json:"user_id"`
Token string `json:"token"`
TokenExpired time.Time `json:"token_expired"`
UserID uint64 `json:"user_id"`
Token string `json:"token"`
}