mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 13:11:10 +00:00
feat: adds FastEndpoints core infrastructure and contracts to the web project
This commit is contained in:
1 parent
394b33efd2
commit
733e174cac
137 files changed
+3139
-158
No files matched your search
@@ -0,0 +1,216 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.DTO.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.DTO.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for a book.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public class BookDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media item.
|
||||
/// </summary>
|
||||
public Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Id of the media library this book belongs to.
|
||||
/// </summary>
|
||||
public Guid LibraryId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the file system path of the book.
|
||||
/// </summary>
|
||||
public string Path { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the title of the media item.
|
||||
/// </summary>
|
||||
public string Title { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the original title of the media item.
|
||||
/// </summary>
|
||||
public string? OriginalTitle { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional description of the media item.
|
||||
/// </summary>
|
||||
public string? Description { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional original release date of the media item.
|
||||
/// </summary>
|
||||
public DateOnly? OriginalReleaseDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional original release year of the media item.
|
||||
/// This is useful when only the year of original release is known.
|
||||
/// </summary>
|
||||
public int? OriginalReleaseYear { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional re-release or reissue date of the media item.
|
||||
/// </summary>
|
||||
public DateOnly? ReReleaseDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional re-release or reissue year of the media item.
|
||||
/// </summary>
|
||||
public int? ReReleaseYear { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional country or region of release.
|
||||
/// </summary>
|
||||
public string? ReleaseCountry { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional release version or edition. (e.g. "Original", "Director's Cut", "2.0")
|
||||
/// </summary>
|
||||
public string? ReleaseVersion { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ISO 639-1 two-letter language code.
|
||||
/// </summary>
|
||||
public string? LanguageCode { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the full name of the language in English.
|
||||
/// </summary>
|
||||
public string? LanguageName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an optional native name of the language.
|
||||
/// </summary>
|
||||
public string? LanguageNativeName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional ISO 639-1 two-letter original language code.
|
||||
/// </summary>
|
||||
public string? OriginalLanguageCode { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional full name of the original language in English.
|
||||
/// </summary>
|
||||
public string? OriginalLanguageName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an optional native name of the original language.
|
||||
/// </summary>
|
||||
public string? OriginalLanguageNativeName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of tags associated with the media item.
|
||||
/// </summary>
|
||||
public HashSet<TagDto> Tags { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of genres associated with the media item.
|
||||
/// </summary>
|
||||
public HashSet<GenreDto> Genres { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the publisher of the written content.
|
||||
/// </summary>
|
||||
public string? Publisher { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the number of pages in the written content.
|
||||
/// </summary>
|
||||
public int? PageCount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the format of the book (e.g., Hardcover, Paperback), if applicable.
|
||||
/// </summary>
|
||||
public string Format { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the edition of the book, if applicable.
|
||||
/// </summary>
|
||||
public string? Edition { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the volume or book number in the series, if applicable.
|
||||
/// </summary>
|
||||
public int? VolumeNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the series id, if the book is part of a series.
|
||||
/// </summary>
|
||||
//public Guid? BookSeriesId { get; init; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ASIN (Amazon Standard Identification Number) of the book.
|
||||
/// </summary>
|
||||
public string? ASIN { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Goodreads ID of the book.
|
||||
/// </summary>
|
||||
public string? GoodreadsId { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Library of Congress Control Number (LCCN) of the book.
|
||||
/// </summary>
|
||||
public string? LCCN { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the OCLC Number (WorldCat identifier) of the book.
|
||||
/// </summary>
|
||||
public string? OCLCNumber { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Open Library ID of the book.
|
||||
/// </summary>
|
||||
public string? OpenLibraryId { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the LibraryThing ID of the book.
|
||||
/// </summary>
|
||||
public string? LibraryThingId { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Google Books ID of the book.
|
||||
/// </summary>
|
||||
public string? GoogleBooksId { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Barnes & Noble ID of the book.
|
||||
/// </summary>
|
||||
public string? BarnesAndNobleId { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Apple Books ID of the book.
|
||||
/// </summary>
|
||||
public string? AppleBooksId { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of ISBN (International Standard Book Number) of the book.
|
||||
/// </summary>
|
||||
public List<IsbnDto> ISBNs { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of media contributors (actors, directors, etc) starring in this book.
|
||||
/// </summary>
|
||||
//public List<ContributorIdModel> ContributorIds { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of ratings for this book.
|
||||
/// </summary>
|
||||
public List<BookRatingDto> Ratings { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the time and date when the entity was added.
|
||||
/// </summary>
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional time and date when the entity was updated.
|
||||
/// </summary>
|
||||
public DateTime? Updated { get; set; }
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.BookLibrary;
|
||||
using System.Diagnostics;
|
||||
using Lumina.Presentation.Web.Common.DTO.Common;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.DTO.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for a book rating.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Value: {Value}, MaxValue: {MaxValue}")]
|
||||
public class BookRatingDto : RatingDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the source of the book rating (e.g., a specific website or platform).
|
||||
/// </summary>
|
||||
public BookRatingSource? Source { get; set; }
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.DTO.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for a request to get book series information.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public class BookSeriesDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the book series.
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.Enums.BookLibrary;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.DTO.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for a request to get ISBN information.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Value: {Value} ({Format})")]
|
||||
public class IsbnDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ISBN value.
|
||||
/// </summary>
|
||||
public string? Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the format of the ISBN (e.g., ISBN-10 or ISBN-13).
|
||||
/// </summary>
|
||||
public IsbnFormat? Format { get; set; }
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.DTO.WrittenContentLibrary.BookLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for a preview of important properties of a book.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public class LightBookDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Id of the media item.
|
||||
/// </summary>
|
||||
public required Guid Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the title of the media item.
|
||||
/// </summary>
|
||||
public required string Title { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional release year (either re-release year, if available, or original release year, if known) of the media item.
|
||||
/// </summary>
|
||||
public int? ReleaseYear { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the optional path of the image representing the cover of this book.
|
||||
/// </summary>
|
||||
public string? CoverPath { get; init; }
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Presentation.Web.Common.DTO.Common;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Presentation.Web.Common.DTO.WrittenContentLibrary;
|
||||
|
||||
/// <summary>
|
||||
/// Data transfer object for written content metadata.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("Title: {Title}")]
|
||||
public class WrittenContentMetadataDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the written content.
|
||||
/// </summary>
|
||||
public string? Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the original title of the written content, if different from the current title.
|
||||
/// </summary>
|
||||
public string? OriginalTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a brief description or summary of the written content.
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the release information, including release date and other relevant details.
|
||||
/// </summary>
|
||||
public ReleaseInfoDto? ReleaseInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of genres associated with the written content.
|
||||
/// </summary>
|
||||
public List<GenreDto>? Genres { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of tags that further describe or categorize the written content.
|
||||
/// </summary>
|
||||
public List<TagDto>? Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the language in which the written content is written.
|
||||
/// </summary>
|
||||
public LanguageInfoDto? Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the original language of the written content, if it has been translated.
|
||||
/// </summary>
|
||||
public LanguageInfoDto? OriginalLanguage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the publisher of the written content.
|
||||
/// </summary>
|
||||
public string? Publisher { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of pages in the written content.
|
||||
/// </summary>
|
||||
public int? PageCount { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user