db: regenerate sqlc models with comic metadata fields
Auto-generated by sqlc from updated schema.sql - MediaItems struct now includes all 14 new comic metadata fields - CreateMediaItemParams struct updated with new parameters - All SELECT queries now include new columns in RETURNING clauses - Properly typed with pgtype.Text, pgtype.Int4, pgtype.Bool, pgtype.Numeric, []byte New Fields in MediaItems: - MangaType pgtype.Text - ReadingDirection pgtype.Text - SeriesCount pgtype.Int4 - Volume pgtype.Int4 - Imprint pgtype.Text - AgeRating pgtype.Text - WebUrl pgtype.Text - StoryArc pgtype.Text - IsBlackAndWhite pgtype.Bool - MetadataNotes pgtype.Text - CommunityRating pgtype.Numeric - AlternateInfo []byte (JSONB) - ScanInformation pgtype.Text - Summary pgtype.Text Part of Phase 1: Database Schema Changes Implementation: IMPLEMENTATION_PLAN_MERGE_METADATA_READING_DIRECTION.md
This commit is contained in:
+48
-20
@@ -212,26 +212,54 @@ type MediaItems struct {
|
||||
// Open Library identifier for integration
|
||||
OpenlibraryID pgtype.Text `db:"openlibrary_id" json:"openlibrary_id"`
|
||||
// Google Books identifier for integration
|
||||
GoogleBooksID pgtype.Text `db:"google_books_id" json:"google_books_id"`
|
||||
AddedByAdminID pgtype.UUID `db:"added_by_admin_id" json:"added_by_admin_id"`
|
||||
CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
|
||||
FormatGroup string `db:"format_group" json:"format_group"`
|
||||
FormatMimetype pgtype.Text `db:"format_mimetype" json:"format_mimetype"`
|
||||
IsReflowable pgtype.Bool `db:"is_reflowable" json:"is_reflowable"`
|
||||
HasFixedLayout pgtype.Bool `db:"has_fixed_layout" json:"has_fixed_layout"`
|
||||
TotalCharacters pgtype.Int8 `db:"total_characters" json:"total_characters"`
|
||||
ChapterCount pgtype.Int4 `db:"chapter_count" json:"chapter_count"`
|
||||
EntitlementID pgtype.Text `db:"entitlement_id" json:"entitlement_id"`
|
||||
RevisionNumber pgtype.Int4 `db:"revision_number" json:"revision_number"`
|
||||
KoboContentID pgtype.Text `db:"kobo_content_id" json:"kobo_content_id"`
|
||||
KoboMetadata []byte `db:"kobo_metadata" json:"kobo_metadata"`
|
||||
TagsSearch []string `db:"tags_search" json:"tags_search"`
|
||||
ContributorsSearch []string `db:"contributors_search" json:"contributors_search"`
|
||||
FileSha256 pgtype.Text `db:"file_sha256" json:"file_sha256"`
|
||||
OpfIdentifier pgtype.Text `db:"opf_identifier" json:"opf_identifier"`
|
||||
OpfUuid pgtype.Text `db:"opf_uuid" json:"opf_uuid"`
|
||||
HashConfidence pgtype.Text `db:"hash_confidence" json:"hash_confidence"`
|
||||
GoogleBooksID pgtype.Text `db:"google_books_id" json:"google_books_id"`
|
||||
AddedByAdminID pgtype.UUID `db:"added_by_admin_id" json:"added_by_admin_id"`
|
||||
CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
|
||||
FormatGroup string `db:"format_group" json:"format_group"`
|
||||
FormatMimetype pgtype.Text `db:"format_mimetype" json:"format_mimetype"`
|
||||
IsReflowable pgtype.Bool `db:"is_reflowable" json:"is_reflowable"`
|
||||
HasFixedLayout pgtype.Bool `db:"has_fixed_layout" json:"has_fixed_layout"`
|
||||
TotalCharacters pgtype.Int8 `db:"total_characters" json:"total_characters"`
|
||||
ChapterCount pgtype.Int4 `db:"chapter_count" json:"chapter_count"`
|
||||
EntitlementID pgtype.Text `db:"entitlement_id" json:"entitlement_id"`
|
||||
RevisionNumber pgtype.Int4 `db:"revision_number" json:"revision_number"`
|
||||
KoboContentID pgtype.Text `db:"kobo_content_id" json:"kobo_content_id"`
|
||||
KoboMetadata []byte `db:"kobo_metadata" json:"kobo_metadata"`
|
||||
// Raw Manga field from ComicInfo.xml: unknown, no, yes, yes_and_right_to_left
|
||||
MangaType pgtype.Text `db:"manga_type" json:"manga_type"`
|
||||
// Computed reading direction: auto, ltr (left-to-right), rtl (right-to-left), vertical (webtoons/manhwa)
|
||||
ReadingDirection pgtype.Text `db:"reading_direction" json:"reading_direction"`
|
||||
// Total items in series (from ComicInfo.xml Count field, or book series count)
|
||||
SeriesCount pgtype.Int4 `db:"series_count" json:"series_count"`
|
||||
// Volume/omnibus number for collected editions
|
||||
Volume pgtype.Int4 `db:"volume" json:"volume"`
|
||||
// Publisher imprint/subdivision (e.g., Vertigo, HarperCollinsEpic, DC Black Label)
|
||||
Imprint pgtype.Text `db:"imprint" json:"imprint"`
|
||||
// Age rating from metadata: Everyone, Teen, Mature, Adult (applies to all formats)
|
||||
AgeRating pgtype.Text `db:"age_rating" json:"age_rating"`
|
||||
// URL to info page (Goodreads, ComicVine, MangaUpdates, Audible, etc.)
|
||||
WebUrl pgtype.Text `db:"web_url" json:"web_url"`
|
||||
// Story arc name for grouping related issues (e.g., "The Dark Phoenix Saga", "Civil War")
|
||||
StoryArc pgtype.Text `db:"story_arc" json:"story_arc"`
|
||||
// Black and white comic flag from ComicInfo.xml
|
||||
IsBlackAndWhite pgtype.Bool `db:"is_black_and_white" json:"is_black_and_white"`
|
||||
// Notes from metadata files (ComicInfo.xml, EPUB, PDF) - distinct from user notes in media_notes table
|
||||
MetadataNotes pgtype.Text `db:"metadata_notes" json:"metadata_notes"`
|
||||
// Pre-existing community rating from metadata files (scale 0.0-10.0) - distinct from user ratings in media_ratings table
|
||||
CommunityRating pgtype.Numeric `db:"community_rating" json:"community_rating"`
|
||||
// Alternate series information as JSONB: {alternate_series, alternate_number, alternate_count}
|
||||
AlternateInfo []byte `db:"alternate_info" json:"alternate_info"`
|
||||
// Scan information from ComicInfo.xml (scanner group, resolution, etc.)
|
||||
ScanInformation pgtype.Text `db:"scan_information" json:"scan_information"`
|
||||
// Summary from ComicInfo.xml (may be merged with description from Calibre)
|
||||
Summary pgtype.Text `db:"summary" json:"summary"`
|
||||
TagsSearch []string `db:"tags_search" json:"tags_search"`
|
||||
ContributorsSearch []string `db:"contributors_search" json:"contributors_search"`
|
||||
FileSha256 pgtype.Text `db:"file_sha256" json:"file_sha256"`
|
||||
OpfIdentifier pgtype.Text `db:"opf_identifier" json:"opf_identifier"`
|
||||
OpfUuid pgtype.Text `db:"opf_uuid" json:"opf_uuid"`
|
||||
HashConfidence pgtype.Text `db:"hash_confidence" json:"hash_confidence"`
|
||||
}
|
||||
|
||||
type MediaNotes struct {
|
||||
|
||||
Reference in New Issue
Block a user