Files
novel/internal/model/context.go
2024-01-12 18:08:51 +08:00

23 lines
588 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/net/ghttp"
)
// Context 请求上下文结构
type Context struct {
Session *ghttp.Session // 当前Session管理对象
User *ContextUser // 上下文用户信息
Data g.Map // 自定KV变量业务模块根据需要设置不固定
}
// ContextUser 请求上下文中的用户信息
type ContextUser struct {
Id uint // 用户ID
// Name string // 用户账号
// //Nickname string // 用户名称
// //Avatar string // 用户头像
// IsAdmin uint8 // 是否是管理员
}