using System; using System.Collections.Generic; using API.Entities.Enums; using API.Entities.Interfaces; namespace API.Entities; #nullable enable /// /// This is a collection of which represent individual chapters and an order. /// public class ReadingList : IEntityDate, IHasCoverImage { public int Id { get; init; } public required string Title { get; set; } /// /// A normalized string used to check if the reading list already exists in the DB /// public required string NormalizedTitle { get; set; } public string? Summary { get; set; } /// /// Reading lists that are promoted are only done by admins /// public bool Promoted { get; set; } public string? CoverImage { get; set; } public string? PrimaryColor { get; set; } public string? SecondaryColor { get; set; } public bool CoverImageLocked { get; set; } /// /// The highest age rating from all Series within the reading list /// /// Introduced in v0.6 public required AgeRating AgeRating { get; set; } = AgeRating.Unknown; public ICollection Items { get; set; } = null!; public DateTime Created { get; set; } public DateTime LastModified { get; set; } public DateTime CreatedUtc { get; set; } public DateTime LastModifiedUtc { get; set; } /// /// Minimum Year the Reading List starts /// public int StartingYear { get; set; } /// /// Minimum Month the Reading List starts /// public int StartingMonth { get; set; } /// /// Maximum Year the Reading List starts /// public int EndingYear { get; set; } /// /// Maximum Month the Reading List starts /// public int EndingMonth { get; set; } // Relationships public int AppUserId { get; set; } public AppUser AppUser { get; set; } = null!; public void ResetColorScape() { PrimaryColor = string.Empty; SecondaryColor = string.Empty; } }