1 Star 0 Fork 0

rio/gin-admin-common

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
user_access_token.go 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
rio 提交于 2024-10-09 23:21 +08:00 . init
package model
import (
"time"
)
type UserAccessToken struct {
Model
UserId int64 `gorm:"column:user_id" json:"user_id"`
AccessToken string `gorm:"column:access_token" json:"access_token"`
UserType int `gorm:"column:user_type" json:"user_type"`
Revoked int `gorm:"column:revoked" json:"revoked"`
ExpiredAt time.Time `gorm:"column:expired_at" json:"expired_at"`
Platform int `gorm:"column:platform" json:"platform"` // 平台:1/安卓;2/ios;3/小程序;4/screen;5/gm;
}
const (
UserTypeAdmin = 1
UserTypeClient = 2
UserTypeGuest = 3
UserPlatformAndroid = 1
UserPlatformIos = 2
UserPlatformMiniPro = 3
UserPlatformScreen = 4
UserPlatformGm = 5
)
const (
UserIdRoot = iota + 1
UserIdAdmin
)
var (
UserTypes = map[int]string{1: "管理员", 2: "用户", 3: "访客"}
UserPlatformMap = map[int]string{
UserPlatformAndroid: "android",
UserPlatformIos: "ios",
UserPlatformMiniPro: "mini_pro",
UserPlatformScreen: "screen",
UserPlatformGm: "gm",
}
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/rio-studio/gin-admin-common.git
git@gitee.com:rio-studio/gin-admin-common.git
rio-studio
gin-admin-common
gin-admin-common
95b063965f95

搜索帮助