You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/oa/models/token.gen.go

41 lines
1.3 KiB
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package models
import "time"
type TokenSalt struct {
Username string `json:"username" parse:"json"`
Typ *string `json:"typ" parse:"json"`
}
type TokenPost struct {
UserID string `json:"user_id" gorm:"index;type:varchar(32)" parse:"json"`
// 两种获取token方式一种用token换取(应用登录)一种用密码加密code换(oa登录)
Token *string `json:"token" parse:"json"`
Salt *string `json:"salt" parse:"json"`
Code *string `json:"code" parse:"json"`
AppID *string `json:"app_id" gorm:"index;type:varchar(32)" parse:"json"`
ExpiredAt *time.Time `json:"expired_at" parse:"json"`
OverPerm *string `json:"over_perm" parse:"json"`
}
type TokenGet struct {
ID string `json:"id" gorm:"primaryKey;type:varchar(32)" parse:"path@token_id"`
}
type TokenPatch struct {
ID string `json:"id" gorm:"primaryKey;type:varchar(32)" parse:"path@token_id"`
ExpiredAt *time.Time `json:"expired_at" parse:"json"`
OverPerm *string `json:"over_perm" parse:"json"`
}
type TokenDelete struct {
ID string `json:"id" gorm:"primaryKey;type:varchar(32)" parse:"path@token_id"`
}
type TokenList struct {
UserID string `json:"user_id" gorm:"index;type:varchar(32)" parse:"json"`
AppID string `json:"app_id" gorm:"index;type:varchar(32)" parse:"json"`
}