Files
webhooker/internal/database/model_apikey.go
2026-03-01 22:52:08 +07:00

17 lines
394 B
Go

package database
import "time"
// APIKey represents an API key for a user
type APIKey struct {
BaseModel
UserID string `gorm:"type:uuid;not null" json:"user_id"`
Key string `gorm:"uniqueIndex;not null" json:"key"`
Description string `json:"description"`
LastUsedAt *time.Time `json:"last_used_at,omitempty"`
// Relations
User User `json:"user,omitempty"`
}