initial commit

This commit is contained in:
zp
2024-01-12 18:08:51 +08:00
commit 00122cc66d
74 changed files with 1957 additions and 0 deletions

22
internal/model/context.go Normal file
View File

@ -0,0 +1,22 @@
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 // 是否是管理员
}