using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace API.Controllers.DTOs; /// /// DTO /// public sealed record Chapter(string Key, string MangaId, int? Volume, string ChapterNumber, string? Title, IEnumerable MangaConnectorIds, bool Downloaded) : Identifiable(Key) { /// /// Identifier of the Manga this Chapter belongs to /// [Required] [Description("Identifier of the Manga this Chapter belongs to")] public string MangaId { get; init; } = MangaId; /// /// Volume number /// [Required] [Description("Volume number")] public int? Volume { get; init; } = Volume; /// /// Chapter number /// [Required] [Description("Chapter number")] public string ChapterNumber { get; init; } = ChapterNumber; /// /// Title of the Chapter /// [Required] [Description("Title of the Chapter")] public string? Title { get; init; } = Title; /// /// Whether Chapter is Downloaded (on disk) /// [Required] [Description("Whether Chapter is Downloaded (on disk)")] public bool Downloaded { get; init; } = Downloaded; /// /// Ids of the Manga on MangaConnectors /// [Required] [Description("Ids of the Manga on MangaConnectors")] public IEnumerable MangaConnectorIds { get; init; } = MangaConnectorIds; }