Files
qitongxue-api/internal/model/entity/entity_users.go
2026-09-17 17:38:45 +08:00

29 lines
1.3 KiB
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 entity
import "github.com/gogf/gf/v2/os/gtime"
// Users 小程序/H5 用户
type Users struct {
Id int64 `json:"id"`
Openid string `json:"openid"`
Username string `json:"username"`
PasswordHash string `json:"password_hash"`
Nickname string `json:"nickname"`
AvatarUrl string `json:"avatar_url"`
LevelKey string `json:"level_key"`
// LevelExpireAt 会员/等级到期时间NULL 表示永不过期(如管理员手动分配的等级)。
// 已过期时由 EffectiveLevelKey 回落为 consts.DefaultLevelKey。
LevelExpireAt *gtime.Time `json:"level_expire_at"`
// SessionKey 微信 session_key用于虚拟支付用户态签名signature
// 每次 wx.login 换取的 session_key 会覆盖刷新。
// 注意:实体仅用于服务端内部,不会直接序列化给客户端(对外用 v1.UserInfo
SessionKey string `json:"session_key"`
// QuotaPeriodDays 该用户的额度重置周期。0 表示跟随全局设置
// settings.quota_period_days默认 7 天);管理端可对单个用户单独调整。
QuotaPeriodDays int `json:"quota_period_days"`
Status int `json:"status"`
CreatedAt *gtime.Time `json:"created_at"`
LastLoginAt *gtime.Time `json:"last_login_at"`
UpdatedAt *gtime.Time `json:"updated_at"`
}