Added some inheritdocs to some DTOs to make it more clear how they function.

This commit is contained in:
Joseph Milazzo 2025-05-04 09:04:07 -05:00
parent ae57267e5b
commit 2a528fdb45
7 changed files with 132 additions and 223 deletions

View file

@ -6,10 +6,14 @@ namespace API.DTOs.Account;
public sealed record UpdateUserDto
{
/// <inheritdoc cref="API.Entities.AppUser.Id"/>
public int UserId { get; set; }
/// <inheritdoc cref="API.Entities.AppUser.UserName"/>
public string Username { get; set; } = default!;
/// <summary>
/// List of Roles to assign to user. If admin not present, Pleb will be applied.
/// If admin present, all libraries will be granted access and will ignore those from DTO.
/// </summary>
public IList<string> Roles { get; init; } = default!;
/// <summary>
/// A list of libraries to grant access to
@ -19,8 +23,6 @@ public sealed record UpdateUserDto
/// An Age Rating which will limit the account to seeing everything equal to or below said rating.
/// </summary>
public AgeRestrictionDto AgeRestriction { get; init; } = default!;
/// <summary>
/// Email of the user
/// </summary>
/// <inheritdoc cref="API.Entities.AppUser.Email"/>
public string? Email { get; set; } = default!;
}

View file

@ -13,37 +13,24 @@ namespace API.DTOs;
/// </summary>
public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
{
/// <inheritdoc cref="API.Entities.Chapter.Id"/>
public int Id { get; init; }
/// <summary>
/// Range of chapters. Chapter 2-4 -> "2-4". Chapter 2 -> "2". If special, will be special name.
/// </summary>
/// <remarks>This can be something like 19.HU or Alpha as some comics are like this</remarks>
/// <inheritdoc cref="API.Entities.Chapter.Range"/>
public string Range { get; init; } = default!;
/// <summary>
/// Smallest number of the Range.
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.Number"/>
[Obsolete("Use MinNumber and MaxNumber instead")]
public string Number { get; init; } = default!;
/// <summary>
/// This may be 0 under the circumstance that the Issue is "Alpha" or other non-standard numbers.
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.MinNumber"/>
public float MinNumber { get; init; }
/// <inheritdoc cref="API.Entities.Chapter.MaxNumber"/>
public float MaxNumber { get; init; }
/// <summary>
/// The sorting order of the Chapter. Inherits from MinNumber, but can be overridden.
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.SortOrder"/>
public float SortOrder { get; set; }
/// <summary>
/// Total number of pages in all MangaFiles
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.Pages"/>
public int Pages { get; init; }
/// <summary>
/// If this Chapter contains files that could only be identified as Series or has Special Identifier from filename
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.IsSpecial"/>
public bool IsSpecial { get; init; }
/// <summary>
/// Used for books/specials to display custom title. For non-specials/books, will be set to <see cref="Range"/>
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.Title"/>
public string Title { get; set; } = default!;
/// <summary>
/// The files that represent this Chapter
@ -61,46 +48,25 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
/// The last time a chapter was read by current authenticated user
/// </summary>
public DateTime LastReadingProgress { get; set; }
/// <summary>
/// If the Cover Image is locked for this entity
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.CoverImageLocked"/>
public bool CoverImageLocked { get; set; }
/// <summary>
/// Volume Id this Chapter belongs to
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.VolumeId"/>
public int VolumeId { get; init; }
/// <summary>
/// When chapter was created
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.CreatedUtc"/>
public DateTime CreatedUtc { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LastModifiedUtc"/>
public DateTime LastModifiedUtc { get; set; }
/// <summary>
/// When chapter was created in local server time
/// </summary>
/// <remarks>This is required for Tachiyomi Extension</remarks>
/// <inheritdoc cref="API.Entities.Chapter.Created"/>
public DateTime Created { get; set; }
/// <summary>
/// When the chapter was released.
/// </summary>
/// <remarks>Metadata field</remarks>
/// <inheritdoc cref="API.Entities.Chapter.ReleaseDate"/>
public DateTime ReleaseDate { get; init; }
/// <summary>
/// Title of the Chapter/Issue
/// </summary>
/// <remarks>Metadata field</remarks>
/// <inheritdoc cref="API.Entities.Chapter.TitleName"/>
public string TitleName { get; set; } = default!;
/// <summary>
/// Summary of the Chapter
/// </summary>
/// <remarks>This is not set normally, only for Series Detail</remarks>
/// <inheritdoc cref="API.Entities.Chapter.Summary"/>
public string Summary { get; init; } = default!;
/// <summary>
/// Age Rating for the issue/chapter
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.AgeRating"/>
public AgeRating AgeRating { get; init; }
/// <summary>
/// Total words in a Chapter (books only)
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.WordCount"/>
public long WordCount { get; set; } = 0L;
/// <summary>
/// Formatted Volume title ie) Volume 2.
@ -113,14 +79,9 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
public int MaxHoursToRead { get; set; }
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
public float AvgHoursToRead { get; set; }
/// <summary>
/// Comma-separated link of urls to external services that have some relation to the Chapter
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.WebLinks"/>
public string WebLinks { get; set; }
/// <summary>
/// ISBN-13 (usually) of the Chapter
/// </summary>
/// <remarks>This is guaranteed to be Valid</remarks>
/// <inheritdoc cref="API.Entities.Chapter.ISBN"/>
public string ISBN { get; set; }
#region Metadata
@ -146,51 +107,60 @@ public class ChapterDto : IHasReadTimeEstimate, IHasCoverImage
/// </summary>
public ICollection<TagDto> Tags { get; set; } = new List<TagDto>();
public PublicationStatus PublicationStatus { get; set; }
/// <summary>
/// Language for the Chapter/Issue
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.Language"/>
public string? Language { get; set; }
/// <summary>
/// Number in the TotalCount of issues
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.Count"/>
public int Count { get; set; }
/// <summary>
/// Total number of issues for the series
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.TotalCount"/>
public int TotalCount { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LanguageLocked"/>
public bool LanguageLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.SummaryLocked"/>
public bool SummaryLocked { get; set; }
/// <summary>
/// Locked by user so metadata updates from scan loop will not override AgeRating
/// </summary>
/// <inheritdoc cref="API.Entities.Chapter.AgeRatingLocked"/>
public bool AgeRatingLocked { get; set; }
/// <summary>
/// Locked by user so metadata updates from scan loop will not override PublicationStatus
/// </summary>
public bool PublicationStatusLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.GenresLocked"/>
public bool GenresLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.TagsLocked"/>
public bool TagsLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.WriterLocked"/>
public bool WriterLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.CharacterLocked"/>
public bool CharacterLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.ColoristLocked"/>
public bool ColoristLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.EditorLocked"/>
public bool EditorLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.InkerLocked"/>
public bool InkerLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.ImprintLocked"/>
public bool ImprintLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LettererLocked"/>
public bool LettererLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.PencillerLocked"/>
public bool PencillerLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.PublisherLocked"/>
public bool PublisherLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.TranslatorLocked"/>
public bool TranslatorLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.TeamLocked"/>
public bool TeamLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.LocationLocked"/>
public bool LocationLocked { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.CoverArtistLocked"/>
public bool CoverArtistLocked { get; set; }
public bool ReleaseYearLocked { get; set; }
#endregion
public string CoverImage { get; set; }
public string PrimaryColor { get; set; } = string.Empty;
public string SecondaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Chapter.CoverImage"/>
public string? CoverImage { get; set; }
/// <inheritdoc cref="API.Entities.Chapter.PrimaryColor"/>
public string? PrimaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Chapter.SecondaryColor"/>
public string? SecondaryColor { get; set; } = string.Empty;
public void ResetColorScape()
{

View file

@ -5,13 +5,19 @@ namespace API.DTOs.CollectionTags;
[Obsolete("Use AppUserCollectionDto")]
public sealed record CollectionTagDto
{
/// <inheritdoc cref="API.Entities.CollectionTag.Id"/>
public int Id { get; set; }
/// <inheritdoc cref="API.Entities.CollectionTag.Title"/>
public string Title { get; set; } = default!;
/// <inheritdoc cref="API.Entities.CollectionTag.Summary"/>
public string Summary { get; set; } = default!;
/// <inheritdoc cref="API.Entities.CollectionTag.Promoted"/>
public bool Promoted { get; set; }
/// <summary>
/// The cover image string. This is used on Frontend to show or hide the Cover Image
/// </summary>
/// <inheritdoc cref="API.Entities.CollectionTag.CoverImage"/>
public string CoverImage { get; set; } = default!;
/// <inheritdoc cref="API.Entities.CollectionTag.CoverImageLocked"/>
public bool CoverImageLocked { get; set; }
}

View file

@ -20,8 +20,8 @@ public sealed record ReadingListDto : IHasCoverImage
/// </summary>
public string? CoverImage { get; set; } = string.Empty;
public string PrimaryColor { get; set; } = string.Empty;
public string SecondaryColor { get; set; } = string.Empty;
public string? PrimaryColor { get; set; } = string.Empty;
public string? SecondaryColor { get; set; } = string.Empty;
/// <summary>
/// Number of Items in the Reading List

View file

@ -7,12 +7,19 @@ namespace API.DTOs;
public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
{
/// <inheritdoc cref="API.Entities.Series.Id"/>
public int Id { get; init; }
/// <inheritdoc cref="API.Entities.Series.Name"/>
public string? Name { get; init; }
/// <inheritdoc cref="API.Entities.Series.OriginalName"/>
public string? OriginalName { get; init; }
/// <inheritdoc cref="API.Entities.Series.LocalizedName"/>
public string? LocalizedName { get; init; }
/// <inheritdoc cref="API.Entities.Series.SortName"/>
public string? SortName { get; init; }
/// <inheritdoc cref="API.Entities.Series.Pages"/>
public int Pages { get; init; }
/// <inheritdoc cref="API.Entities.Series.CoverImageLocked"/>
public bool CoverImageLocked { get; set; }
/// <summary>
/// Sum of pages read from linked Volumes. Calculated at API-time.
@ -22,9 +29,7 @@ public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
/// DateTime representing last time the series was Read. Calculated at API-time.
/// </summary>
public DateTime LatestReadDate { get; set; }
/// <summary>
/// DateTime representing last time a chapter was added to the Series
/// </summary>
/// <inheritdoc cref="API.Entities.Series.LastChapterAdded"/>
public DateTime LastChapterAdded { get; set; }
/// <summary>
/// Rating from logged in user. Calculated at API-time.
@ -35,17 +40,19 @@ public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
/// </summary>
public bool HasUserRated { get; set; }
/// <inheritdoc cref="API.Entities.Series.Format"/>
public MangaFormat Format { get; set; }
/// <inheritdoc cref="API.Entities.Series.Created"/>
public DateTime Created { get; set; }
public bool NameLocked { get; set; }
/// <inheritdoc cref="API.Entities.Series.SortNameLocked"/>
public bool SortNameLocked { get; set; }
/// <inheritdoc cref="API.Entities.Series.LocalizedNameLocked"/>
public bool LocalizedNameLocked { get; set; }
/// <summary>
/// Total number of words for the series. Only applies to epubs.
/// </summary>
/// <inheritdoc cref="API.Entities.Series.WordCount"/>
public long WordCount { get; set; }
/// <inheritdoc cref="API.Entities.Series.LibraryId"/>
public int LibraryId { get; set; }
public string LibraryName { get; set; } = default!;
/// <inheritdoc cref="IHasReadTimeEstimate.MinHoursToRead"/>
@ -54,33 +61,25 @@ public sealed record SeriesDto : IHasReadTimeEstimate, IHasCoverImage
public int MaxHoursToRead { get; set; }
/// <inheritdoc cref="IHasReadTimeEstimate.AvgHoursToRead"/>
public float AvgHoursToRead { get; set; }
/// <summary>
/// The highest level folder for this Series
/// </summary>
/// <inheritdoc cref="API.Entities.Series.FolderPath"/>
public string FolderPath { get; set; } = default!;
/// <summary>
/// Lowest path (that is under library root) that contains all files for the series.
/// </summary>
/// <remarks><see cref="Services.Tasks.Scanner.Parser.Parser.NormalizePath"/> must be used before setting</remarks>
/// <inheritdoc cref="API.Entities.Series.LowestFolderPath"/>
public string? LowestFolderPath { get; set; }
/// <summary>
/// The last time the folder for this series was scanned
/// </summary>
/// <inheritdoc cref="API.Entities.Series.LastFolderScanned"/>
public DateTime LastFolderScanned { get; set; }
#region KavitaPlus
/// <summary>
/// Do not match the series with any external Metadata service. This will automatically opt it out of scrobbling.
/// </summary>
/// <inheritdoc cref="API.Entities.Series.DontMatch"/>
public bool DontMatch { get; set; }
/// <summary>
/// If the series was unable to match, it will be blacklisted until a manual metadata match overrides it
/// </summary>
/// <inheritdoc cref="API.Entities.Series.IsBlacklisted"/>
public bool IsBlacklisted { get; set; }
#endregion
/// <inheritdoc cref="API.Entities.Series.CoverImage"/>
public string? CoverImage { get; set; }
public string PrimaryColor { get; set; } = string.Empty;
public string SecondaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Series.PrimaryColor"/>
public string? PrimaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Series.SecondaryColor"/>
public string? SecondaryColor { get; set; } = string.Empty;
public void ResetColorScape()
{

View file

@ -9,102 +9,59 @@ namespace API.DTOs;
public sealed record UserPreferencesDto
{
/// <summary>
/// Manga Reader Option: What direction should the next/prev page buttons go
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.ReadingDirection"/>
[Required]
public ReadingDirection ReadingDirection { get; set; }
/// <summary>
/// Manga Reader Option: How should the image be scaled to screen
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.ScalingOption"/>
[Required]
public ScalingOption ScalingOption { get; set; }
/// <summary>
/// Manga Reader Option: Which side of a split image should we show first
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.PageSplitOption"/>
[Required]
public PageSplitOption PageSplitOption { get; set; }
/// <summary>
/// Manga Reader Option: How the manga reader should perform paging or reading of the file
/// <example>
/// Webtoon uses scrolling to page, LeftRight uses paging by clicking left/right side of reader, UpDown uses paging
/// by clicking top/bottom sides of reader.
/// </example>
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.ReaderMode"/>
[Required]
public ReaderMode ReaderMode { get; set; }
/// <summary>
/// Manga Reader Option: How many pages to display in the reader at once
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.LayoutMode"/>
[Required]
public LayoutMode LayoutMode { get; set; }
/// <summary>
/// Manga Reader Option: Emulate a book by applying a shadow effect on the pages
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.EmulateBook"/>
[Required]
public bool EmulateBook { get; set; }
/// <summary>
/// Manga Reader Option: Background color of the reader
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BackgroundColor"/>
[Required]
public string BackgroundColor { get; set; } = "#000000";
/// <summary>
/// Manga Reader Option: Should swiping trigger pagination
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.SwipeToPaginate"/>
[Required]
public bool SwipeToPaginate { get; set; }
/// <summary>
/// Manga Reader Option: Allow the menu to close after 6 seconds without interaction
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.AutoCloseMenu"/>
[Required]
public bool AutoCloseMenu { get; set; }
/// <summary>
/// Manga Reader Option: Show screen hints to the user on some actions, ie) pagination direction change
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.ShowScreenHints"/>
[Required]
public bool ShowScreenHints { get; set; } = true;
/// <summary>
/// Manga Reader Option: Allow Automatic Webtoon detection
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.AllowAutomaticWebtoonReaderDetection"/>
[Required]
public bool AllowAutomaticWebtoonReaderDetection { get; set; }
/// <summary>
/// Book Reader Option: Override extra Margin
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderMargin"/>
[Required]
public int BookReaderMargin { get; set; }
/// <summary>
/// Book Reader Option: Override line-height
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderLineSpacing"/>
[Required]
public int BookReaderLineSpacing { get; set; }
/// <summary>
/// Book Reader Option: Override font size
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderFontSize"/>
[Required]
public int BookReaderFontSize { get; set; }
/// <summary>
/// Book Reader Option: Maps to the default Kavita font-family (inherit) or an override
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderFontFamily"/>
[Required]
public string BookReaderFontFamily { get; set; } = null!;
/// <summary>
/// Book Reader Option: Allows tapping on side of screens to paginate
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderTapToPaginate"/>
[Required]
public bool BookReaderTapToPaginate { get; set; }
/// <summary>
/// Book Reader Option: What direction should the next/prev page buttons go
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderReadingDirection"/>
[Required]
public ReadingDirection BookReaderReadingDirection { get; set; }
/// <summary>
/// Book Reader Option: What writing style should be used, horizontal or vertical.
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderWritingStyle"/>
[Required]
public WritingStyle BookReaderWritingStyle { get; set; }
@ -116,79 +73,46 @@ public sealed record UserPreferencesDto
public SiteThemeDto? Theme { get; set; }
[Required] public string BookReaderThemeName { get; set; } = null!;
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderLayoutMode"/>
[Required]
public BookPageLayoutMode BookReaderLayoutMode { get; set; }
/// <summary>
/// Book Reader Option: A flag that hides the menu-ing system behind a click on the screen. This should be used with tap to paginate, but the app doesn't enforce this.
/// </summary>
/// <remarks>Defaults to false</remarks>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BookReaderImmersiveMode"/>
[Required]
public bool BookReaderImmersiveMode { get; set; } = false;
/// <summary>
/// Global Site Option: If the UI should layout items as Cards or List items
/// </summary>
/// <remarks>Defaults to Cards</remarks>
/// <inheritdoc cref="API.Entities.AppUserPreferences.GlobalPageLayoutMode"/>
[Required]
public PageLayoutMode GlobalPageLayoutMode { get; set; } = PageLayoutMode.Cards;
/// <summary>
/// UI Site Global Setting: If unread summaries should be blurred until expanded or unless user has read it already
/// </summary>
/// <remarks>Defaults to false</remarks>
/// <inheritdoc cref="API.Entities.AppUserPreferences.BlurUnreadSummaries"/>
[Required]
public bool BlurUnreadSummaries { get; set; } = false;
/// <summary>
/// UI Site Global Setting: Should Kavita prompt user to confirm downloads that are greater than 100 MB.
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.PromptForDownloadSize"/>
[Required]
public bool PromptForDownloadSize { get; set; } = true;
/// <summary>
/// UI Site Global Setting: Should Kavita disable CSS transitions
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.NoTransitions"/>
[Required]
public bool NoTransitions { get; set; } = false;
/// <summary>
/// When showing series, only parent series or series with no relationships will be returned
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.CollapseSeriesRelationships"/>
[Required]
public bool CollapseSeriesRelationships { get; set; } = false;
/// <summary>
/// UI Site Global Setting: Should series reviews be shared with all users in the server
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.ShareReviews"/>
[Required]
public bool ShareReviews { get; set; } = false;
/// <summary>
/// UI Site Global Setting: The language locale that should be used for the user
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.Locale"/>
[Required]
public string Locale { get; set; }
/// <summary>
/// PDF Reader: Theme of the Reader
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.PdfTheme"/>
[Required]
public PdfTheme PdfTheme { get; set; } = PdfTheme.Dark;
/// <summary>
/// PDF Reader: Scroll mode of the reader
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.PdfScrollMode"/>
[Required]
public PdfScrollMode PdfScrollMode { get; set; } = PdfScrollMode.Vertical;
/// <summary>
/// PDF Reader: Layout Mode of the reader
/// </summary>
[Required]
public PdfLayoutMode PdfLayoutMode { get; set; } = PdfLayoutMode.Multiple;
/// <summary>
/// PDF Reader: Spread Mode of the reader
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.PdfSpreadMode"/>
[Required]
public PdfSpreadMode PdfSpreadMode { get; set; } = PdfSpreadMode.None;
/// <summary>
/// Kavita+: Should this account have Scrobbling enabled for AniList
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.AniListScrobblingEnabled"/>
public bool AniListScrobblingEnabled { get; set; }
/// <summary>
/// Kavita+: Should this account have Want to Read Sync enabled
/// </summary>
/// <inheritdoc cref="API.Entities.AppUserPreferences.WantToReadSync"/>
public bool WantToReadSync { get; set; }
}

View file

@ -1,5 +1,4 @@

using System;
using System;
using System.Collections.Generic;
using API.Entities;
using API.Entities.Interfaces;
@ -10,12 +9,13 @@ namespace API.DTOs;
public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
{
/// <inheritdoc cref="API.Entities.Volume.Id"/>
public int Id { get; set; }
/// <inheritdoc cref="Volume.MinNumber"/>
/// <inheritdoc cref="API.Entities.Volume.MinNumber"/>
public float MinNumber { get; set; }
/// <inheritdoc cref="Volume.MaxNumber"/>
/// <inheritdoc cref="API.Entities.Volume.MaxNumber"/>
public float MaxNumber { get; set; }
/// <inheritdoc cref="Volume.Name"/>
/// <inheritdoc cref="API.Entities.Volume.Name"/>
public string Name { get; set; } = default!;
/// <summary>
/// This will map to MinNumber. Number was removed in v0.7.13.8/v0.7.14
@ -24,17 +24,21 @@ public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
public int Number { get; set; }
public int Pages { get; set; }
public int PagesRead { get; set; }
/// <inheritdoc cref="API.Entities.Volume.LastModifiedUtc"/>
public DateTime LastModifiedUtc { get; set; }
/// <inheritdoc cref="API.Entities.Volume.CreatedUtc"/>
public DateTime CreatedUtc { get; set; }
/// <summary>
/// When chapter was created in local server time
/// </summary>
/// <remarks>This is required for Tachiyomi Extension</remarks>
/// <inheritdoc cref="API.Entities.Volume.Created"/>
public DateTime Created { get; set; }
/// <summary>
/// When chapter was last modified in local server time
/// </summary>
/// <remarks>This is required for Tachiyomi Extension</remarks>
/// <inheritdoc cref="API.Entities.Volume.LastModified"/>
public DateTime LastModified { get; set; }
public int SeriesId { get; set; }
public ICollection<ChapterDto> Chapters { get; set; } = new List<ChapterDto>();
@ -64,10 +68,14 @@ public sealed record VolumeDto : IHasReadTimeEstimate, IHasCoverImage
return MinNumber.Is(Parser.SpecialVolumeNumber);
}
/// <inheritdoc cref="API.Entities.Volume.CoverImage"/>
public string CoverImage { get; set; }
/// <inheritdoc cref="API.Entities.Volume.CoverImageLocked"/>
private bool CoverImageLocked { get; set; }
public string PrimaryColor { get; set; } = string.Empty;
public string SecondaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Volume.PrimaryColor"/>
public string? PrimaryColor { get; set; } = string.Empty;
/// <inheritdoc cref="API.Entities.Volume.SecondaryColor"/>
public string? SecondaryColor { get; set; } = string.Empty;
public void ResetColorScape()
{