mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-12-21 12:27:21 -05:00
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using API.Entities.Enums;
|
|
|
|
namespace API.DTOs.Reader;
|
|
|
|
public sealed record RereadDto
|
|
{
|
|
/// <summary>
|
|
/// Should the prompt be shown
|
|
/// </summary>
|
|
public required bool ShouldPrompt { get; init; }
|
|
/// <summary>
|
|
/// If the prompt is triggered because of time, false when triggered because of fully read
|
|
/// </summary>
|
|
public bool TimePrompt { get; init; } = false;
|
|
/// <summary>
|
|
/// Days elapsed since <see cref="ChapterOnReread"/> was last read
|
|
/// </summary>
|
|
public int DaysSinceLastRead { get; init; }
|
|
/// <summary>
|
|
/// The chapter to open if continue is selected
|
|
/// </summary>
|
|
public RereadChapterDto ChapterOnContinue { get; init; }
|
|
/// <summary>
|
|
/// The chapter to open if reread is selected, this may be equal to <see cref="ChapterOnContinue"/>
|
|
/// </summary>
|
|
public RereadChapterDto ChapterOnReread { get; init; }
|
|
|
|
public static RereadDto Dont()
|
|
{
|
|
return new RereadDto
|
|
{
|
|
ShouldPrompt = false
|
|
};
|
|
}
|
|
}
|
|
|
|
public sealed record RereadChapterDto(int LibraryId, int SeriesId, int ChapterId, string Label, MangaFormat? Format);
|