// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.30.0 package sqlc import ( "database/sql/driver" "fmt" "time" "github.com/jackc/pgx/v5/pgtype" ) type ReleaseSeasonT string const ( ReleaseSeasonTWinter ReleaseSeasonT = "winter" ReleaseSeasonTSpring ReleaseSeasonT = "spring" ReleaseSeasonTSummer ReleaseSeasonT = "summer" ReleaseSeasonTFall ReleaseSeasonT = "fall" ) func (e *ReleaseSeasonT) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = ReleaseSeasonT(s) case string: *e = ReleaseSeasonT(s) default: return fmt.Errorf("unsupported scan type for ReleaseSeasonT: %T", src) } return nil } type NullReleaseSeasonT struct { ReleaseSeasonT ReleaseSeasonT `json:"release_season_t"` Valid bool `json:"valid"` // Valid is true if ReleaseSeasonT is not NULL } // Scan implements the Scanner interface. func (ns *NullReleaseSeasonT) Scan(value interface{}) error { if value == nil { ns.ReleaseSeasonT, ns.Valid = "", false return nil } ns.Valid = true return ns.ReleaseSeasonT.Scan(value) } // Value implements the driver Valuer interface. func (ns NullReleaseSeasonT) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.ReleaseSeasonT), nil } type StorageTypeT string const ( StorageTypeTLocal StorageTypeT = "local" StorageTypeTS3 StorageTypeT = "s3" ) func (e *StorageTypeT) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = StorageTypeT(s) case string: *e = StorageTypeT(s) default: return fmt.Errorf("unsupported scan type for StorageTypeT: %T", src) } return nil } type NullStorageTypeT struct { StorageTypeT StorageTypeT `json:"storage_type_t"` Valid bool `json:"valid"` // Valid is true if StorageTypeT is not NULL } // Scan implements the Scanner interface. func (ns *NullStorageTypeT) Scan(value interface{}) error { if value == nil { ns.StorageTypeT, ns.Valid = "", false return nil } ns.Valid = true return ns.StorageTypeT.Scan(value) } // Value implements the driver Valuer interface. func (ns NullStorageTypeT) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.StorageTypeT), nil } type TitleStatusT string const ( TitleStatusTFinished TitleStatusT = "finished" TitleStatusTOngoing TitleStatusT = "ongoing" TitleStatusTPlanned TitleStatusT = "planned" ) func (e *TitleStatusT) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = TitleStatusT(s) case string: *e = TitleStatusT(s) default: return fmt.Errorf("unsupported scan type for TitleStatusT: %T", src) } return nil } type NullTitleStatusT struct { TitleStatusT TitleStatusT `json:"title_status_t"` Valid bool `json:"valid"` // Valid is true if TitleStatusT is not NULL } // Scan implements the Scanner interface. func (ns *NullTitleStatusT) Scan(value interface{}) error { if value == nil { ns.TitleStatusT, ns.Valid = "", false return nil } ns.Valid = true return ns.TitleStatusT.Scan(value) } // Value implements the driver Valuer interface. func (ns NullTitleStatusT) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.TitleStatusT), nil } type UsertitleStatusT string const ( UsertitleStatusTFinished UsertitleStatusT = "finished" UsertitleStatusTPlanned UsertitleStatusT = "planned" UsertitleStatusTDropped UsertitleStatusT = "dropped" UsertitleStatusTInProgress UsertitleStatusT = "in-progress" ) func (e *UsertitleStatusT) Scan(src interface{}) error { switch s := src.(type) { case []byte: *e = UsertitleStatusT(s) case string: *e = UsertitleStatusT(s) default: return fmt.Errorf("unsupported scan type for UsertitleStatusT: %T", src) } return nil } type NullUsertitleStatusT struct { UsertitleStatusT UsertitleStatusT `json:"usertitle_status_t"` Valid bool `json:"valid"` // Valid is true if UsertitleStatusT is not NULL } // Scan implements the Scanner interface. func (ns *NullUsertitleStatusT) Scan(value interface{}) error { if value == nil { ns.UsertitleStatusT, ns.Valid = "", false return nil } ns.Valid = true return ns.UsertitleStatusT.Scan(value) } // Value implements the driver Valuer interface. func (ns NullUsertitleStatusT) Value() (driver.Value, error) { if !ns.Valid { return nil, nil } return string(ns.UsertitleStatusT), nil } type Image struct { ID int64 `json:"id"` StorageType StorageTypeT `json:"storage_type"` ImagePath string `json:"image_path"` } type Provider struct { ID int64 `json:"id"` ProviderName string `json:"provider_name"` Credentials []byte `json:"credentials"` } type Signal struct { ID int64 `json:"id"` TitleID *int64 `json:"title_id"` RawData []byte `json:"raw_data"` ProviderID int64 `json:"provider_id"` Pending bool `json:"pending"` } type Studio struct { ID int64 `json:"id"` StudioName *string `json:"studio_name"` IllustID *int64 `json:"illust_id"` StudioDesc *string `json:"studio_desc"` } type Tag struct { ID int64 `json:"id"` TagNames []byte `json:"tag_names"` } type Title struct { ID int64 `json:"id"` TitleNames []byte `json:"title_names"` StudioID int64 `json:"studio_id"` PosterID *int64 `json:"poster_id"` TitleStatus TitleStatusT `json:"title_status"` Rating *float64 `json:"rating"` RatingCount *int32 `json:"rating_count"` ReleaseYear *int32 `json:"release_year"` ReleaseSeason NullReleaseSeasonT `json:"release_season"` Season *int32 `json:"season"` EpisodesAired *int32 `json:"episodes_aired"` EpisodesAll *int32 `json:"episodes_all"` EpisodesLen []byte `json:"episodes_len"` } type TitleTag struct { TitleID int64 `json:"title_id"` TagID int64 `json:"tag_id"` } type User struct { ID int64 `json:"id"` AvatarID *int64 `json:"avatar_id"` Passhash string `json:"passhash"` Mail *string `json:"mail"` Nickname string `json:"nickname"` DispName *string `json:"disp_name"` UserDesc *string `json:"user_desc"` CreationDate time.Time `json:"creation_date"` LastLogin pgtype.Timestamptz `json:"last_login"` } type Usertitle struct { UserID int64 `json:"user_id"` TitleID int64 `json:"title_id"` Status UsertitleStatusT `json:"status"` Rate *int32 `json:"rate"` ReviewText *string `json:"review_text"` ReviewDate pgtype.Timestamptz `json:"review_date"` }