mirror of https://github.com/veypi/OneAuth.git
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.
33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
type TokenSalt struct {
|
|
ID string `json:"id" gorm:"primaryKey;type:varchar(32)" parse:"path"`
|
|
}
|
|
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 TokenPost 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"`
|
|
ExpiredAt *time.Time `json:"expired_at" parse:"json"`
|
|
OverPerm *string `json:"over_perm" parse:"json"`
|
|
}
|
|
|
|
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"`
|
|
}
|