diff --git a/Makefile b/Makefile index ffc7f66f..9071f9dc 100644 --- a/Makefile +++ b/Makefile @@ -20,4 +20,4 @@ setup:: go install -v github.com/sqlc-dev/sqlc/cmd/sqlc@latest apidiff:: - npx deno run -A --watch apidiff2.ts + npx deno run -A --watch apidiff.ts diff --git a/api/dbv1/get_developer_apps.sql.go b/api/dbv1/get_developer_apps.sql.go index af7dddd9..1089c3e1 100644 --- a/api/dbv1/get_developer_apps.sql.go +++ b/api/dbv1/get_developer_apps.sql.go @@ -7,6 +7,7 @@ package dbv1 import ( "context" + "time" "github.com/jackc/pgx/v5/pgtype" ) @@ -91,13 +92,13 @@ type GetDeveloperAppsWithGrantsParams struct { } type GetDeveloperAppsWithGrantsRow struct { - Address string `json:"address"` - Name string `json:"name"` - Description pgtype.Text `json:"description"` - ImageUrl pgtype.Text `json:"image_url"` - GrantorUserID pgtype.Int4 `json:"grantor_user_id"` - GrantCreatedAt pgtype.Timestamp `json:"grant_created_at"` - GrantUpdatedAt pgtype.Timestamp `json:"grant_updated_at"` + Address string `json:"address"` + Name string `json:"name"` + Description pgtype.Text `json:"description"` + ImageUrl pgtype.Text `json:"image_url"` + GrantorUserID pgtype.Int4 `json:"grantor_user_id"` + GrantCreatedAt time.Time `json:"grant_created_at"` + GrantUpdatedAt time.Time `json:"grant_updated_at"` } func (q *Queries) GetDeveloperAppsWithGrants(ctx context.Context, arg GetDeveloperAppsWithGrantsParams) ([]GetDeveloperAppsWithGrantsRow, error) { diff --git a/api/dbv1/get_playlists.sql.go b/api/dbv1/get_playlists.sql.go index e0187472..7f8aa841 100644 --- a/api/dbv1/get_playlists.sql.go +++ b/api/dbv1/get_playlists.sql.go @@ -8,6 +8,7 @@ package dbv1 import ( "context" "encoding/json" + "time" "github.com/jackc/pgx/v5/pgtype" ) @@ -131,9 +132,9 @@ type GetPlaylistsRow struct { Blocknumber pgtype.Int4 `json:"blocknumber"` RepostCount pgtype.Int4 `json:"repost_count"` FavoriteCount pgtype.Int4 `json:"favorite_count"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - ReleaseDate pgtype.Timestamp `json:"release_date"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ReleaseDate time.Time `json:"release_date"` HasCurrentUserReposted bool `json:"has_current_user_reposted"` HasCurrentUserSaved bool `json:"has_current_user_saved"` FolloweeReposts json.RawMessage `json:"followee_reposts"` diff --git a/api/dbv1/get_tracks.sql.go b/api/dbv1/get_tracks.sql.go index 7adbf4c5..da154f2c 100644 --- a/api/dbv1/get_tracks.sql.go +++ b/api/dbv1/get_tracks.sql.go @@ -8,6 +8,7 @@ package dbv1 import ( "context" "encoding/json" + "time" "github.com/jackc/pgx/v5/pgtype" ) @@ -182,74 +183,74 @@ type GetTracksParams struct { } type GetTracksRow struct { - TrackID int32 `json:"track_id"` - Description pgtype.Text `json:"description"` - Genre pgtype.Text `json:"genre"` - ID string `json:"id"` - TrackCid pgtype.Text `json:"track_cid"` - PreviewCid pgtype.Text `json:"preview_cid"` - OrigFileCid pgtype.Text `json:"orig_file_cid"` - OrigFilename pgtype.Text `json:"orig_filename"` - IsOriginalAvailable bool `json:"is_original_available"` - Mood pgtype.Text `json:"mood"` - ReleaseDate pgtype.Timestamp `json:"release_date"` - RemixOf []byte `json:"remix_of"` - RepostCount int32 `json:"repost_count"` - FavoriteCount int32 `json:"favorite_count"` - CommentCount pgtype.Int4 `json:"comment_count"` - Tags pgtype.Text `json:"tags"` - Title pgtype.Text `json:"title"` - Slug pgtype.Text `json:"slug"` - Duration pgtype.Int4 `json:"duration"` - IsDownloadable bool `json:"is_downloadable"` - PlayCount pgtype.Int8 `json:"play_count"` - DdexApp pgtype.Text `json:"ddex_app"` - PinnedCommentID pgtype.Int4 `json:"pinned_comment_id"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - CreateDate pgtype.Text `json:"create_date"` - CreatedAt pgtype.Timestamp `json:"created_at"` - CoverArtSizes pgtype.Text `json:"cover_art_sizes"` - CreditsSplits pgtype.Text `json:"credits_splits"` - Isrc pgtype.Text `json:"isrc"` - License pgtype.Text `json:"license"` - Iswc pgtype.Text `json:"iswc"` - FieldVisibility json.RawMessage `json:"field_visibility"` - HasCurrentUserReposted bool `json:"has_current_user_reposted"` - HasCurrentUserSaved bool `json:"has_current_user_saved"` - IsScheduledRelease bool `json:"is_scheduled_release"` - IsUnlisted bool `json:"is_unlisted"` - FolloweeReposts json.RawMessage `json:"followee_reposts"` - FolloweeFavorites json.RawMessage `json:"followee_favorites"` - StemOf []byte `json:"stem_of"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - UserID int32 `json:"user_id"` - IsDelete bool `json:"is_delete"` - CoverArt pgtype.Text `json:"cover_art"` - IsAvailable bool `json:"is_available"` - AiAttributionUserID pgtype.Int4 `json:"ai_attribution_user_id"` - AllowedApiKeys []string `json:"allowed_api_keys"` - AudioUploadID pgtype.Text `json:"audio_upload_id"` - PreviewStartSeconds pgtype.Float8 `json:"preview_start_seconds"` - Bpm pgtype.Float8 `json:"bpm"` - IsCustomBpm pgtype.Bool `json:"is_custom_bpm"` - MusicalKey pgtype.Text `json:"musical_key"` - IsCustomMusicalKey pgtype.Bool `json:"is_custom_musical_key"` - AudioAnalysisErrorCount int32 `json:"audio_analysis_error_count"` - CommentsDisabled pgtype.Bool `json:"comments_disabled"` - DdexReleaseIds json.RawMessage `json:"ddex_release_ids"` - Artists json.RawMessage `json:"artists"` - ResourceContributors json.RawMessage `json:"resource_contributors"` - IndirectResourceContributors json.RawMessage `json:"indirect_resource_contributors"` - RightsController json.RawMessage `json:"rights_controller"` - CopyrightLine json.RawMessage `json:"copyright_line"` - ProducerCopyrightLine json.RawMessage `json:"producer_copyright_line"` - ParentalWarningType pgtype.Text `json:"parental_warning_type"` - IsStreamGated pgtype.Bool `json:"is_stream_gated"` - StreamConditions UsageConditions `json:"stream_conditions"` - IsDownloadGated pgtype.Bool `json:"is_download_gated"` - DownloadConditions UsageConditions `json:"download_conditions"` - CoverOriginalSongTitle pgtype.Text `json:"cover_original_song_title"` - IsOwnedByUser bool `json:"is_owned_by_user"` + TrackID int32 `json:"track_id"` + Description pgtype.Text `json:"description"` + Genre pgtype.Text `json:"genre"` + ID string `json:"id"` + TrackCid pgtype.Text `json:"track_cid"` + PreviewCid pgtype.Text `json:"preview_cid"` + OrigFileCid pgtype.Text `json:"orig_file_cid"` + OrigFilename pgtype.Text `json:"orig_filename"` + IsOriginalAvailable bool `json:"is_original_available"` + Mood pgtype.Text `json:"mood"` + ReleaseDate time.Time `json:"release_date"` + RemixOf []byte `json:"remix_of"` + RepostCount int32 `json:"repost_count"` + FavoriteCount int32 `json:"favorite_count"` + CommentCount pgtype.Int4 `json:"comment_count"` + Tags pgtype.Text `json:"tags"` + Title pgtype.Text `json:"title"` + Slug pgtype.Text `json:"slug"` + Duration pgtype.Int4 `json:"duration"` + IsDownloadable bool `json:"is_downloadable"` + PlayCount pgtype.Int8 `json:"play_count"` + DdexApp pgtype.Text `json:"ddex_app"` + PinnedCommentID pgtype.Int4 `json:"pinned_comment_id"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + CreateDate pgtype.Text `json:"create_date"` + CreatedAt time.Time `json:"created_at"` + CoverArtSizes pgtype.Text `json:"cover_art_sizes"` + CreditsSplits pgtype.Text `json:"credits_splits"` + Isrc pgtype.Text `json:"isrc"` + License pgtype.Text `json:"license"` + Iswc pgtype.Text `json:"iswc"` + FieldVisibility json.RawMessage `json:"field_visibility"` + HasCurrentUserReposted bool `json:"has_current_user_reposted"` + HasCurrentUserSaved bool `json:"has_current_user_saved"` + IsScheduledRelease bool `json:"is_scheduled_release"` + IsUnlisted bool `json:"is_unlisted"` + FolloweeReposts json.RawMessage `json:"followee_reposts"` + FolloweeFavorites json.RawMessage `json:"followee_favorites"` + StemOf []byte `json:"stem_of"` + UpdatedAt time.Time `json:"updated_at"` + UserID int32 `json:"user_id"` + IsDelete bool `json:"is_delete"` + CoverArt pgtype.Text `json:"cover_art"` + IsAvailable bool `json:"is_available"` + AiAttributionUserID pgtype.Int4 `json:"ai_attribution_user_id"` + AllowedApiKeys []string `json:"allowed_api_keys"` + AudioUploadID pgtype.Text `json:"audio_upload_id"` + PreviewStartSeconds pgtype.Float8 `json:"preview_start_seconds"` + Bpm pgtype.Float8 `json:"bpm"` + IsCustomBpm pgtype.Bool `json:"is_custom_bpm"` + MusicalKey pgtype.Text `json:"musical_key"` + IsCustomMusicalKey pgtype.Bool `json:"is_custom_musical_key"` + AudioAnalysisErrorCount int32 `json:"audio_analysis_error_count"` + CommentsDisabled pgtype.Bool `json:"comments_disabled"` + DdexReleaseIds json.RawMessage `json:"ddex_release_ids"` + Artists json.RawMessage `json:"artists"` + ResourceContributors json.RawMessage `json:"resource_contributors"` + IndirectResourceContributors json.RawMessage `json:"indirect_resource_contributors"` + RightsController json.RawMessage `json:"rights_controller"` + CopyrightLine json.RawMessage `json:"copyright_line"` + ProducerCopyrightLine json.RawMessage `json:"producer_copyright_line"` + ParentalWarningType pgtype.Text `json:"parental_warning_type"` + IsStreamGated pgtype.Bool `json:"is_stream_gated"` + StreamConditions UsageConditions `json:"stream_conditions"` + IsDownloadGated pgtype.Bool `json:"is_download_gated"` + DownloadConditions UsageConditions `json:"download_conditions"` + CoverOriginalSongTitle pgtype.Text `json:"cover_original_song_title"` + IsOwnedByUser bool `json:"is_owned_by_user"` } func (q *Queries) GetTracks(ctx context.Context, arg GetTracksParams) ([]GetTracksRow, error) { diff --git a/api/dbv1/get_users.sql.go b/api/dbv1/get_users.sql.go index 68a9fd6a..56883db5 100644 --- a/api/dbv1/get_users.sql.go +++ b/api/dbv1/get_users.sql.go @@ -8,6 +8,7 @@ package dbv1 import ( "context" "encoding/json" + "time" "github.com/jackc/pgx/v5/pgtype" ) @@ -143,63 +144,63 @@ type GetUsersParams struct { } type GetUsersRow struct { - AlbumCount pgtype.Int8 `json:"album_count"` - ArtistPickTrackID pgtype.Int4 `json:"artist_pick_track_id"` - Bio pgtype.Text `json:"bio"` - CoverPhoto pgtype.Text `json:"cover_photo"` - FollowerCount pgtype.Int8 `json:"follower_count"` - FolloweeCount pgtype.Int8 `json:"followee_count"` - Handle pgtype.Text `json:"handle"` - ID string `json:"id"` - UserID int32 `json:"user_id"` - IsVerified bool `json:"is_verified"` - TwitterHandle pgtype.Text `json:"twitter_handle"` - InstagramHandle pgtype.Text `json:"instagram_handle"` - TiktokHandle pgtype.Text `json:"tiktok_handle"` - VerifiedWithTwitter pgtype.Bool `json:"verified_with_twitter"` - VerifiedWithInstagram pgtype.Bool `json:"verified_with_instagram"` - VerifiedWithTiktok pgtype.Bool `json:"verified_with_tiktok"` - Website pgtype.Text `json:"website"` - Donation pgtype.Text `json:"donation"` - Location pgtype.Text `json:"location"` - Name pgtype.Text `json:"name"` - PlaylistCount pgtype.Int8 `json:"playlist_count"` - ProfilePicture pgtype.Text `json:"profile_picture"` - RepostCount pgtype.Int8 `json:"repost_count"` - TrackCount pgtype.Int8 `json:"track_count"` - IsDeactivated bool `json:"is_deactivated"` - IsAvailable bool `json:"is_available"` - ErcWallet pgtype.Text `json:"erc_wallet"` - SplWallet pgtype.Text `json:"spl_wallet"` - SplUsdcPayoutWallet pgtype.Text `json:"spl_usdc_payout_wallet"` - SupporterCount int32 `json:"supporter_count"` - SupportingCount int32 `json:"supporting_count"` - Wallet pgtype.Text `json:"wallet"` - Balance pgtype.Text `json:"balance"` - AssociatedWalletsBalance pgtype.Text `json:"associated_wallets_balance"` - TotalBalance string `json:"total_balance"` - TotalAudioBalance int32 `json:"total_audio_balance"` - WaudioBalance string `json:"waudio_balance"` - AssociatedSolWalletsBalance string `json:"associated_sol_wallets_balance"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - CreatedAt pgtype.Timestamp `json:"created_at"` - IsStorageV2 bool `json:"is_storage_v2"` - CreatorNodeEndpoint pgtype.Text `json:"creator_node_endpoint"` - CurrentUserFolloweeFollowCount int32 `json:"current_user_followee_follow_count"` - DoesCurrentUserFollow bool `json:"does_current_user_follow"` - DoesCurrentUserSubscribe bool `json:"does_current_user_subscribe"` - DoesFollowCurrentUser bool `json:"does_follow_current_user"` - HandleLc pgtype.Text `json:"handle_lc"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - CoverPhotoSizes pgtype.Text `json:"cover_photo_sizes"` - CoverPhotoCids interface{} `json:"cover_photo_cids"` - CoverPhotoLegacy interface{} `json:"cover_photo_legacy"` - ProfilePictureSizes pgtype.Text `json:"profile_picture_sizes"` - ProfilePictureCids interface{} `json:"profile_picture_cids"` - ProfilePictureLegacy interface{} `json:"profile_picture_legacy"` - HasCollectibles bool `json:"has_collectibles"` - PlaylistLibrary json.RawMessage `json:"playlist_library"` - AllowAiAttribution bool `json:"allow_ai_attribution"` + AlbumCount pgtype.Int8 `json:"album_count"` + ArtistPickTrackID pgtype.Int4 `json:"artist_pick_track_id"` + Bio pgtype.Text `json:"bio"` + CoverPhoto pgtype.Text `json:"cover_photo"` + FollowerCount pgtype.Int8 `json:"follower_count"` + FolloweeCount pgtype.Int8 `json:"followee_count"` + Handle pgtype.Text `json:"handle"` + ID string `json:"id"` + UserID int32 `json:"user_id"` + IsVerified bool `json:"is_verified"` + TwitterHandle pgtype.Text `json:"twitter_handle"` + InstagramHandle pgtype.Text `json:"instagram_handle"` + TiktokHandle pgtype.Text `json:"tiktok_handle"` + VerifiedWithTwitter pgtype.Bool `json:"verified_with_twitter"` + VerifiedWithInstagram pgtype.Bool `json:"verified_with_instagram"` + VerifiedWithTiktok pgtype.Bool `json:"verified_with_tiktok"` + Website pgtype.Text `json:"website"` + Donation pgtype.Text `json:"donation"` + Location pgtype.Text `json:"location"` + Name pgtype.Text `json:"name"` + PlaylistCount pgtype.Int8 `json:"playlist_count"` + ProfilePicture pgtype.Text `json:"profile_picture"` + RepostCount pgtype.Int8 `json:"repost_count"` + TrackCount pgtype.Int8 `json:"track_count"` + IsDeactivated bool `json:"is_deactivated"` + IsAvailable bool `json:"is_available"` + ErcWallet pgtype.Text `json:"erc_wallet"` + SplWallet pgtype.Text `json:"spl_wallet"` + SplUsdcPayoutWallet pgtype.Text `json:"spl_usdc_payout_wallet"` + SupporterCount int32 `json:"supporter_count"` + SupportingCount int32 `json:"supporting_count"` + Wallet pgtype.Text `json:"wallet"` + Balance pgtype.Text `json:"balance"` + AssociatedWalletsBalance pgtype.Text `json:"associated_wallets_balance"` + TotalBalance string `json:"total_balance"` + TotalAudioBalance int32 `json:"total_audio_balance"` + WaudioBalance string `json:"waudio_balance"` + AssociatedSolWalletsBalance string `json:"associated_sol_wallets_balance"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + CreatedAt time.Time `json:"created_at"` + IsStorageV2 bool `json:"is_storage_v2"` + CreatorNodeEndpoint pgtype.Text `json:"creator_node_endpoint"` + CurrentUserFolloweeFollowCount int32 `json:"current_user_followee_follow_count"` + DoesCurrentUserFollow bool `json:"does_current_user_follow"` + DoesCurrentUserSubscribe bool `json:"does_current_user_subscribe"` + DoesFollowCurrentUser bool `json:"does_follow_current_user"` + HandleLc pgtype.Text `json:"handle_lc"` + UpdatedAt time.Time `json:"updated_at"` + CoverPhotoSizes pgtype.Text `json:"cover_photo_sizes"` + CoverPhotoCids interface{} `json:"cover_photo_cids"` + CoverPhotoLegacy interface{} `json:"cover_photo_legacy"` + ProfilePictureSizes pgtype.Text `json:"profile_picture_sizes"` + ProfilePictureCids interface{} `json:"profile_picture_cids"` + ProfilePictureLegacy interface{} `json:"profile_picture_legacy"` + HasCollectibles bool `json:"has_collectibles"` + PlaylistLibrary json.RawMessage `json:"playlist_library"` + AllowAiAttribution bool `json:"allow_ai_attribution"` } func (q *Queries) GetUsers(ctx context.Context, arg GetUsersParams) ([]GetUsersRow, error) { diff --git a/api/dbv1/models.go b/api/dbv1/models.go index 35c17da1..940a9edf 100644 --- a/api/dbv1/models.go +++ b/api/dbv1/models.go @@ -8,6 +8,7 @@ import ( "database/sql/driver" "encoding/json" "fmt" + "time" "github.com/jackc/pgx/v5/pgtype" ) @@ -487,48 +488,48 @@ func (ns NullWalletChain) Value() (driver.Value, error) { } type AggregateDailyAppNameMetric struct { - ID int32 `json:"id"` - ApplicationName string `json:"application_name"` - Count int32 `json:"count"` - Timestamp pgtype.Date `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + ID int32 `json:"id"` + ApplicationName string `json:"application_name"` + Count int32 `json:"count"` + Timestamp pgtype.Date `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type AggregateDailyTotalUsersMetric struct { - ID int32 `json:"id"` - Count int32 `json:"count"` - Timestamp pgtype.Date `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - PersonalCount pgtype.Int4 `json:"personal_count"` + ID int32 `json:"id"` + Count int32 `json:"count"` + Timestamp pgtype.Date `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + PersonalCount pgtype.Int4 `json:"personal_count"` } type AggregateDailyUniqueUsersMetric struct { - ID int32 `json:"id"` - Count int32 `json:"count"` - Timestamp pgtype.Date `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - SummedCount pgtype.Int4 `json:"summed_count"` - PersonalCount pgtype.Int4 `json:"personal_count"` + ID int32 `json:"id"` + Count int32 `json:"count"` + Timestamp pgtype.Date `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + SummedCount pgtype.Int4 `json:"summed_count"` + PersonalCount pgtype.Int4 `json:"personal_count"` } type AggregateIntervalPlay struct { - TrackID int32 `json:"track_id"` - Genre pgtype.Text `json:"genre"` - CreatedAt pgtype.Timestamp `json:"created_at"` - WeekListenCounts int64 `json:"week_listen_counts"` - MonthListenCounts int64 `json:"month_listen_counts"` + TrackID int32 `json:"track_id"` + Genre pgtype.Text `json:"genre"` + CreatedAt time.Time `json:"created_at"` + WeekListenCounts int64 `json:"week_listen_counts"` + MonthListenCounts int64 `json:"month_listen_counts"` } type AggregateMonthlyAppNameMetric struct { - ID int32 `json:"id"` - ApplicationName string `json:"application_name"` - Count int32 `json:"count"` - Timestamp pgtype.Date `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + ID int32 `json:"id"` + ApplicationName string `json:"application_name"` + Count int32 `json:"count"` + Timestamp pgtype.Date `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type AggregateMonthlyPlay struct { @@ -539,22 +540,22 @@ type AggregateMonthlyPlay struct { } type AggregateMonthlyTotalUsersMetric struct { - ID int32 `json:"id"` - Count int32 `json:"count"` - Timestamp pgtype.Date `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - PersonalCount pgtype.Int4 `json:"personal_count"` + ID int32 `json:"id"` + Count int32 `json:"count"` + Timestamp pgtype.Date `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + PersonalCount pgtype.Int4 `json:"personal_count"` } type AggregateMonthlyUniqueUsersMetric struct { - ID int32 `json:"id"` - Count int32 `json:"count"` - Timestamp pgtype.Date `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - SummedCount pgtype.Int4 `json:"summed_count"` - PersonalCount pgtype.Int4 `json:"personal_count"` + ID int32 `json:"id"` + Count int32 `json:"count"` + Timestamp pgtype.Date `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + SummedCount pgtype.Int4 `json:"summed_count"` + PersonalCount pgtype.Int4 `json:"personal_count"` } type AggregatePlay struct { @@ -599,12 +600,12 @@ type AggregateUserTip struct { } type AlbumPriceHistory struct { - PlaylistID int32 `json:"playlist_id"` - Splits json.RawMessage `json:"splits"` - TotalPriceCents int64 `json:"total_price_cents"` - Blocknumber int32 `json:"blocknumber"` - BlockTimestamp pgtype.Timestamp `json:"block_timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` + PlaylistID int32 `json:"playlist_id"` + Splits json.RawMessage `json:"splits"` + TotalPriceCents int64 `json:"total_price_cents"` + Blocknumber int32 `json:"blocknumber"` + BlockTimestamp time.Time `json:"block_timestamp"` + CreatedAt time.Time `json:"created_at"` } type AlembicVersion struct { @@ -612,20 +613,20 @@ type AlembicVersion struct { } type AntiAbuseBlockedUser struct { - HandleLc string `json:"handle_lc"` - IsBlocked bool `json:"is_blocked"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + HandleLc string `json:"handle_lc"` + IsBlocked bool `json:"is_blocked"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type AppNameMetric struct { - ApplicationName string `json:"application_name"` - Count int32 `json:"count"` - Timestamp pgtype.Timestamp `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - ID int64 `json:"id"` - Ip pgtype.Text `json:"ip"` + ApplicationName string `json:"application_name"` + Count int32 `json:"count"` + Timestamp time.Time `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ID int64 `json:"id"` + Ip pgtype.Text `json:"ip"` } type AppNameMetricsAllTime struct { @@ -655,17 +656,17 @@ type AssociatedWallet struct { } type AudioTransactionsHistory struct { - UserBank string `json:"user_bank"` - Slot int32 `json:"slot"` - Signature string `json:"signature"` - TransactionType string `json:"transaction_type"` - Method string `json:"method"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - TransactionCreatedAt pgtype.Timestamp `json:"transaction_created_at"` - Change pgtype.Numeric `json:"change"` - Balance pgtype.Numeric `json:"balance"` - TxMetadata pgtype.Text `json:"tx_metadata"` + UserBank string `json:"user_bank"` + Slot int32 `json:"slot"` + Signature string `json:"signature"` + TransactionType string `json:"transaction_type"` + Method string `json:"method"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + TransactionCreatedAt time.Time `json:"transaction_created_at"` + Change pgtype.Numeric `json:"change"` + Balance pgtype.Numeric `json:"balance"` + TxMetadata pgtype.Text `json:"tx_metadata"` } type AudiusDataTx struct { @@ -713,9 +714,9 @@ type ChallengeDisbursement struct { } type ChallengeListenStreak struct { - UserID int32 `json:"user_id"` - LastListenDate pgtype.Timestamp `json:"last_listen_date"` - ListenStreak int32 `json:"listen_streak"` + UserID int32 `json:"user_id"` + LastListenDate time.Time `json:"last_listen_date"` + ListenStreak int32 `json:"listen_streak"` } type ChallengeProfileCompletion struct { @@ -730,17 +731,17 @@ type ChallengeProfileCompletion struct { } type Chat struct { - ChatID string `json:"chat_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - LastMessageAt pgtype.Timestamp `json:"last_message_at"` - LastMessage pgtype.Text `json:"last_message"` - LastMessageIsPlaintext pgtype.Bool `json:"last_message_is_plaintext"` + ChatID string `json:"chat_id"` + CreatedAt time.Time `json:"created_at"` + LastMessageAt time.Time `json:"last_message_at"` + LastMessage pgtype.Text `json:"last_message"` + LastMessageIsPlaintext pgtype.Bool `json:"last_message_is_plaintext"` } type ChatBan struct { - UserID int32 `json:"user_id"` - IsBanned bool `json:"is_banned"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + UserID int32 `json:"user_id"` + IsBanned bool `json:"is_banned"` + UpdatedAt time.Time `json:"updated_at"` } type ChatBlast struct { @@ -754,45 +755,45 @@ type ChatBlast struct { } type ChatBlockedUser struct { - BlockerUserID int32 `json:"blocker_user_id"` - BlockeeUserID int32 `json:"blockee_user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` + BlockerUserID int32 `json:"blocker_user_id"` + BlockeeUserID int32 `json:"blockee_user_id"` + CreatedAt time.Time `json:"created_at"` } type ChatMember struct { - ChatID string `json:"chat_id"` - UserID int32 `json:"user_id"` - ClearedHistoryAt pgtype.Timestamp `json:"cleared_history_at"` - InvitedByUserID int32 `json:"invited_by_user_id"` - InviteCode string `json:"invite_code"` - LastActiveAt pgtype.Timestamp `json:"last_active_at"` - UnreadCount int32 `json:"unread_count"` - CreatedAt pgtype.Timestamp `json:"created_at"` - IsHidden bool `json:"is_hidden"` + ChatID string `json:"chat_id"` + UserID int32 `json:"user_id"` + ClearedHistoryAt time.Time `json:"cleared_history_at"` + InvitedByUserID int32 `json:"invited_by_user_id"` + InviteCode string `json:"invite_code"` + LastActiveAt time.Time `json:"last_active_at"` + UnreadCount int32 `json:"unread_count"` + CreatedAt time.Time `json:"created_at"` + IsHidden bool `json:"is_hidden"` } type ChatMessage struct { - MessageID string `json:"message_id"` - ChatID string `json:"chat_id"` - UserID int32 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Ciphertext pgtype.Text `json:"ciphertext"` - BlastID pgtype.Text `json:"blast_id"` + MessageID string `json:"message_id"` + ChatID string `json:"chat_id"` + UserID int32 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + Ciphertext pgtype.Text `json:"ciphertext"` + BlastID pgtype.Text `json:"blast_id"` } type ChatMessageReaction struct { - UserID int32 `json:"user_id"` - MessageID string `json:"message_id"` - Reaction string `json:"reaction"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + UserID int32 `json:"user_id"` + MessageID string `json:"message_id"` + Reaction string `json:"reaction"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type ChatPermission struct { - UserID int32 `json:"user_id"` - Permits string `json:"permits"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - Allowed bool `json:"allowed"` + UserID int32 `json:"user_id"` + Permits string `json:"permits"` + UpdatedAt time.Time `json:"updated_at"` + Allowed bool `json:"allowed"` } type CidDatum struct { @@ -816,62 +817,62 @@ type Collectible struct { } type Comment struct { - CommentID int32 `json:"comment_id"` - Text string `json:"text"` - UserID int32 `json:"user_id"` - EntityID int32 `json:"entity_id"` - EntityType string `json:"entity_type"` - TrackTimestampS pgtype.Int8 `json:"track_timestamp_s"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - IsDelete pgtype.Bool `json:"is_delete"` - IsVisible pgtype.Bool `json:"is_visible"` - IsEdited pgtype.Bool `json:"is_edited"` - Txhash string `json:"txhash"` - Blockhash string `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + CommentID int32 `json:"comment_id"` + Text string `json:"text"` + UserID int32 `json:"user_id"` + EntityID int32 `json:"entity_id"` + EntityType string `json:"entity_type"` + TrackTimestampS pgtype.Int8 `json:"track_timestamp_s"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + IsDelete pgtype.Bool `json:"is_delete"` + IsVisible pgtype.Bool `json:"is_visible"` + IsEdited pgtype.Bool `json:"is_edited"` + Txhash string `json:"txhash"` + Blockhash string `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type CommentMention struct { - CommentID int32 `json:"comment_id"` - UserID int32 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - IsDelete pgtype.Bool `json:"is_delete"` - Txhash string `json:"txhash"` - Blockhash string `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + CommentID int32 `json:"comment_id"` + UserID int32 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + IsDelete pgtype.Bool `json:"is_delete"` + Txhash string `json:"txhash"` + Blockhash string `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type CommentNotificationSetting struct { - UserID int32 `json:"user_id"` - EntityID int32 `json:"entity_id"` - EntityType string `json:"entity_type"` - IsMuted pgtype.Bool `json:"is_muted"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + UserID int32 `json:"user_id"` + EntityID int32 `json:"entity_id"` + EntityType string `json:"entity_type"` + IsMuted pgtype.Bool `json:"is_muted"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type CommentReaction struct { - CommentID int32 `json:"comment_id"` - UserID int32 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - IsDelete pgtype.Bool `json:"is_delete"` - Txhash string `json:"txhash"` - Blockhash string `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + CommentID int32 `json:"comment_id"` + UserID int32 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + IsDelete pgtype.Bool `json:"is_delete"` + Txhash string `json:"txhash"` + Blockhash string `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type CommentReport struct { - CommentID int32 `json:"comment_id"` - UserID int32 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - IsDelete pgtype.Bool `json:"is_delete"` - Txhash string `json:"txhash"` - Blockhash string `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + CommentID int32 `json:"comment_id"` + UserID int32 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + IsDelete pgtype.Bool `json:"is_delete"` + Txhash string `json:"txhash"` + Blockhash string `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type CommentThread struct { @@ -880,18 +881,18 @@ type CommentThread struct { } type CoreAppState struct { - BlockHeight int64 `json:"block_height"` - AppHash []byte `json:"app_hash"` - CreatedAt pgtype.Timestamp `json:"created_at"` + BlockHeight int64 `json:"block_height"` + AppHash []byte `json:"app_hash"` + CreatedAt time.Time `json:"created_at"` } type CoreBlock struct { - Rowid int64 `json:"rowid"` - Height int64 `json:"height"` - ChainID string `json:"chain_id"` - Hash string `json:"hash"` - Proposer string `json:"proposer"` - CreatedAt pgtype.Timestamp `json:"created_at"` + Rowid int64 `json:"rowid"` + Height int64 `json:"height"` + ChainID string `json:"chain_id"` + Hash string `json:"hash"` + Proposer string `json:"proposer"` + CreatedAt time.Time `json:"created_at"` } type CoreDbMigration struct { @@ -909,12 +910,12 @@ type CoreIndexedBlock struct { } type CoreTransaction struct { - Rowid int64 `json:"rowid"` - BlockID int64 `json:"block_id"` - Index int32 `json:"index"` - TxHash string `json:"tx_hash"` - Transaction []byte `json:"transaction"` - CreatedAt pgtype.Timestamp `json:"created_at"` + Rowid int64 `json:"rowid"` + BlockID int64 `json:"block_id"` + Index int32 `json:"index"` + TxHash string `json:"tx_hash"` + Transaction []byte `json:"transaction"` + CreatedAt time.Time `json:"created_at"` } type CoreTxDecoded struct { @@ -941,11 +942,11 @@ type CoreTxDecodedPlay struct { } type CoreTxStat struct { - ID int32 `json:"id"` - TxType string `json:"tx_type"` - TxHash string `json:"tx_hash"` - BlockHeight int64 `json:"block_height"` - CreatedAt pgtype.Timestamp `json:"created_at"` + ID int32 `json:"id"` + TxType string `json:"tx_type"` + TxHash string `json:"tx_hash"` + BlockHeight int64 `json:"block_height"` + CreatedAt time.Time `json:"created_at"` } type CoreValidator struct { @@ -970,14 +971,14 @@ type Country struct { } type DashboardWalletUser struct { - Wallet string `json:"wallet"` - UserID int32 `json:"user_id"` - IsDelete bool `json:"is_delete"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - Txhash string `json:"txhash"` + Wallet string `json:"wallet"` + UserID int32 `json:"user_id"` + IsDelete bool `json:"is_delete"` + UpdatedAt time.Time `json:"updated_at"` + CreatedAt time.Time `json:"created_at"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + Txhash string `json:"txhash"` } type DelistStatusCursor struct { @@ -987,19 +988,19 @@ type DelistStatusCursor struct { } type DeveloperApp struct { - Address string `json:"address"` - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - UserID pgtype.Int4 `json:"user_id"` - Name string `json:"name"` - IsPersonalAccess bool `json:"is_personal_access"` - IsDelete bool `json:"is_delete"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Txhash string `json:"txhash"` - IsCurrent bool `json:"is_current"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - Description pgtype.Text `json:"description"` - ImageUrl pgtype.Text `json:"image_url"` + Address string `json:"address"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + UserID pgtype.Int4 `json:"user_id"` + Name string `json:"name"` + IsPersonalAccess bool `json:"is_personal_access"` + IsDelete bool `json:"is_delete"` + CreatedAt time.Time `json:"created_at"` + Txhash string `json:"txhash"` + IsCurrent bool `json:"is_current"` + UpdatedAt time.Time `json:"updated_at"` + Description pgtype.Text `json:"description"` + ImageUrl pgtype.Text `json:"image_url"` } // Tracks who has access to encrypted emails @@ -1030,39 +1031,39 @@ type EncryptedEmail struct { } type EthBlock struct { - LastScannedBlock int32 `json:"last_scanned_block"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + LastScannedBlock int32 `json:"last_scanned_block"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type Follow struct { - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - FollowerUserID int32 `json:"follower_user_id"` - FolloweeUserID int32 `json:"followee_user_id"` - IsCurrent bool `json:"is_current"` - IsDelete bool `json:"is_delete"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Txhash string `json:"txhash"` - Slot pgtype.Int4 `json:"slot"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + FollowerUserID int32 `json:"follower_user_id"` + FolloweeUserID int32 `json:"followee_user_id"` + IsCurrent bool `json:"is_current"` + IsDelete bool `json:"is_delete"` + CreatedAt time.Time `json:"created_at"` + Txhash string `json:"txhash"` + Slot pgtype.Int4 `json:"slot"` } type Grant struct { - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - GranteeAddress string `json:"grantee_address"` - UserID int32 `json:"user_id"` - IsRevoked bool `json:"is_revoked"` - IsCurrent bool `json:"is_current"` - IsApproved pgtype.Bool `json:"is_approved"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Txhash string `json:"txhash"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + GranteeAddress string `json:"grantee_address"` + UserID int32 `json:"user_id"` + IsRevoked bool `json:"is_revoked"` + IsCurrent bool `json:"is_current"` + IsApproved pgtype.Bool `json:"is_approved"` + UpdatedAt time.Time `json:"updated_at"` + CreatedAt time.Time `json:"created_at"` + Txhash string `json:"txhash"` } type HourlyPlayCount struct { - HourlyTimestamp pgtype.Timestamp `json:"hourly_timestamp"` - PlayCount int32 `json:"play_count"` + HourlyTimestamp time.Time `json:"hourly_timestamp"` + PlayCount int32 `json:"play_count"` } type IndexingCheckpoint struct { @@ -1072,64 +1073,64 @@ type IndexingCheckpoint struct { } type Milestone struct { - ID int32 `json:"id"` - Name string `json:"name"` - Threshold int32 `json:"threshold"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - Slot pgtype.Int4 `json:"slot"` - Timestamp pgtype.Timestamp `json:"timestamp"` + ID int32 `json:"id"` + Name string `json:"name"` + Threshold int32 `json:"threshold"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + Slot pgtype.Int4 `json:"slot"` + Timestamp time.Time `json:"timestamp"` } type MutedUser struct { - MutedUserID int32 `json:"muted_user_id"` - UserID int32 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - IsDelete pgtype.Bool `json:"is_delete"` - Txhash string `json:"txhash"` - Blockhash string `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + MutedUserID int32 `json:"muted_user_id"` + UserID int32 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + IsDelete pgtype.Bool `json:"is_delete"` + Txhash string `json:"txhash"` + Blockhash string `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type Notification struct { - ID int32 `json:"id"` - Specifier string `json:"specifier"` - GroupID string `json:"group_id"` - Type string `json:"type"` - Slot pgtype.Int4 `json:"slot"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - Timestamp pgtype.Timestamp `json:"timestamp"` - Data []byte `json:"data"` - UserIds []int32 `json:"user_ids"` - TypeV2 pgtype.Text `json:"type_v2"` + ID int32 `json:"id"` + Specifier string `json:"specifier"` + GroupID string `json:"group_id"` + Type string `json:"type"` + Slot pgtype.Int4 `json:"slot"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + Timestamp time.Time `json:"timestamp"` + Data []byte `json:"data"` + UserIds []int32 `json:"user_ids"` + TypeV2 pgtype.Text `json:"type_v2"` } type NotificationSeen struct { - UserID int32 `json:"user_id"` - SeenAt pgtype.Timestamp `json:"seen_at"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - Blockhash pgtype.Text `json:"blockhash"` - Txhash pgtype.Text `json:"txhash"` + UserID int32 `json:"user_id"` + SeenAt time.Time `json:"seen_at"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + Blockhash pgtype.Text `json:"blockhash"` + Txhash pgtype.Text `json:"txhash"` } type PaymentRouterTx struct { - Signature string `json:"signature"` - Slot int32 `json:"slot"` - CreatedAt pgtype.Timestamp `json:"created_at"` + Signature string `json:"signature"` + Slot int32 `json:"slot"` + CreatedAt time.Time `json:"created_at"` } type Play struct { - ID int32 `json:"id"` - UserID pgtype.Int4 `json:"user_id"` - Source pgtype.Text `json:"source"` - PlayItemID int32 `json:"play_item_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - Slot pgtype.Int4 `json:"slot"` - Signature pgtype.Text `json:"signature"` - City pgtype.Text `json:"city"` - Region pgtype.Text `json:"region"` - Country pgtype.Text `json:"country"` + ID int32 `json:"id"` + UserID pgtype.Int4 `json:"user_id"` + Source pgtype.Text `json:"source"` + PlayItemID int32 `json:"play_item_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Slot pgtype.Int4 `json:"slot"` + Signature pgtype.Text `json:"signature"` + City pgtype.Text `json:"city"` + Region pgtype.Text `json:"region"` + Country pgtype.Text `json:"country"` } type Playlist struct { @@ -1145,12 +1146,12 @@ type Playlist struct { IsCurrent bool `json:"is_current"` IsDelete bool `json:"is_delete"` Description pgtype.Text `json:"description"` - CreatedAt pgtype.Timestamp `json:"created_at"` + CreatedAt time.Time `json:"created_at"` Upc pgtype.Text `json:"upc"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + UpdatedAt time.Time `json:"updated_at"` PlaylistImageSizesMultihash pgtype.Text `json:"playlist_image_sizes_multihash"` Txhash string `json:"txhash"` - LastAddedTo pgtype.Timestamp `json:"last_added_to"` + LastAddedTo time.Time `json:"last_added_to"` Slot pgtype.Int4 `json:"slot"` MetadataMultihash pgtype.Text `json:"metadata_multihash"` IsImageAutogenerated bool `json:"is_image_autogenerated"` @@ -1162,7 +1163,7 @@ type Playlist struct { ProducerCopyrightLine []byte `json:"producer_copyright_line"` ParentalWarningType pgtype.Text `json:"parental_warning_type"` IsScheduledRelease bool `json:"is_scheduled_release"` - ReleaseDate pgtype.Timestamp `json:"release_date"` + ReleaseDate time.Time `json:"release_date"` IsStreamGated pgtype.Bool `json:"is_stream_gated"` } @@ -1179,13 +1180,13 @@ type PlaylistRoute struct { } type PlaylistSeen struct { - UserID int32 `json:"user_id"` - PlaylistID int32 `json:"playlist_id"` - SeenAt pgtype.Timestamp `json:"seen_at"` - IsCurrent bool `json:"is_current"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - Blockhash pgtype.Text `json:"blockhash"` - Txhash pgtype.Text `json:"txhash"` + UserID int32 `json:"user_id"` + PlaylistID int32 `json:"playlist_id"` + SeenAt time.Time `json:"seen_at"` + IsCurrent bool `json:"is_current"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + Blockhash pgtype.Text `json:"blockhash"` + Txhash pgtype.Text `json:"txhash"` } type PlaylistTrack struct { @@ -1197,20 +1198,20 @@ type PlaylistTrack struct { } type Reaction struct { - ID int32 `json:"id"` - ReactionValue int32 `json:"reaction_value"` - SenderWallet string `json:"sender_wallet"` - ReactionType string `json:"reaction_type"` - ReactedTo string `json:"reacted_to"` - Timestamp pgtype.Timestamp `json:"timestamp"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + ID int32 `json:"id"` + ReactionValue int32 `json:"reaction_value"` + SenderWallet string `json:"sender_wallet"` + ReactionType string `json:"reaction_type"` + ReactedTo string `json:"reacted_to"` + Timestamp time.Time `json:"timestamp"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type RelatedArtist struct { - UserID int32 `json:"user_id"` - RelatedArtistUserID int32 `json:"related_artist_user_id"` - Score float64 `json:"score"` - CreatedAt pgtype.Timestamp `json:"created_at"` + UserID int32 `json:"user_id"` + RelatedArtistUserID int32 `json:"related_artist_user_id"` + Score float64 `json:"score"` + CreatedAt time.Time `json:"created_at"` } type Remix struct { @@ -1219,27 +1220,27 @@ type Remix struct { } type ReportedComment struct { - ReportedCommentID int32 `json:"reported_comment_id"` - UserID int32 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - Txhash string `json:"txhash"` - Blockhash string `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` + ReportedCommentID int32 `json:"reported_comment_id"` + UserID int32 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Txhash string `json:"txhash"` + Blockhash string `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` } type Repost struct { - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - UserID int32 `json:"user_id"` - RepostItemID int32 `json:"repost_item_id"` - RepostType Reposttype `json:"repost_type"` - IsCurrent bool `json:"is_current"` - IsDelete bool `json:"is_delete"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Txhash string `json:"txhash"` - Slot pgtype.Int4 `json:"slot"` - IsRepostOfRepost bool `json:"is_repost_of_repost"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + UserID int32 `json:"user_id"` + RepostItemID int32 `json:"repost_item_id"` + RepostType Reposttype `json:"repost_type"` + IsCurrent bool `json:"is_current"` + IsDelete bool `json:"is_delete"` + CreatedAt time.Time `json:"created_at"` + Txhash string `json:"txhash"` + Slot pgtype.Int4 `json:"slot"` + IsRepostOfRepost bool `json:"is_repost_of_repost"` } type RevertBlock struct { @@ -1248,21 +1249,21 @@ type RevertBlock struct { } type RewardManagerTx struct { - Signature string `json:"signature"` - Slot int32 `json:"slot"` - CreatedAt pgtype.Timestamp `json:"created_at"` + Signature string `json:"signature"` + Slot int32 `json:"slot"` + CreatedAt time.Time `json:"created_at"` } type RouteMetric struct { - RoutePath string `json:"route_path"` - Version string `json:"version"` - QueryString string `json:"query_string"` - Count int32 `json:"count"` - Timestamp pgtype.Timestamp `json:"timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - ID int64 `json:"id"` - Ip pgtype.Text `json:"ip"` + RoutePath string `json:"route_path"` + Version string `json:"version"` + QueryString string `json:"query_string"` + Count int32 `json:"count"` + Timestamp time.Time `json:"timestamp"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + ID int64 `json:"id"` + Ip pgtype.Text `json:"ip"` } type RouteMetricsAllTime struct { @@ -1293,39 +1294,39 @@ type RouteMetricsTrailingWeek struct { } type RpcCursor struct { - RelayedBy string `json:"relayed_by"` - RelayedAt pgtype.Timestamp `json:"relayed_at"` + RelayedBy string `json:"relayed_by"` + RelayedAt time.Time `json:"relayed_at"` } type RpcError struct { - Sig string `json:"sig"` - RpcLogJson json.RawMessage `json:"rpc_log_json"` - ErrorText string `json:"error_text"` - ErrorCount int32 `json:"error_count"` - LastAttempt pgtype.Timestamp `json:"last_attempt"` + Sig string `json:"sig"` + RpcLogJson json.RawMessage `json:"rpc_log_json"` + ErrorText string `json:"error_text"` + ErrorCount int32 `json:"error_count"` + LastAttempt time.Time `json:"last_attempt"` } type RpcLog struct { - RelayedAt pgtype.Timestamp `json:"relayed_at"` - FromWallet string `json:"from_wallet"` - Rpc []byte `json:"rpc"` - Sig string `json:"sig"` - RelayedBy string `json:"relayed_by"` - AppliedAt pgtype.Timestamp `json:"applied_at"` + RelayedAt time.Time `json:"relayed_at"` + FromWallet string `json:"from_wallet"` + Rpc []byte `json:"rpc"` + Sig string `json:"sig"` + RelayedBy string `json:"relayed_by"` + AppliedAt time.Time `json:"applied_at"` } type Safe struct { - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - UserID int32 `json:"user_id"` - SaveItemID int32 `json:"save_item_id"` - SaveType Savetype `json:"save_type"` - IsCurrent bool `json:"is_current"` - IsDelete bool `json:"is_delete"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Txhash string `json:"txhash"` - Slot pgtype.Int4 `json:"slot"` - IsSaveOfRepost bool `json:"is_save_of_repost"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + UserID int32 `json:"user_id"` + SaveItemID int32 `json:"save_item_id"` + SaveType Savetype `json:"save_type"` + IsCurrent bool `json:"is_current"` + IsDelete bool `json:"is_delete"` + CreatedAt time.Time `json:"created_at"` + Txhash string `json:"txhash"` + Slot pgtype.Int4 `json:"slot"` + IsSaveOfRepost bool `json:"is_save_of_repost"` } type SchemaMigration struct { @@ -1343,8 +1344,8 @@ type SkippedTransaction struct { Blocknumber int32 `json:"blocknumber"` Blockhash string `json:"blockhash"` Txhash string `json:"txhash"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` Level Skippedtransactionlevel `json:"level"` } @@ -1366,11 +1367,11 @@ type SlaNodeReport struct { } type SlaRollup struct { - ID int32 `json:"id"` - TxHash string `json:"tx_hash"` - BlockStart int64 `json:"block_start"` - BlockEnd int64 `json:"block_end"` - Time pgtype.Timestamp `json:"time"` + ID int32 `json:"id"` + TxHash string `json:"tx_hash"` + BlockStart int64 `json:"block_start"` + BlockEnd int64 `json:"block_end"` + Time time.Time `json:"time"` } type SplTokenTx struct { @@ -1403,14 +1404,14 @@ type StorageProofPeer struct { } type Subscription struct { - Blockhash pgtype.Text `json:"blockhash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - SubscriberID int32 `json:"subscriber_id"` - UserID int32 `json:"user_id"` - IsCurrent bool `json:"is_current"` - IsDelete bool `json:"is_delete"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Txhash string `json:"txhash"` + Blockhash pgtype.Text `json:"blockhash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + SubscriberID int32 `json:"subscriber_id"` + UserID int32 `json:"user_id"` + IsCurrent bool `json:"is_current"` + IsDelete bool `json:"is_delete"` + CreatedAt time.Time `json:"created_at"` + Txhash string `json:"txhash"` } type SupporterRankUp struct { @@ -1427,72 +1428,72 @@ type TagTrackUser struct { } type Track struct { - Blockhash pgtype.Text `json:"blockhash"` - TrackID int32 `json:"track_id"` - IsCurrent bool `json:"is_current"` - IsDelete bool `json:"is_delete"` - OwnerID int32 `json:"owner_id"` - Title pgtype.Text `json:"title"` - CoverArt pgtype.Text `json:"cover_art"` - Tags pgtype.Text `json:"tags"` - Genre pgtype.Text `json:"genre"` - Mood pgtype.Text `json:"mood"` - CreditsSplits pgtype.Text `json:"credits_splits"` - CreateDate pgtype.Text `json:"create_date"` - FileType pgtype.Text `json:"file_type"` - MetadataMultihash pgtype.Text `json:"metadata_multihash"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - CreatedAt pgtype.Timestamp `json:"created_at"` - Description pgtype.Text `json:"description"` - Isrc pgtype.Text `json:"isrc"` - Iswc pgtype.Text `json:"iswc"` - License pgtype.Text `json:"license"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - CoverArtSizes pgtype.Text `json:"cover_art_sizes"` - IsUnlisted bool `json:"is_unlisted"` - FieldVisibility json.RawMessage `json:"field_visibility"` - RouteID pgtype.Text `json:"route_id"` - StemOf []byte `json:"stem_of"` - RemixOf []byte `json:"remix_of"` - Txhash string `json:"txhash"` - Slot pgtype.Int4 `json:"slot"` - IsAvailable bool `json:"is_available"` - StreamConditions UsageConditions `json:"stream_conditions"` - TrackCid pgtype.Text `json:"track_cid"` - IsPlaylistUpload bool `json:"is_playlist_upload"` - Duration pgtype.Int4 `json:"duration"` - AiAttributionUserID pgtype.Int4 `json:"ai_attribution_user_id"` - PreviewCid pgtype.Text `json:"preview_cid"` - AudioUploadID pgtype.Text `json:"audio_upload_id"` - PreviewStartSeconds pgtype.Float8 `json:"preview_start_seconds"` - ReleaseDate pgtype.Timestamp `json:"release_date"` - TrackSegments json.RawMessage `json:"track_segments"` - IsScheduledRelease bool `json:"is_scheduled_release"` - IsDownloadable bool `json:"is_downloadable"` - DownloadConditions UsageConditions `json:"download_conditions"` - IsOriginalAvailable bool `json:"is_original_available"` - OrigFileCid pgtype.Text `json:"orig_file_cid"` - OrigFilename pgtype.Text `json:"orig_filename"` - PlaylistsContainingTrack []int32 `json:"playlists_containing_track"` - PlacementHosts pgtype.Text `json:"placement_hosts"` - DdexApp pgtype.Text `json:"ddex_app"` - DdexReleaseIds json.RawMessage `json:"ddex_release_ids"` - Artists json.RawMessage `json:"artists"` - ResourceContributors json.RawMessage `json:"resource_contributors"` - IndirectResourceContributors json.RawMessage `json:"indirect_resource_contributors"` - RightsController json.RawMessage `json:"rights_controller"` - CopyrightLine json.RawMessage `json:"copyright_line"` - ProducerCopyrightLine json.RawMessage `json:"producer_copyright_line"` - ParentalWarningType pgtype.Text `json:"parental_warning_type"` - PlaylistsPreviouslyContainingTrack json.RawMessage `json:"playlists_previously_containing_track"` - AllowedApiKeys []string `json:"allowed_api_keys"` - Bpm pgtype.Float8 `json:"bpm"` - MusicalKey pgtype.Text `json:"musical_key"` - AudioAnalysisErrorCount int32 `json:"audio_analysis_error_count"` - IsCustomBpm pgtype.Bool `json:"is_custom_bpm"` - IsCustomMusicalKey pgtype.Bool `json:"is_custom_musical_key"` - CommentsDisabled pgtype.Bool `json:"comments_disabled"` - PinnedCommentID pgtype.Int4 `json:"pinned_comment_id"` + Blockhash pgtype.Text `json:"blockhash"` + TrackID int32 `json:"track_id"` + IsCurrent bool `json:"is_current"` + IsDelete bool `json:"is_delete"` + OwnerID int32 `json:"owner_id"` + Title pgtype.Text `json:"title"` + CoverArt pgtype.Text `json:"cover_art"` + Tags pgtype.Text `json:"tags"` + Genre pgtype.Text `json:"genre"` + Mood pgtype.Text `json:"mood"` + CreditsSplits pgtype.Text `json:"credits_splits"` + CreateDate pgtype.Text `json:"create_date"` + FileType pgtype.Text `json:"file_type"` + MetadataMultihash pgtype.Text `json:"metadata_multihash"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + CreatedAt time.Time `json:"created_at"` + Description pgtype.Text `json:"description"` + Isrc pgtype.Text `json:"isrc"` + Iswc pgtype.Text `json:"iswc"` + License pgtype.Text `json:"license"` + UpdatedAt time.Time `json:"updated_at"` + CoverArtSizes pgtype.Text `json:"cover_art_sizes"` + IsUnlisted bool `json:"is_unlisted"` + FieldVisibility json.RawMessage `json:"field_visibility"` + RouteID pgtype.Text `json:"route_id"` + StemOf []byte `json:"stem_of"` + RemixOf []byte `json:"remix_of"` + Txhash string `json:"txhash"` + Slot pgtype.Int4 `json:"slot"` + IsAvailable bool `json:"is_available"` + StreamConditions UsageConditions `json:"stream_conditions"` + TrackCid pgtype.Text `json:"track_cid"` + IsPlaylistUpload bool `json:"is_playlist_upload"` + Duration pgtype.Int4 `json:"duration"` + AiAttributionUserID pgtype.Int4 `json:"ai_attribution_user_id"` + PreviewCid pgtype.Text `json:"preview_cid"` + AudioUploadID pgtype.Text `json:"audio_upload_id"` + PreviewStartSeconds pgtype.Float8 `json:"preview_start_seconds"` + ReleaseDate time.Time `json:"release_date"` + TrackSegments json.RawMessage `json:"track_segments"` + IsScheduledRelease bool `json:"is_scheduled_release"` + IsDownloadable bool `json:"is_downloadable"` + DownloadConditions UsageConditions `json:"download_conditions"` + IsOriginalAvailable bool `json:"is_original_available"` + OrigFileCid pgtype.Text `json:"orig_file_cid"` + OrigFilename pgtype.Text `json:"orig_filename"` + PlaylistsContainingTrack []int32 `json:"playlists_containing_track"` + PlacementHosts pgtype.Text `json:"placement_hosts"` + DdexApp pgtype.Text `json:"ddex_app"` + DdexReleaseIds json.RawMessage `json:"ddex_release_ids"` + Artists json.RawMessage `json:"artists"` + ResourceContributors json.RawMessage `json:"resource_contributors"` + IndirectResourceContributors json.RawMessage `json:"indirect_resource_contributors"` + RightsController json.RawMessage `json:"rights_controller"` + CopyrightLine json.RawMessage `json:"copyright_line"` + ProducerCopyrightLine json.RawMessage `json:"producer_copyright_line"` + ParentalWarningType pgtype.Text `json:"parental_warning_type"` + PlaylistsPreviouslyContainingTrack json.RawMessage `json:"playlists_previously_containing_track"` + AllowedApiKeys []string `json:"allowed_api_keys"` + Bpm pgtype.Float8 `json:"bpm"` + MusicalKey pgtype.Text `json:"musical_key"` + AudioAnalysisErrorCount int32 `json:"audio_analysis_error_count"` + IsCustomBpm pgtype.Bool `json:"is_custom_bpm"` + IsCustomMusicalKey pgtype.Bool `json:"is_custom_musical_key"` + CommentsDisabled pgtype.Bool `json:"comments_disabled"` + PinnedCommentID pgtype.Int4 `json:"pinned_comment_id"` // Title of the original song if this track is a cover CoverOriginalSongTitle pgtype.Text `json:"cover_original_song_title"` // Artist of the original song if this track is a cover @@ -1513,15 +1514,15 @@ type TrackDelistStatus struct { } type TrackDownload struct { - Txhash string `json:"txhash"` - Blocknumber int32 `json:"blocknumber"` - ParentTrackID int32 `json:"parent_track_id"` - TrackID int32 `json:"track_id"` - UserID pgtype.Int4 `json:"user_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - City pgtype.Text `json:"city"` - Region pgtype.Text `json:"region"` - Country pgtype.Text `json:"country"` + Txhash string `json:"txhash"` + Blocknumber int32 `json:"blocknumber"` + ParentTrackID int32 `json:"parent_track_id"` + TrackID int32 `json:"track_id"` + UserID pgtype.Int4 `json:"user_id"` + CreatedAt time.Time `json:"created_at"` + City pgtype.Text `json:"city"` + Region pgtype.Text `json:"region"` + Country pgtype.Text `json:"country"` } type TrackPriceHistory struct { @@ -1529,8 +1530,8 @@ type TrackPriceHistory struct { Splits json.RawMessage `json:"splits"` TotalPriceCents int64 `json:"total_price_cents"` Blocknumber int32 `json:"blocknumber"` - BlockTimestamp pgtype.Timestamp `json:"block_timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` + BlockTimestamp time.Time `json:"block_timestamp"` + CreatedAt time.Time `json:"created_at"` Access UsdcPurchaseAccessType `json:"access"` } @@ -1547,31 +1548,31 @@ type TrackRoute struct { } type TrackTrendingScore struct { - TrackID int32 `json:"track_id"` - Type string `json:"type"` - Genre pgtype.Text `json:"genre"` - Version string `json:"version"` - TimeRange string `json:"time_range"` - Score float64 `json:"score"` - CreatedAt pgtype.Timestamp `json:"created_at"` + TrackID int32 `json:"track_id"` + Type string `json:"type"` + Genre pgtype.Text `json:"genre"` + Version string `json:"version"` + TimeRange string `json:"time_range"` + Score float64 `json:"score"` + CreatedAt time.Time `json:"created_at"` } type TrendingParam struct { - TrackID int32 `json:"track_id"` - ReleaseDate pgtype.Timestamp `json:"release_date"` - Genre pgtype.Text `json:"genre"` - OwnerID int32 `json:"owner_id"` - PlayCount pgtype.Int8 `json:"play_count"` - OwnerFollowerCount pgtype.Int8 `json:"owner_follower_count"` - RepostCount int32 `json:"repost_count"` - SaveCount int32 `json:"save_count"` - RepostWeekCount int64 `json:"repost_week_count"` - RepostMonthCount int64 `json:"repost_month_count"` - RepostYearCount int64 `json:"repost_year_count"` - SaveWeekCount int64 `json:"save_week_count"` - SaveMonthCount int64 `json:"save_month_count"` - SaveYearCount int64 `json:"save_year_count"` - Karma int64 `json:"karma"` + TrackID int32 `json:"track_id"` + ReleaseDate time.Time `json:"release_date"` + Genre pgtype.Text `json:"genre"` + OwnerID int32 `json:"owner_id"` + PlayCount pgtype.Int8 `json:"play_count"` + OwnerFollowerCount pgtype.Int8 `json:"owner_follower_count"` + RepostCount int32 `json:"repost_count"` + SaveCount int32 `json:"save_count"` + RepostWeekCount int64 `json:"repost_week_count"` + RepostMonthCount int64 `json:"repost_month_count"` + RepostYearCount int64 `json:"repost_year_count"` + SaveWeekCount int64 `json:"save_week_count"` + SaveMonthCount int64 `json:"save_month_count"` + SaveYearCount int64 `json:"save_year_count"` + Karma int64 `json:"karma"` } type TrendingResult struct { @@ -1591,8 +1592,8 @@ type UsdcPurchase struct { Amount int64 `json:"amount"` ContentType UsdcPurchaseContentType `json:"content_type"` ContentID int32 `json:"content_id"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` ExtraAmount int64 `json:"extra_amount"` Access UsdcPurchaseAccessType `json:"access"` City pgtype.Text `json:"city"` @@ -1603,101 +1604,101 @@ type UsdcPurchase struct { } type UsdcTransactionsHistory struct { - UserBank string `json:"user_bank"` - Slot int32 `json:"slot"` - Signature string `json:"signature"` - TransactionType string `json:"transaction_type"` - Method string `json:"method"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - TransactionCreatedAt pgtype.Timestamp `json:"transaction_created_at"` - Change pgtype.Numeric `json:"change"` - Balance pgtype.Numeric `json:"balance"` - TxMetadata pgtype.Text `json:"tx_metadata"` + UserBank string `json:"user_bank"` + Slot int32 `json:"slot"` + Signature string `json:"signature"` + TransactionType string `json:"transaction_type"` + Method string `json:"method"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + TransactionCreatedAt time.Time `json:"transaction_created_at"` + Change pgtype.Numeric `json:"change"` + Balance pgtype.Numeric `json:"balance"` + TxMetadata pgtype.Text `json:"tx_metadata"` } type UsdcUserBankAccount struct { - Signature string `json:"signature"` - EthereumAddress string `json:"ethereum_address"` - CreatedAt pgtype.Timestamp `json:"created_at"` - BankAccount string `json:"bank_account"` + Signature string `json:"signature"` + EthereumAddress string `json:"ethereum_address"` + CreatedAt time.Time `json:"created_at"` + BankAccount string `json:"bank_account"` } type User struct { - Blockhash pgtype.Text `json:"blockhash"` - UserID int32 `json:"user_id"` - IsCurrent bool `json:"is_current"` - Handle pgtype.Text `json:"handle"` - Wallet pgtype.Text `json:"wallet"` - Name pgtype.Text `json:"name"` - ProfilePicture pgtype.Text `json:"profile_picture"` - CoverPhoto pgtype.Text `json:"cover_photo"` - Bio pgtype.Text `json:"bio"` - Location pgtype.Text `json:"location"` - MetadataMultihash pgtype.Text `json:"metadata_multihash"` - CreatorNodeEndpoint pgtype.Text `json:"creator_node_endpoint"` - Blocknumber pgtype.Int4 `json:"blocknumber"` - IsVerified bool `json:"is_verified"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - HandleLc pgtype.Text `json:"handle_lc"` - CoverPhotoSizes pgtype.Text `json:"cover_photo_sizes"` - ProfilePictureSizes pgtype.Text `json:"profile_picture_sizes"` - PrimaryID pgtype.Int4 `json:"primary_id"` - SecondaryIds []int32 `json:"secondary_ids"` - ReplicaSetUpdateSigner pgtype.Text `json:"replica_set_update_signer"` - HasCollectibles bool `json:"has_collectibles"` - Txhash string `json:"txhash"` - PlaylistLibrary json.RawMessage `json:"playlist_library"` - IsDeactivated bool `json:"is_deactivated"` - Slot pgtype.Int4 `json:"slot"` - UserStorageAccount pgtype.Text `json:"user_storage_account"` - UserAuthorityAccount pgtype.Text `json:"user_authority_account"` - ArtistPickTrackID pgtype.Int4 `json:"artist_pick_track_id"` - IsAvailable bool `json:"is_available"` - IsStorageV2 bool `json:"is_storage_v2"` - AllowAiAttribution bool `json:"allow_ai_attribution"` - SplUsdcPayoutWallet pgtype.Text `json:"spl_usdc_payout_wallet"` - TwitterHandle pgtype.Text `json:"twitter_handle"` - InstagramHandle pgtype.Text `json:"instagram_handle"` - TiktokHandle pgtype.Text `json:"tiktok_handle"` - VerifiedWithTwitter pgtype.Bool `json:"verified_with_twitter"` - VerifiedWithInstagram pgtype.Bool `json:"verified_with_instagram"` - VerifiedWithTiktok pgtype.Bool `json:"verified_with_tiktok"` - Website pgtype.Text `json:"website"` - Donation pgtype.Text `json:"donation"` + Blockhash pgtype.Text `json:"blockhash"` + UserID int32 `json:"user_id"` + IsCurrent bool `json:"is_current"` + Handle pgtype.Text `json:"handle"` + Wallet pgtype.Text `json:"wallet"` + Name pgtype.Text `json:"name"` + ProfilePicture pgtype.Text `json:"profile_picture"` + CoverPhoto pgtype.Text `json:"cover_photo"` + Bio pgtype.Text `json:"bio"` + Location pgtype.Text `json:"location"` + MetadataMultihash pgtype.Text `json:"metadata_multihash"` + CreatorNodeEndpoint pgtype.Text `json:"creator_node_endpoint"` + Blocknumber pgtype.Int4 `json:"blocknumber"` + IsVerified bool `json:"is_verified"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + HandleLc pgtype.Text `json:"handle_lc"` + CoverPhotoSizes pgtype.Text `json:"cover_photo_sizes"` + ProfilePictureSizes pgtype.Text `json:"profile_picture_sizes"` + PrimaryID pgtype.Int4 `json:"primary_id"` + SecondaryIds []int32 `json:"secondary_ids"` + ReplicaSetUpdateSigner pgtype.Text `json:"replica_set_update_signer"` + HasCollectibles bool `json:"has_collectibles"` + Txhash string `json:"txhash"` + PlaylistLibrary json.RawMessage `json:"playlist_library"` + IsDeactivated bool `json:"is_deactivated"` + Slot pgtype.Int4 `json:"slot"` + UserStorageAccount pgtype.Text `json:"user_storage_account"` + UserAuthorityAccount pgtype.Text `json:"user_authority_account"` + ArtistPickTrackID pgtype.Int4 `json:"artist_pick_track_id"` + IsAvailable bool `json:"is_available"` + IsStorageV2 bool `json:"is_storage_v2"` + AllowAiAttribution bool `json:"allow_ai_attribution"` + SplUsdcPayoutWallet pgtype.Text `json:"spl_usdc_payout_wallet"` + TwitterHandle pgtype.Text `json:"twitter_handle"` + InstagramHandle pgtype.Text `json:"instagram_handle"` + TiktokHandle pgtype.Text `json:"tiktok_handle"` + VerifiedWithTwitter pgtype.Bool `json:"verified_with_twitter"` + VerifiedWithInstagram pgtype.Bool `json:"verified_with_instagram"` + VerifiedWithTiktok pgtype.Bool `json:"verified_with_tiktok"` + Website pgtype.Text `json:"website"` + Donation pgtype.Text `json:"donation"` } type UserBalance struct { - UserID int32 `json:"user_id"` - Balance string `json:"balance"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` - AssociatedWalletsBalance string `json:"associated_wallets_balance"` - Waudio pgtype.Text `json:"waudio"` - AssociatedSolWalletsBalance string `json:"associated_sol_wallets_balance"` + UserID int32 `json:"user_id"` + Balance string `json:"balance"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + AssociatedWalletsBalance string `json:"associated_wallets_balance"` + Waudio pgtype.Text `json:"waudio"` + AssociatedSolWalletsBalance string `json:"associated_sol_wallets_balance"` } type UserBalanceChange struct { - UserID int32 `json:"user_id"` - Blocknumber int32 `json:"blocknumber"` - CurrentBalance string `json:"current_balance"` - PreviousBalance string `json:"previous_balance"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + UserID int32 `json:"user_id"` + Blocknumber int32 `json:"blocknumber"` + CurrentBalance string `json:"current_balance"` + PreviousBalance string `json:"previous_balance"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } type UserBankAccount struct { - Signature string `json:"signature"` - EthereumAddress string `json:"ethereum_address"` - CreatedAt pgtype.Timestamp `json:"created_at"` - BankAccount string `json:"bank_account"` + Signature string `json:"signature"` + EthereumAddress string `json:"ethereum_address"` + CreatedAt time.Time `json:"created_at"` + BankAccount string `json:"bank_account"` } type UserBankTx struct { - Signature string `json:"signature"` - Slot int32 `json:"slot"` - CreatedAt pgtype.Timestamp `json:"created_at"` + Signature string `json:"signature"` + Slot int32 `json:"slot"` + CreatedAt time.Time `json:"created_at"` } type UserChallenge struct { @@ -1709,7 +1710,7 @@ type UserChallenge struct { CompletedBlocknumber pgtype.Int4 `json:"completed_blocknumber"` Amount int32 `json:"amount"` CreatedAt pgtype.Timestamptz `json:"created_at"` - CompletedAt pgtype.Timestamp `json:"completed_at"` + CompletedAt time.Time `json:"completed_at"` } type UserDelistStatus struct { @@ -1736,11 +1737,11 @@ type UserListeningHistory struct { } type UserPayoutWalletHistory struct { - UserID int32 `json:"user_id"` - SplUsdcPayoutWallet pgtype.Text `json:"spl_usdc_payout_wallet"` - Blocknumber int32 `json:"blocknumber"` - BlockTimestamp pgtype.Timestamp `json:"block_timestamp"` - CreatedAt pgtype.Timestamp `json:"created_at"` + UserID int32 `json:"user_id"` + SplUsdcPayoutWallet pgtype.Text `json:"spl_usdc_payout_wallet"` + Blocknumber int32 `json:"blocknumber"` + BlockTimestamp time.Time `json:"block_timestamp"` + CreatedAt time.Time `json:"created_at"` } type UserPubkey struct { @@ -1749,11 +1750,11 @@ type UserPubkey struct { } type UserTip struct { - Slot int32 `json:"slot"` - Signature string `json:"signature"` - SenderUserID int32 `json:"sender_user_id"` - ReceiverUserID int32 `json:"receiver_user_id"` - Amount int64 `json:"amount"` - CreatedAt pgtype.Timestamp `json:"created_at"` - UpdatedAt pgtype.Timestamp `json:"updated_at"` + Slot int32 `json:"slot"` + Signature string `json:"signature"` + SenderUserID int32 `json:"sender_user_id"` + ReceiverUserID int32 `json:"receiver_user_id"` + Amount int64 `json:"amount"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` } diff --git a/api/resolve_middleware.go b/api/resolve_middleware.go index eeb5ee22..95d81cfa 100644 --- a/api/resolve_middleware.go +++ b/api/resolve_middleware.go @@ -38,3 +38,21 @@ func (app *ApiServer) requireHandleMiddleware(c *fiber.Ctx) error { c.Locals("userId", userId) return c.Next() } + +func (app *ApiServer) requireTrackIdMiddleware(c *fiber.Ctx) error { + trackId, err := trashid.DecodeHashId(c.Params("trackId")) + if err != nil || trackId == 0 { + return sendError(c, 400, "invalid trackId") + } + c.Locals("trackId", trackId) + return c.Next() +} + +func (app *ApiServer) requirePlaylistIdMiddleware(c *fiber.Ctx) error { + playlistId, err := trashid.DecodeHashId(c.Params("playlistId")) + if err != nil || playlistId == 0 { + return sendError(c, 400, "invalid playlistId") + } + c.Locals("playlistId", playlistId) + return c.Next() +} diff --git a/api/response_helpers.go b/api/response_helpers.go index a27a3052..1a98ef42 100644 --- a/api/response_helpers.go +++ b/api/response_helpers.go @@ -5,7 +5,18 @@ import ( "github.com/gofiber/fiber/v2" ) -func v1UserResponse(c *fiber.Ctx, users []dbv1.FullUser) error { +func v1UserResponse(c *fiber.Ctx, user dbv1.FullUser) error { + if c.Locals("isFull").(bool) { + return c.JSON(fiber.Map{ + "data": user, + }) + } + return c.JSON(fiber.Map{ + "data": dbv1.ToMinUser(user), + }) +} + +func v1UsersResponse(c *fiber.Ctx, users []dbv1.FullUser) error { if c.Locals("isFull").(bool) { return c.JSON(fiber.Map{ "data": users, @@ -16,7 +27,18 @@ func v1UserResponse(c *fiber.Ctx, users []dbv1.FullUser) error { }) } -func v1PlaylistResponse(c *fiber.Ctx, playlists []dbv1.FullPlaylist) error { +func v1PlaylistResponse(c *fiber.Ctx, playlist dbv1.FullPlaylist) error { + if c.Locals("isFull").(bool) { + return c.JSON(fiber.Map{ + "data": playlist, + }) + } + return c.JSON(fiber.Map{ + "data": dbv1.ToMinPlaylist(playlist), + }) +} + +func v1PlaylistsResponse(c *fiber.Ctx, playlists []dbv1.FullPlaylist) error { if c.Locals("isFull").(bool) { return c.JSON(fiber.Map{ "data": playlists, @@ -27,7 +49,18 @@ func v1PlaylistResponse(c *fiber.Ctx, playlists []dbv1.FullPlaylist) error { }) } -func v1TrackResponse(c *fiber.Ctx, tracks []dbv1.FullTrack) error { +func v1TrackResponse(c *fiber.Ctx, track dbv1.FullTrack) error { + if c.Locals("isFull").(bool) { + return c.JSON(fiber.Map{ + "data": track, + }) + } + return c.JSON(fiber.Map{ + "data": dbv1.ToMinTrack(track), + }) +} + +func v1TracksResponse(c *fiber.Ctx, tracks []dbv1.FullTrack) error { if c.Locals("isFull").(bool) { return c.JSON(fiber.Map{ "data": tracks, diff --git a/api/server.go b/api/server.go index bf770936..bceb00c5 100644 --- a/api/server.go +++ b/api/server.go @@ -17,6 +17,7 @@ import ( "github.com/gofiber/fiber/v2/middleware/cors" "github.com/gofiber/fiber/v2/middleware/recover" "github.com/jackc/pgx/v5/pgxpool" + "github.com/segmentio/encoding/json" "go.uber.org/zap" "go.uber.org/zap/zapcore" ) @@ -77,6 +78,8 @@ func NewApiServer(config Config) *ApiServer { app := &ApiServer{ fiber.New(fiber.Config{ + JSONEncoder: json.Marshal, + JSONDecoder: json.Unmarshal, ErrorHandler: errorHandler(logger), }), pool, @@ -115,47 +118,45 @@ func NewApiServer(config Config) *ApiServer { app.Use(app.isFullMiddleware) app.Use(app.resolveMyIdMiddleware) - // v1/full - app.Get("/v1/full/users", app.v1Users) + v1 := app.Group("/v1") + v1Full := app.Group("/v1/full") - app.Use("/v1/full/users/handle/:handle", app.requireHandleMiddleware) - app.Get("/v1/full/users/handle/:handle/tracks", app.v1UserTracks) - app.Get("/v1/full/users/handle/:handle/reposts", app.v1UsersReposts) + for _, g := range []fiber.Router{v1, v1Full} { + // Users + g.Get("/users", app.v1Users) - app.Use("/v1/full/users/:userId", app.requireUserIdMiddleware) - app.Get("/v1/full/users/:userId/followers", app.v1UsersFollowers) - app.Get("/v1/full/users/:userId/following", app.v1UsersFollowing) - app.Get("/v1/full/users/:userId/mutuals", app.v1UsersMutuals) - app.Get("/v1/full/users/:userId/reposts", app.v1UsersReposts) - app.Get("/v1/full/users/:userId/supporting", app.v1UsersSupporting) - app.Get("/v1/full/users/:userId/tracks", app.v1UserTracks) + g.Use("/users/handle/:handle", app.requireHandleMiddleware) + g.Get("/users/handle/:handle/tracks", app.v1UserTracks) + g.Get("/users/handle/:handle/reposts", app.v1UsersReposts) - app.Get("/v1/full/tracks", app.v1Tracks) - app.Get("/v1/full/tracks/:trackId/reposts", app.v1TracksReposts) - app.Get("/v1/full/tracks/:trackId/favorites", app.v1TracksFavorites) + g.Use("/users/:userId", app.requireUserIdMiddleware) + g.Get("/users/:userId", app.v1User) + g.Get("/users/:userId/followers", app.v1UsersFollowers) + g.Get("/users/:userId/following", app.v1UsersFollowing) + g.Get("/users/:userId/mutuals", app.v1UsersMutuals) + g.Get("/users/:userId/reposts", app.v1UsersReposts) + g.Get("/users/:userId/supporting", app.v1UsersSupporting) + g.Get("/users/:userId/tracks", app.v1UserTracks) - app.Get("/v1/full/playlists", app.v1playlists) - app.Get("/v1/full/playlists/:playlistId/reposts", app.v1PlaylistsReposts) - app.Get("/v1/full/playlists/:playlistId/favorites", app.v1PlaylistsFavorites) + // Tracks + g.Get("/tracks", app.v1Tracks) - app.Get("/v1/full/developer_apps/:address", app.v1DeveloperApps) + g.Use("/tracks/:trackId", app.requireTrackIdMiddleware) + g.Get("/tracks/:trackId", app.v1Track) + g.Get("/tracks/:trackId/reposts", app.v1TracksReposts) + g.Get("/tracks/:trackId/favorites", app.v1TracksFavorites) - // v1 - app.Get("/v1/users", app.v1Users) - app.Get("/v1/users/:userId/followers", app.v1UsersFollowers) - app.Get("/v1/users/:userId/following", app.v1UsersFollowing) - app.Get("/v1/users/:userId/mutuals", app.v1UsersMutuals) - app.Get("/v1/users/:userId/supporting", app.v1UsersSupporting) + // Playlists + g.Get("/playlists", app.v1playlists) - app.Get("/v1/tracks", app.v1Tracks) - app.Get("/v1/tracks/:trackId/reposts", app.v1TracksReposts) - app.Get("/v1/tracks/:trackId/favorites", app.v1TracksFavorites) + g.Use("/playlists/:playlistId", app.requirePlaylistIdMiddleware) + g.Get("/playlists/:playlistId", app.v1Playlist) + g.Get("/playlists/:playlistId/reposts", app.v1PlaylistsReposts) + g.Get("/playlists/:playlistId/favorites", app.v1PlaylistsFavorites) - app.Get("/v1/playlists", app.v1playlists) - app.Get("/v1/playlists/:playlistId/reposts", app.v1PlaylistsReposts) - app.Get("/v1/playlists/:playlistId/favorites", app.v1PlaylistsFavorites) - - app.Get("/v1/developer_apps/:address", app.v1DeveloperApps) + // Developer Apps + g.Get("/developer_apps/:address", app.v1DeveloperApps) + } // proxy unhandled requests thru to existing discovery API { diff --git a/api/v1_playlist.go b/api/v1_playlist.go new file mode 100644 index 00000000..2e8904be --- /dev/null +++ b/api/v1_playlist.go @@ -0,0 +1,27 @@ +package api + +import ( + "bridgerton.audius.co/api/dbv1" + "github.com/gofiber/fiber/v2" +) + +func (app *ApiServer) v1Playlist(c *fiber.Ctx) error { + myId := c.Locals("myId").(int) + playlistId := c.Locals("playlistId").(int) + + playlists, err := app.queries.FullPlaylists(c.Context(), dbv1.GetPlaylistsParams{ + MyID: int32(myId), + Ids: []int32{int32(playlistId)}, + }) + if err != nil { + return err + } + + if len(playlists) == 0 { + return sendError(c, 404, "playlist not found") + } + + playlist := playlists[0] + + return v1PlaylistResponse(c, playlist) +} diff --git a/api/v1_playlist_test.go b/api/v1_playlist_test.go new file mode 100644 index 00000000..d3c1d447 --- /dev/null +++ b/api/v1_playlist_test.go @@ -0,0 +1,21 @@ +package api + +import ( + "strings" + "testing" + + "bridgerton.audius.co/api/dbv1" + "github.com/stretchr/testify/assert" +) + +func TestGetPlaylist(t *testing.T) { + var playlistResponse struct { + Data dbv1.FullPlaylist + } + + status, body := testGet(t, "/v1/full/playlists/7eP5n", &playlistResponse) + assert.Equal(t, 200, status) + + assert.True(t, strings.Contains(string(body), `"playlist_name":"First"`)) + assert.True(t, strings.Contains(string(body), `"id":"7eP5n"`)) +} diff --git a/api/v1_playlists.go b/api/v1_playlists.go index ff0b148c..510144b2 100644 --- a/api/v1_playlists.go +++ b/api/v1_playlists.go @@ -18,5 +18,5 @@ func (app *ApiServer) v1playlists(c *fiber.Ctx) error { return err } - return v1PlaylistResponse(c, playlists) + return v1PlaylistsResponse(c, playlists) } diff --git a/api/v1_track.go b/api/v1_track.go new file mode 100644 index 00000000..12357a3f --- /dev/null +++ b/api/v1_track.go @@ -0,0 +1,27 @@ +package api + +import ( + "bridgerton.audius.co/api/dbv1" + "github.com/gofiber/fiber/v2" +) + +func (app *ApiServer) v1Track(c *fiber.Ctx) error { + myId := c.Locals("myId").(int) + trackId := c.Locals("trackId").(int) + + tracks, err := app.queries.FullTracks(c.Context(), dbv1.GetTracksParams{ + MyID: int32(myId), + Ids: []int32{int32(trackId)}, + }) + if err != nil { + return err + } + + if len(tracks) == 0 { + return sendError(c, 404, "track not found") + } + + track := tracks[0] + + return v1TrackResponse(c, track) +} diff --git a/api/v1_track_test.go b/api/v1_track_test.go new file mode 100644 index 00000000..2189839d --- /dev/null +++ b/api/v1_track_test.go @@ -0,0 +1,21 @@ +package api + +import ( + "strings" + "testing" + + "bridgerton.audius.co/api/dbv1" + "github.com/stretchr/testify/assert" +) + +func TestGetTrack(t *testing.T) { + var trackResponse struct { + Data dbv1.FullTrack + } + + status, body := testGet(t, "/v1/full/tracks/eYJyn", &trackResponse) + assert.Equal(t, 200, status) + + assert.True(t, strings.Contains(string(body), `"title":"Culca Canyon"`)) + assert.True(t, strings.Contains(string(body), `"id":"eYJyn"`)) +} diff --git a/api/v1_tracks.go b/api/v1_tracks.go index 19738843..a37e2bbb 100644 --- a/api/v1_tracks.go +++ b/api/v1_tracks.go @@ -18,5 +18,5 @@ func (app *ApiServer) v1Tracks(c *fiber.Ctx) error { return err } - return v1TrackResponse(c, tracks) + return v1TracksResponse(c, tracks) } diff --git a/api/v1_user.go b/api/v1_user.go new file mode 100644 index 00000000..8ac50eb9 --- /dev/null +++ b/api/v1_user.go @@ -0,0 +1,28 @@ +package api + +import ( + "bridgerton.audius.co/api/dbv1" + "github.com/gofiber/fiber/v2" +) + +func (app *ApiServer) v1User(c *fiber.Ctx) error { + myId := c.Locals("myId") + userId := c.Locals("userId").(int) + + users, err := app.queries.FullUsers(c.Context(), dbv1.GetUsersParams{ + MyID: myId, + Ids: []int32{int32(userId)}, + }) + + if err != nil { + return err + } + + if len(users) == 0 { + return sendError(c, 404, "user not found") + } + + user := users[0] + + return v1UserResponse(c, user) +} diff --git a/api/v1_user_test.go b/api/v1_user_test.go new file mode 100644 index 00000000..ce967cdb --- /dev/null +++ b/api/v1_user_test.go @@ -0,0 +1,27 @@ +package api + +import ( + "strings" + "testing" + + "bridgerton.audius.co/api/dbv1" + "github.com/stretchr/testify/assert" +) + +func TestGetUser(t *testing.T) { + var userResponse struct { + Data dbv1.FullUser + } + + status, body := testGet(t, "/v1/full/users/7eP5n", &userResponse) + assert.Equal(t, 200, status) + + // body is response json + assert.True(t, strings.Contains(string(body), `"handle":"rayjacobson"`)) + assert.True(t, strings.Contains(string(body), `"user_id":1`)) + assert.True(t, strings.Contains(string(body), `"id":"7eP5n"`)) + + // but we also unmarshaled into userResponse + // for structured testing + assert.Equal(t, userResponse.Data.ID, "7eP5n") +} diff --git a/api/v1_users.go b/api/v1_users.go index de8ca82d..2cb595a9 100644 --- a/api/v1_users.go +++ b/api/v1_users.go @@ -23,7 +23,7 @@ func (app *ApiServer) v1Users(c *fiber.Ctx) error { return err } - return v1UserResponse(c, users) + return v1UsersResponse(c, users) } // a generic responder for all the simple user lists: @@ -61,5 +61,5 @@ func (app *ApiServer) queryFullUsers(c *fiber.Ctx, sql string, args pgx.NamedArg users[idx] = userMap[id] } - return v1UserResponse(c, users) + return v1UsersResponse(c, users) } diff --git a/api/v1_users_followers.go b/api/v1_users_followers.go index b63739e6..3aa5aa7d 100644 --- a/api/v1_users_followers.go +++ b/api/v1_users_followers.go @@ -1,6 +1,8 @@ package api import ( + "fmt" + "github.com/gofiber/fiber/v2" "github.com/jackc/pgx/v5" ) @@ -21,7 +23,9 @@ func (app *ApiServer) v1UsersFollowers(c *fiber.Ctx) error { ` userId := c.Locals("userId").(int) - return app.queryFullUsers(c, sql, pgx.NamedArgs{ + res := app.queryFullUsers(c, sql, pgx.NamedArgs{ "userId": userId, }) + fmt.Println(res) + return res } diff --git a/api/v1_users_test.go b/api/v1_users_test.go index 51880d71..252871ea 100644 --- a/api/v1_users_test.go +++ b/api/v1_users_test.go @@ -64,7 +64,7 @@ func TestUserQuery(t *testing.T) { } } -func TestGetUser(t *testing.T) { +func TestGetUsers(t *testing.T) { var userResponse struct { Data []dbv1.FullUser } diff --git a/apidiff2.ts b/apidiff.ts similarity index 99% rename from apidiff2.ts rename to apidiff.ts index d28c181d..ddab10be 100644 --- a/apidiff2.ts +++ b/apidiff.ts @@ -7,6 +7,7 @@ const testPaths = [ "/v1/full/users?id=0EoAm&user_id=aNzoj", "/v1/full/users?id=0EoAm&id=7eP5n&id=aWvp71&id=Wem1e&user_id=aNzoj", + "/v1/users/0EoAm", "/v1/full/users?id=invalid_id1&id=aNzoj", "/v1/full/tracks?id=ZaXp01y&user_id=aNzoj", diff --git a/go.mod b/go.mod index 0250cafb..53a7caf8 100644 --- a/go.mod +++ b/go.mod @@ -49,6 +49,8 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/sasha-s/go-deadlock v0.3.5 // indirect + github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/encoding v0.4.1 // indirect github.com/supranational/blst v0.3.14 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect diff --git a/go.sum b/go.sum index 70a97f0d..083cd2c3 100644 --- a/go.sum +++ b/go.sum @@ -86,6 +86,10 @@ github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0t github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.4.1 h1:KLGaLSW0jrmhB58Nn4+98spfvPvmo4Ci1P/WIQ9wn7w= +github.com/segmentio/encoding v0.4.1/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI= github.com/speps/go-hashids/v2 v2.0.1 h1:ViWOEqWES/pdOSq+C1SLVa8/Tnsd52XC34RY7lt7m4g= github.com/speps/go-hashids/v2 v2.0.1/go.mod h1:47LKunwvDZki/uRVD6NImtyk712yFzIs3UF3KlHohGw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/sqlc.yaml b/sqlc.yaml index be4e7c70..5eac3ce2 100644 --- a/sqlc.yaml +++ b/sqlc.yaml @@ -11,13 +11,28 @@ sql: package: "dbv1" out: "api/dbv1" sql_package: "pgx/v5" - "overrides": - - column: "users.playlist_library" + overrides: + - db_type: "pg_catalog.timestamp" + engine: "postgresql" + nullable: true + go_type: + import: "time" + type: "Time" + + - db_type: "pg_catalog.timestamp" + engine: "postgresql" + nullable: false + go_type: + import: "time" + type: "Time" + + + - db_type: "jsonb" go_type: import: "encoding/json" type: "RawMessage" - - db_type: "jsonb" + - column: "users.playlist_library" go_type: import: "encoding/json" type: "RawMessage"