Files
PageManager/PageManager.Api/PageManager.Api/Data/Models/Book.cs
T
2026-03-28 17:36:25 +02:00

34 lines
1.4 KiB
C#

namespace PageManager.Api.Data.Models;
public class Book
{
public int Id { get; set; }
public string Title { get; set; } = string.Empty;
public int? Year { get; set; }
public string? Publisher { get; set; }
public int? Pages { get; set; }
public string? Description { get; set; }
/// <summary>Hex color used as cover placeholder when CoverUrl is absent.</summary>
public string Color { get; set; } = "#6366f1";
public string? CoverUrl { get; set; }
/// <summary>ISBN-13 sourced from Hardcover.</summary>
public string? Isbn { get; set; }
/// <summary>Hardcover book ID — used to re-fetch metadata without a search round-trip.</summary>
public int? HardcoverId { get; set; }
/// <summary>File formats present in the library (e.g. epub, mobi, pdf). Stored as text[].</summary>
public string[] Formats { get; set; } = [];
/// <summary>Genre tags sourced from Hardcover cached_tags. Stored as text[].</summary>
public string[] Genres { get; set; } = [];
public ICollection<BookAuthor> BookAuthors { get; set; } = [];
public ICollection<SeriesEntry> SeriesEntries { get; set; } = [];
public ICollection<Edition> Editions { get; set; } = [];
public ICollection<BookFile> BookFiles { get; set; } = [];
public ICollection<WantedBook> WantedBooks { get; set; } = [];
}