#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.Common; using Lumina.Domain.SharedKernel.Common.Enums.BookLibrary; using Lumina.Domain.SharedKernel.Common.Enums.Common; using Lumina.Domain.SharedKernel.Common.Enums.MediaLibrary; using System; using System.Collections.Generic; using System.Diagnostics; #endregion namespace Lumina.Application.Common.DataAccess.Entities.MediaLibrary.WrittenContentLibrary.BookLibrary; /// /// Repository entity for a book. /// [DebuggerDisplay("Title: {Title}")] public class BookEntity : IStorageEntity, IAuditableEntity { /// /// Gets the Id of the media item. /// public required Guid Id { get; init; } /// /// Gets or sets the Id of the media library this book belongs to. /// public required Guid LibraryId { get; set; } /// /// Gets or sets the file system path of the book. /// public required string Path { get; set; } /// /// Gets or sets the title of the media item. /// public required string Title { get; set; } /// /// Gets or sets the original title of the media item. /// public string? OriginalTitle { get; set; } /// /// Gets or sets the optional description of the media item. /// public string? Description { get; set; } /// /// Gets or sets the optional original release date of the media item. /// public DateOnly? OriginalReleaseDate { get; set; } /// /// Gets or sets the optional original release year of the media item. /// This is useful when only the year of original release is known. /// public int? OriginalReleaseYear { get; set; } /// /// Gets or sets the optional re-release or reissue date of the media item. /// public DateOnly? ReReleaseDate { get; set; } /// /// Gets or sets the optional re-release or reissue year of the media item. /// public int? ReReleaseYear { get; set; } /// /// Gets or sets the optional country or region of release. /// public ReleaseCountry? ReleaseCountry { get; set; } /// /// Gets or sets the optional release version or edition. (e.g. "Original", "Director's Cut", "2.0"). /// public string? ReleaseVersion { get; set; } /// /// Gets or sets the ISO 639-1 two-letter language code. /// public string? LanguageCode { get; set; } /// /// Gets or sets the full name of the language in English. /// public string? LanguageName { get; set; } /// /// Gets or sets an optional native name of the language. /// public string? LanguageNativeName { get; set; } /// /// Gets or sets the optional ISO 639-1 two-letter original language code. /// public string? OriginalLanguageCode { get; set; } /// /// Gets or sets the optional full name of the original language in English. /// public string? OriginalLanguageName { get; set; } /// /// Gets or sets an optional native name of the original language. /// public string? OriginalLanguageNativeName { get; set; } /// /// Gets or sets the list of tags associated with the media item. /// public HashSet Tags { get; set; } = []; /// /// Gets or sets the list of genres associated with the media item. /// public HashSet Genres { get; set; } = []; /// /// Gets or sets the publisher of the written content. /// public string? Publisher { get; set; } /// /// Gets or sets the number of pages in the written content. /// public int? PageCount { get; set; } /// /// Gets or sets the format of the book (e.g., Hardcover, Paperback), if applicable. /// public BookFormat? Format { get; set; } /// /// Gets or sets the edition of the book, if applicable. /// public string? Edition { get; set; } /// /// Gets or sets the volume or book number in the series, if applicable. /// public float? VolumeNumber { get; set; } // TODO: uncomment when series is implemented. ///// ///// Gets or sets the series id, if the book is part of a series. ///// //public Guid? BookSeriesId { get; set; } /// /// Gets or sets the ASIN (Amazon Standard Identification Number) of the book. /// public string? ASIN { get; set; } /// /// Gets or sets the Goodreads ID of the book. /// public string? GoodreadsId { get; set; } /// /// Gets or sets the Library of Congress Control Number (LCCN) of the book. /// public string? LCCN { get; set; } /// /// Gets or sets the OCLC Number (WorldCat identifier) of the book. /// public string? OCLCNumber { get; set; } /// /// Gets or sets the Open Library ID of the book. /// public string? OpenLibraryId { get; set; } /// /// Gets or sets the LibraryThing ID of the book. /// public string? LibraryThingId { get; set; } /// /// Gets or sets the Google Books ID of the book. /// public string? GoogleBooksId { get; set; } /// /// Gets or sets the Barnes & Noble ID of the book. /// public string? BarnesAndNobleId { get; set; } /// /// Gets or sets the Apple Books ID of the book. /// public string? AppleBooksId { get; set; } /// /// Gets or sets the list of ISBN (International Standard Book Number) of the book. /// public List ISBNs { get; set; } = []; /// /// Gets or sets the participations of the media contributors in the book, each carrying the role the contributor played. /// public List Contributors { get; set; } = []; /// /// Gets or sets the pieces of artwork of the book, each tracked independently with its own enrichment state. /// public List Artwork { get; set; } = []; /// /// Gets or sets the list of ratings for this book. /// public List Ratings { get; set; } = []; /// /// Gets or sets a value indicating whether the book was deleted by the user and is waiting to be restored or permanently removed. /// A deleted book is kept out of every catalogue read and is not materialized again by scans, so that an automatic scan never undoes the deletion. /// public bool IsDeleted { get; set; } /// /// Gets or sets the date and time when the book was deleted, or when the book is not deleted. /// public DateTime? DeletedOnUtc { get; set; } /// /// Gets or sets the status of the metadata enrichment of the book. /// public MetadataStatus MetadataStatus { get; set; } /// /// Gets or sets the date and time when the metadata of the book was last enriched. /// public DateTime? LastMetadataUpdateUtc { get; set; } /// /// Gets or sets the name of the plugin that enriched the metadata of the book. /// public string? MetadataProvider { get; set; } /// /// Gets or sets the time and date when the entity was added. /// public required DateTime CreatedOnUtc { get; set; } /// /// Gets or sets the Id of the user that created the entity. /// public required Guid CreatedBy { get; set; } /// /// Gets or sets the optional time and date when the entity was updated. /// public DateTime? UpdatedOnUtc { get; set; } /// /// Gets or sets the optional Id of the user that updated the entity. /// public required Guid? UpdatedBy { get; set; } }