14 lines
433 B
Go
14 lines
433 B
Go
|
package entity
|
|||
|
|
|||
|
import (
|
|||
|
"gorm.io/gorm"
|
|||
|
)
|
|||
|
|
|||
|
// Grant Grant是授权给实例的,给予实例访问权限
|
|||
|
type Grant struct {
|
|||
|
gorm.Model `json:"model"`
|
|||
|
Token string `gorm:"unique;not null" json:"token,omitempty"`
|
|||
|
TTL int `gorm:"not null;default:0" json:"ttl,omitempty"`
|
|||
|
GrantTo uint `gorm:"not null;default:0;comment:instances(id) 授权给实例,0表示无指定(所有)" json:"grant_to,omitempty"`
|
|||
|
}
|