Files
st-react/server/model/system/sys_api_token.go
Echo f4e166c5ee 🎉 初始化项目
Signed-off-by: Echo <1711788888@qq.com>
2026-02-27 21:52:00 +08:00

19 lines
616 B
Go

package system
import (
"time"
"git.echol.cn/loser/st/server/global"
)
type SysApiToken struct {
global.GVA_MODEL
UserID uint `json:"userId" gorm:"comment:用户ID"`
User SysUser `json:"user" gorm:"foreignKey:UserID;"`
AuthorityID uint `json:"authorityId" gorm:"comment:角色ID"`
Token string `json:"token" gorm:"type:text;comment:Token"`
Status bool `json:"status" gorm:"default:true;comment:状态"` // true有效 false无效
ExpiresAt time.Time `json:"expiresAt" gorm:"comment:过期时间"`
Remark string `json:"remark" gorm:"comment:备注"`
}