2022-10-04 00:36:01 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"gorm.io/gorm"
|
2024-01-07 15:13:35 +08:00
|
|
|
|
"time"
|
2022-10-04 00:36:01 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Grant Grant是授权给实例的,给予实例访问权限
|
|
|
|
|
type Grant struct {
|
|
|
|
|
gorm.Model `json:"model"`
|
2024-01-07 15:13:35 +08:00
|
|
|
|
Token string `gorm:"unique;not null" json:"token"`
|
|
|
|
|
ExpireAt time.Time `gorm:"index" json:"expire_at"`
|
|
|
|
|
GrantTo string `gorm:"not null;default:'';comment:instances(name)授权给实例,空表示无指定(所有)" json:"grant_to"`
|
2022-10-04 00:36:01 +08:00
|
|
|
|
}
|