using System;
using System.Collections.Generic;
using API.Entities.Enums;
using API.Entities.Interfaces;
namespace API.DTOs;
///
/// A Chapter is the lowest grouping of a reading medium. A Chapter contains a set of MangaFiles which represents the underlying
/// file (abstracted from type).
///
public class ChapterDto : IHasReadTimeEstimate, IEntityDate
{
public int Id { get; init; }
///
/// Range of chapters. Chapter 2-4 -> "2-4". Chapter 2 -> "2".
///
public string Range { get; init; } = default!;
///
/// Smallest number of the Range.
///
public string Number { get; init; } = default!;
///
/// Total number of pages in all MangaFiles
///
public int Pages { get; init; }
///
/// If this Chapter contains files that could only be identified as Series or has Special Identifier from filename
///
public bool IsSpecial { get; init; }
///
/// Used for books/specials to display custom title. For non-specials/books, will be set to
///
public string Title { get; set; } = default!;
///
/// The files that represent this Chapter
///
public ICollection Files { get; init; } = default!;
///
/// Calculated at API time. Number of pages read for this Chapter for logged in user.
///
public int PagesRead { get; set; }
///
/// The last time a chapter was read by current authenticated user
///
public DateTime LastReadingProgressUtc { get; set; }
///
/// If the Cover Image is locked for this entity
///
public bool CoverImageLocked { get; set; }
///
/// Volume Id this Chapter belongs to
///
public int VolumeId { get; init; }
///
/// When chapter was created
///
public DateTime Created { get; set; }
public DateTime LastModified { get; set; }
public DateTime CreatedUtc { get; set; }
public DateTime LastModifiedUtc { get; set; }
///
/// When the chapter was released.
///
/// Metadata field
public DateTime ReleaseDate { get; init; }
///
/// Title of the Chapter/Issue
///
/// Metadata field
public string TitleName { get; set; } = default!;
///
/// Summary of the Chapter
///
/// This is not set normally, only for Series Detail
public string Summary { get; init; } = default!;
///
/// Age Rating for the issue/chapter
///
public AgeRating AgeRating { get; init; }
///
/// Total words in a Chapter (books only)
///
public long WordCount { get; set; } = 0L;
///
/// Formatted Volume title ie) Volume 2.
///
/// Only available when fetched from Series Detail API
public string VolumeTitle { get; set; } = string.Empty;
///
public int MinHoursToRead { get; set; }
///
public int MaxHoursToRead { get; set; }
///
public int AvgHoursToRead { get; set; }
}