115 lines
3.8 KiB
Go
115 lines
3.8 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.31.1
|
|
|
|
package db
|
|
|
|
import (
|
|
"database/sql"
|
|
"time"
|
|
)
|
|
|
|
type Anime struct {
|
|
ID int64 `json:"id"`
|
|
TitleOriginal string `json:"title_original"`
|
|
ImageUrl string `json:"image_url"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
TitleEnglish sql.NullString `json:"title_english"`
|
|
TitleJapanese sql.NullString `json:"title_japanese"`
|
|
Airing sql.NullBool `json:"airing"`
|
|
Status sql.NullString `json:"status"`
|
|
RelationsSyncedAt sql.NullTime `json:"relations_synced_at"`
|
|
DurationSeconds sql.NullFloat64 `json:"duration_seconds"`
|
|
}
|
|
|
|
type AnimeFetchRetry struct {
|
|
AnimeID int64 `json:"anime_id"`
|
|
Attempts int64 `json:"attempts"`
|
|
NextRetryAt time.Time `json:"next_retry_at"`
|
|
LastError string `json:"last_error"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type AnimeRelation struct {
|
|
AnimeID int64 `json:"anime_id"`
|
|
RelatedAnimeID int64 `json:"related_anime_id"`
|
|
RelationType string `json:"relation_type"`
|
|
}
|
|
|
|
type ApiToken struct {
|
|
ID string `json:"id"`
|
|
UserID string `json:"user_id"`
|
|
TokenHash string `json:"token_hash"`
|
|
Name string `json:"name"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
LastUsedAt sql.NullTime `json:"last_used_at"`
|
|
RevokedAt sql.NullTime `json:"revoked_at"`
|
|
}
|
|
|
|
type ContinueWatchingEntry struct {
|
|
ID string `json:"id"`
|
|
UserID string `json:"user_id"`
|
|
AnimeID int64 `json:"anime_id"`
|
|
CurrentEpisode sql.NullInt64 `json:"current_episode"`
|
|
CurrentTimeSeconds float64 `json:"current_time_seconds"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
DurationSeconds sql.NullFloat64 `json:"duration_seconds"`
|
|
}
|
|
|
|
type EpisodeAvailabilityCache struct {
|
|
AnimeID int64 `json:"anime_id"`
|
|
Data string `json:"data"`
|
|
NextRefreshAt sql.NullTime `json:"next_refresh_at"`
|
|
RetryUntilAt sql.NullTime `json:"retry_until_at"`
|
|
LastAttemptAt sql.NullTime `json:"last_attempt_at"`
|
|
LastSuccessAt sql.NullTime `json:"last_success_at"`
|
|
FailureCount int64 `json:"failure_count"`
|
|
LastError string `json:"last_error"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type EpisodeProviderMapping struct {
|
|
AnimeID int64 `json:"anime_id"`
|
|
Provider string `json:"provider"`
|
|
ProviderShowID string `json:"provider_show_id"`
|
|
FailedUntil sql.NullTime `json:"failed_until"`
|
|
LastError string `json:"last_error"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type JikanCache struct {
|
|
Key string `json:"key"`
|
|
Data string `json:"data"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type Session struct {
|
|
ID string `json:"id"`
|
|
UserID string `json:"user_id"`
|
|
ExpiresAt time.Time `json:"expires_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type User struct {
|
|
ID string `json:"id"`
|
|
Username string `json:"username"`
|
|
PasswordHash string `json:"password_hash"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
AvatarUrl string `json:"avatar_url"`
|
|
}
|
|
|
|
type WatchListEntry struct {
|
|
ID string `json:"id"`
|
|
UserID string `json:"user_id"`
|
|
AnimeID int64 `json:"anime_id"`
|
|
Status string `json:"status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
CurrentEpisode sql.NullInt64 `json:"current_episode"`
|
|
LastEpisodeAt sql.NullTime `json:"last_episode_at"`
|
|
CurrentTimeSeconds float64 `json:"current_time_seconds"`
|
|
}
|