20 lines
502 B
Go
20 lines
502 B
Go
package common
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
"fiskerinc.com/modules/common/dbbasemodel"
|
|
)
|
|
|
|
type APIToken struct {
|
|
Token string `json:"token" validate:"required,max=1000" pg:",pk"`
|
|
Roles string `json:"roles" validate:"required,max=10000"`
|
|
Description string `json:"description" validate:"required,max=1000"`
|
|
ExpiresAt *time.Time `json:"expires_at" pg:"expires_at"`
|
|
dbbasemodel.DBModelBase
|
|
}
|
|
|
|
func (a *APIToken) String() string {
|
|
return fmt.Sprintf("APIToken<%s>", a.Token)
|
|
}
|