// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 package dbq import ( "database/sql/driver" "fmt" "github.com/jackc/pgx/v5/pgtype" ) type QuarantineActionKind string const ( QuarantineActionKindResolved QuarantineActionKind = "resolved" QuarantineActionKindDeletedFile QuarantineActionKind = "deleted_file" QuarantineActionKindDeletedAlbum QuarantineActionKind = "deleted_album" ) func (e *QuarantineActionKind) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QuarantineActionKind(s) case string: *e = QuarantineActionKind(s) default: return fmt.Errorf("unsupported scan type for QuarantineActionKind: %T", src) } return nil } type NullQuarantineActionKind struct { QuarantineActionKind QuarantineActionKind Valid bool // Valid is true if QuarantineActionKind is not NULL } // Scan implements the Scanner interface. func (ns *NullQuarantineActionKind) Scan(value interface{}) error { if value == nil { ns.QuarantineActionKind, ns.Valid = "", false return nil } ns.Valid = true return ns.QuarantineActionKind.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQuarantineActionKind) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QuarantineActionKind), nil } type QuarantineReason string const ( QuarantineReasonBadRip QuarantineReason = "bad_rip" QuarantineReasonWrongFile QuarantineReason = "wrong_file" QuarantineReasonWrongTags QuarantineReason = "wrong_tags" QuarantineReasonDuplicate QuarantineReason = "duplicate" QuarantineReasonOther QuarantineReason = "other" ) func (e *QuarantineReason) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = QuarantineReason(s) case string: *e = QuarantineReason(s) default: return fmt.Errorf("unsupported scan type for QuarantineReason: %T", src) } return nil } type NullQuarantineReason struct { QuarantineReason QuarantineReason Valid bool // Valid is true if QuarantineReason is not NULL } // Scan implements the Scanner interface. func (ns *NullQuarantineReason) Scan(value interface{}) error { if value == nil { ns.QuarantineReason, ns.Valid = "", false return nil } ns.Valid = true return ns.QuarantineReason.Scan(value) } // Value implements the driver Valuer interface. func (ns NullQuarantineReason) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.QuarantineReason), nil } type RequestKind string const ( RequestKindArtist RequestKind = "artist" RequestKindAlbum RequestKind = "album" RequestKindTrack RequestKind = "track" ) func (e *RequestKind) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = RequestKind(s) case string: *e = RequestKind(s) default: return fmt.Errorf("unsupported scan type for RequestKind: %T", src) } return nil } type NullRequestKind struct { RequestKind RequestKind Valid bool // Valid is true if RequestKind is not NULL } // Scan implements the Scanner interface. func (ns *NullRequestKind) Scan(value interface{}) error { if value == nil { ns.RequestKind, ns.Valid = "", false return nil } ns.Valid = true return ns.RequestKind.Scan(value) } // Value implements the driver Valuer interface. func (ns NullRequestKind) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.RequestKind), nil } type RequestStatus string const ( RequestStatusPending RequestStatus = "pending" RequestStatusApproved RequestStatus = "approved" RequestStatusRejected RequestStatus = "rejected" RequestStatusCompleted RequestStatus = "completed" RequestStatusFailed RequestStatus = "failed" ) func (e *RequestStatus) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = RequestStatus(s) case string: *e = RequestStatus(s) default: return fmt.Errorf("unsupported scan type for RequestStatus: %T", src) } return nil } type NullRequestStatus struct { RequestStatus RequestStatus Valid bool // Valid is true if RequestStatus is not NULL } // Scan implements the Scanner interface. func (ns *NullRequestStatus) Scan(value interface{}) error { if value == nil { ns.RequestStatus, ns.Valid = "", false return nil } ns.Valid = true return ns.RequestStatus.Scan(value) } // Value implements the driver Valuer interface. func (ns NullRequestStatus) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.RequestStatus), nil } type AcoustidSetting struct { ID bool Enabled bool ApiKey *string MinScore float32 UpdatedAt pgtype.Timestamptz } type AcquisitionService struct { Code string Kind string Protocol string Label string Enabled bool BaseUrl string ApiKey string Username string Password string Category string TimeoutMs int32 ServesSearch bool ServesDownloads bool ServesEnrichment bool LocalPath string RemotePath string SearchesPerHour int32 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type AcquisitionSetting struct { ID bool AutoGrab bool SearchIntervalHours int32 AllowedQualities []string LastPassAt pgtype.Timestamptz LastPass []byte UpdatedAt pgtype.Timestamptz ImportRoot string SeedRatio float32 SeedDays int32 StallHours int32 LibraryListingStartedAt pgtype.Timestamptz LibraryListedAt pgtype.Timestamptz LibraryUnlisted int32 UpgradeUntil string } type Album struct { ID pgtype.UUID Title string SortTitle string ArtistID pgtype.UUID ReleaseDate pgtype.Date Mbid *string CoverArtPath *string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz CoverArtSource *string CoverArtSourcesVersion int32 ReleaseGroupMbid *string } type AlbumLoudness struct { AlbumID pgtype.UUID IntegratedLufs *float32 TruePeakDbtp *float32 TracksTotal int32 TracksSettled int32 InputsDigest string ComputedAt pgtype.Timestamptz } type Artist struct { ID pgtype.UUID Name string SortName string Mbid *string CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz ArtistThumbPath *string ArtistFanartPath *string ArtistArtSource *string ArtistArtSourcesVersion int32 } type ArtistSimilarity struct { ArtistAID pgtype.UUID ArtistBID pgtype.UUID Score float64 Source string FetchedAt pgtype.Timestamptz } type ArtistSimilarityFetch struct { ArtistID pgtype.UUID FetchedAt pgtype.Timestamptz Returned int32 } type ArtistSimilarityUnmatched struct { SeedArtistID pgtype.UUID CandidateMbid string CandidateName string Score float64 Source string FetchedAt pgtype.Timestamptz } type AuditLog struct { ID pgtype.UUID ActorID pgtype.UUID TargetID pgtype.UUID Action string Metadata []byte CreatedAt pgtype.Timestamptz } type CandidateArtistTag struct { CandidateMbid string Tag string Weight float64 } type CandidateArtistTagState struct { CandidateMbid string TagSource string TagSourcesVersion int32 UpdatedAt pgtype.Timestamptz } type ContextualLike struct { ID pgtype.UUID UserID pgtype.UUID TrackID pgtype.UUID LikedAt pgtype.Timestamptz DeletedAt pgtype.Timestamptz SessionVector []byte SessionID pgtype.UUID } type CoverArtProviderSetting struct { ProviderID string Enabled bool ApiKey *string DisplayOrder int32 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type CoverArtSourcesMetum struct { ID bool CurrentVersion int32 LastRegisteredProvidersHash string } type DiagnosticEvent struct { ID pgtype.UUID UserID pgtype.UUID ClientID string AppVersion *string OsVersion *string Kind string Payload []byte OccurredAt pgtype.Timestamptz ReceivedAt pgtype.Timestamptz } type DiscoverTuning struct { Singleton bool TagOverlapWeight float64 SnoozeDays float64 UpdatedAt pgtype.Timestamptz } type DownloadIntervention struct { ID pgtype.UUID Client string InfoHash string GrabID pgtype.UUID Name string Trigger string Action string Outcome string Detail string Observations int32 Remediations int32 FirstSeen pgtype.Timestamptz LastSeen pgtype.Timestamptz SettledAt pgtype.Timestamptz } type DuplicateGroup struct { ID pgtype.UUID MemberKey string Tier string WorstBitErrorRate *float32 Status string DetectedAt pgtype.Timestamptz LastSeenSweepID pgtype.UUID ResolvedAt pgtype.Timestamptz Class *string ResolveNote *string ResolvedAutomatically bool } type DuplicateGroupMember struct { GroupID pgtype.UUID TrackID pgtype.UUID } type DuplicateSweep struct { ID pgtype.UUID StartedAt pgtype.Timestamptz FinishedAt pgtype.Timestamptz Candidates *int32 GroupsFound *int32 OversizeClusters *int32 ErrorMessage *string } type FingerprintSetting struct { ID bool Enabled bool ChromaprintLengthSec int32 AcousticMaxBitErrorRate float64 BackfillConcurrency int32 SweepIntervalHours int32 UpdatedAt pgtype.Timestamptz AutoResolve bool } type Follow struct { ArtistMbid string ArtistName string ProfileID pgtype.UUID FollowedBy pgtype.UUID FollowedAt pgtype.Timestamptz BaselineAt pgtype.Timestamptz WantExisting bool CheckedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type FollowSeenGroup struct { ArtistMbid string ReleaseGroupMbid string SeenAt pgtype.Timestamptz } type GeneralLike struct { UserID pgtype.UUID TrackID pgtype.UUID LikedAt pgtype.Timestamptz } type GeneralLikesAlbum struct { UserID pgtype.UUID AlbumID pgtype.UUID LikedAt pgtype.Timestamptz } type GeneralLikesArtist struct { UserID pgtype.UUID ArtistID pgtype.UUID LikedAt pgtype.Timestamptz } type Grab struct { ID pgtype.UUID WantID pgtype.UUID InfoHash string Name string Key string Indexer string Source string Client string SavePath string Quality string Origin string Forced bool GrabbedBy pgtype.UUID GrabbedAt pgtype.Timestamptz EndedAt pgtype.Timestamptz EndReason string EndDetail string Progress float32 ImportState string ImportReason string ImportDetail []byte ImportForced bool ImportAttempts int32 ImportUpdatedAt pgtype.Timestamptz ImportedAt pgtype.Timestamptz ImportedFiles int32 Destination string Seeding bool Ratio float32 SeedReleasedAt pgtype.Timestamptz } type LibraryAlbumMatch struct { AlbumID pgtype.UUID Outcome string Method string ReleaseGroupMbid string Detail string DecidedAt pgtype.Timestamptz Matcher int32 } type LibraryChange struct { ID int64 EntityType string EntityID string Op string ChangedAt pgtype.Timestamptz } type LibrarySetting struct { ID bool ScanPaths []string UpdatedAt pgtype.Timestamptz } type ListenbrainzSimilarRecording struct { SeedTrackID pgtype.UUID RecordingMbid string Score float64 } type LoudnessSetting struct { ID bool Enabled bool BackfillConcurrency int32 UpdatedAt pgtype.Timestamptz LeveledCacheMb int32 } type MbArtist struct { Mbid string Name string SortName string Disambiguation string ArtistType string Country string DiscographyRefreshedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type MbArtistReleaseGroup struct { ArtistMbid string ReleaseGroupMbid string } type MbRelease struct { Mbid string ReleaseGroupMbid string Title string Status string ReleaseDate string Country string Disambiguation string Formats string TrackCount int32 CreatedAt pgtype.Timestamptz } type MbReleaseGroup struct { Mbid string Title string PrimaryType string SecondaryTypes []string FirstReleaseDate string ArtistCredit string ReleasesRefreshedAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type MbReleaseTrack struct { ReleaseMbid string MediumPosition int32 Position int32 MediumFormat string Number string Title string LengthMs int32 RecordingMbid string } type NetworkSetting struct { ID bool TrustedProxyHops int32 PublicUrl string } type NotificationEmailSetting struct { ID bool SummaryHour int32 BatchWindowMinutes int32 UpdatedAt pgtype.Timestamptz } type PasswordReset struct { Token string UserID pgtype.UUID CreatedAt pgtype.Timestamptz ExpiresAt pgtype.Timestamptz UsedAt pgtype.Timestamptz } type PlayEvent struct { ID pgtype.UUID UserID pgtype.UUID TrackID pgtype.UUID SessionID pgtype.UUID StartedAt pgtype.Timestamptz EndedAt pgtype.Timestamptz DurationPlayedMs *int32 CompletionRatio *float64 WasSkipped bool ClientID *string SessionVectorAtPlay []byte ScrobbledAt pgtype.Timestamptz Source *string PickKind *string DeviceClass *string } type PlaySession struct { ID pgtype.UUID UserID pgtype.UUID StartedAt pgtype.Timestamptz EndedAt pgtype.Timestamptz LastEventAt pgtype.Timestamptz TrackCount int32 ClientID *string } type PlaybackError struct { ID pgtype.UUID TrackID pgtype.UUID UserID pgtype.UUID ClientID string Kind string Detail *string OccurredAt pgtype.Timestamptz ResolvedAt pgtype.Timestamptz ResolvedBy pgtype.UUID Resolution *string } type Playlist struct { ID pgtype.UUID UserID pgtype.UUID Name string Description string IsPublic bool CoverPath *string TrackCount int32 DurationSec int32 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz Kind string SystemVariant *string SeedArtistID pgtype.UUID } type PlaylistTrack struct { PlaylistID pgtype.UUID Position int32 TrackID pgtype.UUID Title string ArtistName string AlbumTitle string DurationSec int32 AddedAt pgtype.Timestamptz PickKind *string } type Quarantine struct { UserID pgtype.UUID TrackID pgtype.UUID Reason QuarantineReason Notes *string CreatedAt pgtype.Timestamptz } type QuarantineAction struct { ID pgtype.UUID TrackID pgtype.UUID TrackTitle string ArtistName string AlbumTitle *string Action QuarantineActionKind AdminID pgtype.UUID AlbumMbid *string AffectedUsers int32 CreatedAt pgtype.Timestamptz } type ReacquisitionSetting struct { ID bool Enabled bool GraceHours int32 MaxPerPass int32 } type RecommendationTuningAudit struct { ID int64 ChangedAt pgtype.Timestamptz Scope string Action string Changes []byte } type RecommendationWeightProfile struct { Profile string BaseWeight float64 LikeBoost float64 RecencyWeight float64 SkipPenalty float64 JitterMagnitude float64 ContextWeight float64 SimilarityWeight float64 TasteWeight float64 UpdatedAt pgtype.Timestamptz ContextTimeWeight float64 } type RegistrationSetting struct { ID bool Mode string } type ReleaseBlock struct { InfoHash string Name string Reason string Detail string WantID pgtype.UUID BlockedBy pgtype.UUID BlockedAt pgtype.Timestamptz ExpiresAt pgtype.Timestamptz } type ReleaseTypeProfile struct { ID pgtype.UUID Name string PrimaryTypes []string SecondaryTypes []string IsDefault bool CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type Request struct { ID pgtype.UUID UserID pgtype.UUID Status RequestStatus Kind RequestKind ArtistMbid string AlbumMbid *string TrackMbid *string ArtistName string AlbumTitle *string TrackTitle *string DecidedAt pgtype.Timestamptz DecidedBy pgtype.UUID Notes *string CompletedAt pgtype.Timestamptz MatchedTrackID pgtype.UUID MatchedAlbumID pgtype.UUID MatchedArtistID pgtype.UUID RequestedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type ScanRun struct { ID pgtype.UUID StartedAt pgtype.Timestamptz FinishedAt pgtype.Timestamptz Library []byte MbidBackfill []byte CoverEnrich []byte ErrorMessage *string ArtistArtEnrich []byte } type ScrobbleQueue struct { ID pgtype.UUID UserID pgtype.UUID PlayEventID pgtype.UUID Status string Attempts int32 NextAttemptAt pgtype.Timestamptz LastError *string EnqueuedAt pgtype.Timestamptz } type Session struct { ID pgtype.UUID UserID pgtype.UUID TokenHash []byte UserAgent string CreatedAt pgtype.Timestamptz LastSeenAt pgtype.Timestamptz CreatedIp string LastIp string } type SkipEvent struct { ID pgtype.UUID UserID pgtype.UUID TrackID pgtype.UUID SessionID pgtype.UUID SkippedAt pgtype.Timestamptz PositionMs int32 } type SmtpConfig struct { ID bool Enabled bool Host string Port int32 Username string Password string FromAddress string FromName string UseTls bool UpdatedAt pgtype.Timestamptz } type SuggestionSnooze struct { UserID pgtype.UUID CandidateMbid string CandidateName string SnoozedUntil pgtype.Timestamptz CreatedAt pgtype.Timestamptz } type SystemPlaylistRotationState struct { UserID pgtype.UUID PlaylistKind string PlayedTrackIds []pgtype.UUID RotationStartedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type SystemPlaylistRun struct { UserID pgtype.UUID LastRunAt pgtype.Timestamptz LastRunDate pgtype.Date InFlight bool LastError *string } type TagProviderSetting struct { ProviderID string Enabled bool ApiKey *string DisplayOrder int32 CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz } type TagSourcesMetum struct { ID bool CurrentVersion int32 LastRegisteredProvidersHash string } type TasteProfileArtist struct { UserID pgtype.UUID ArtistID pgtype.UUID Weight float64 UpdatedAt pgtype.Timestamptz } type TasteProfileEra struct { UserID pgtype.UUID Era string Weight float64 UpdatedAt pgtype.Timestamptz } type TasteProfileMood struct { UserID pgtype.UUID Mood string Weight float64 UpdatedAt pgtype.Timestamptz } type TasteProfileTag struct { UserID pgtype.UUID Tag string Weight float64 UpdatedAt pgtype.Timestamptz } type TasteTuning struct { Singleton bool HalfLifeDays float64 EngagementHardSkip float64 EngagementNeutral float64 EngagementFull float64 UpdatedAt pgtype.Timestamptz EnrichedTagScale float64 EraScale float64 MoodScale float64 } type Track struct { ID pgtype.UUID Title string AlbumID pgtype.UUID ArtistID pgtype.UUID TrackNumber *int32 DiscNumber *int32 DurationMs int32 FilePath string FileSize int64 FileFormat string Bitrate *int32 Mbid *string Genre *string AddedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz TagSource *string TagSourcesVersion int32 TagReadVersion int16 MissingSince pgtype.Timestamptz MbidSource *string SongID pgtype.UUID SongKey pgtype.UUID SourceVerdict *string SourceVerdictAt pgtype.Timestamptz } type TrackAcoustidLookup struct { TrackID pgtype.UUID State string BestScore *float32 Candidates int32 RecordingMbid *string Detail *string LookedUpAt pgtype.Timestamptz } type TrackFingerprint struct { TrackID pgtype.UUID AudioStreamSha256 []byte Chromaprint []int32 FingerprintVersion int16 ComputedAt pgtype.Timestamptz ChromaprintLengthSec int32 } type TrackLoudness struct { TrackID pgtype.UUID IntegratedLufs *float32 TruePeakDbtp *float32 LoudnessRangeLu *float32 BlockHistStart *int16 BlockHist []int32 Unreadable bool AnalysisVersion int16 AnalyzedAt pgtype.Timestamptz } type TrackSimilarity struct { TrackAID pgtype.UUID TrackBID pgtype.UUID Score float64 Source string FetchedAt pgtype.Timestamptz } type TrackSimilarityFetch struct { TrackID pgtype.UUID FetchedAt pgtype.Timestamptz Returned int32 } type TrackTag struct { TrackID pgtype.UUID Tag string Weight float64 } type User struct { ID pgtype.UUID Username string PasswordHash string IsAdmin bool CreatedAt pgtype.Timestamptz SubsonicPassword *string ListenbrainzToken *string ListenbrainzEnabled bool DisplayName *string AutoApproveRequests bool Email *string Timezone string TimezoneUpdatedAt pgtype.Timestamptz DebugModeEnabled bool ApiTokenHash string } type UserInvite struct { Token string InvitedBy pgtype.UUID Note *string CreatedAt pgtype.Timestamptz ExpiresAt pgtype.Timestamptz RedeemedAt pgtype.Timestamptz RedeemedBy pgtype.UUID } type UserNormalizationPref struct { UserID pgtype.UUID Mode string TargetLufs int16 Boost string UpdatedAt pgtype.Timestamptz } type UserNotification struct { ID pgtype.UUID UserID pgtype.UUID Kind string Payload []byte CreatedAt pgtype.Timestamptz ReadAt pgtype.Timestamptz CoalesceKey *string EmailedAt pgtype.Timestamptz } type UserNotificationEmailState struct { UserID pgtype.UUID EmailGroup string BatchOpenedAt pgtype.Timestamptz LastSentAt pgtype.Timestamptz Failures int32 RetryAfter pgtype.Timestamptz } type UserNotificationPref struct { UserID pgtype.UUID Kind string Inbox bool Phone bool Email bool UpdatedAt pgtype.Timestamptz } type Want struct { ID pgtype.UUID ReleaseGroupMbid string ArtistMbid string ArtistName string Title string PrimaryType string FirstReleaseDate string Reason string AlbumID pgtype.UUID CreatedBy pgtype.UUID WantedAt pgtype.Timestamptz FulfilledAt pgtype.Timestamptz CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz SearchedAt pgtype.Timestamptz SearchOutcome string SearchConsidered int32 BestRelease string BestVerdict string SearchError string Upgrade string HeldTier string HeldQuality string UpgradeCheckedAt pgtype.Timestamptz } type WantCandidate struct { WantID pgtype.UUID Key string Name string InfoHash string Indexer string Source string SizeBytes int64 Seeders int32 FilesCount int32 Format string Quality string Year int32 Verdict string Reason string Reasons []byte FoldedFrom []string Rank int32 SearchedAt pgtype.Timestamptz } type YouMightLikeAlbum struct { UserID pgtype.UUID AlbumID pgtype.UUID Rank int32 BuiltAt pgtype.Timestamptz } type YouMightLikeArtist struct { UserID pgtype.UUID ArtistID pgtype.UUID Rank int32 BuiltAt pgtype.Timestamptz }