feat(cache):增加向redis保存用户会话的函数。

This commit is contained in:
徐涛
2022-08-11 17:33:32 +08:00
parent 230e366a7f
commit 5ebf6b0431
2 changed files with 53 additions and 0 deletions

11
model/session.go Normal file
View File

@@ -0,0 +1,11 @@
package model
import "time"
type Session struct {
Uid string `json:"uid"`
Name string `json:"name"`
Type int8 `json:"type"`
Token string `json:"token"`
ExpiresAt time.Time `json:"expiresAt"`
}