summaryrefslogtreecommitdiff
path: root/player-server/internal/model/api_token.go
blob: f3590722180e24c5405f89cef1cb48a263433d62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package model

import "time"

// APIToken represents a hashed API authentication token for a user.
type APIToken struct {
	ID         int64      `json:"id"`
	UserID     int64      `json:"user_id"`
	TokenHash  string     `json:"-"`
	Name       string     `json:"name"`
	LastUsedAt *time.Time `json:"last_used_at"`
	ExpiresAt  *time.Time `json:"expires_at"`
	CreatedAt  time.Time  `json:"created_at"`
}