mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-07-18 08:49:54 +00:00
22 lines
557 B
Go
22 lines
557 B
Go
package apikey
|
|
|
|
import (
|
|
"github.com/pocket-id/pocket-id/backend/internal/model"
|
|
datatype "github.com/pocket-id/pocket-id/backend/internal/model/types"
|
|
)
|
|
|
|
// ApiKey is a personal access token a user can use to authenticate against the API
|
|
type ApiKey struct {
|
|
model.Base
|
|
|
|
Name string `sortable:"true"`
|
|
Key string
|
|
Description *string
|
|
ExpiresAt datatype.DateTime `sortable:"true"`
|
|
LastUsedAt *datatype.DateTime `sortable:"true"`
|
|
ExpirationEmailSent bool
|
|
|
|
UserID string
|
|
User model.User
|
|
}
|