using System; using System.Collections.Generic; using API.Entities.Interfaces; using Microsoft.EntityFrameworkCore; namespace API.Entities { [Index(nameof(Name), nameof(NormalizedName), nameof(LocalizedName), nameof(LibraryId), IsUnique = true)] public class Series : IEntityDate { public int Id { get; set; } /// /// The UI visible Name of the Series. This may or may not be the same as the OriginalName /// public string Name { get; set; } /// /// Used internally for name matching. /// public string NormalizedName { get; set; } /// /// The name used to sort the Series. By default, will be the same as Name. /// public string SortName { get; set; } /// /// Name in Japanese. By default, will be same as Name. /// public string LocalizedName { get; set; } /// /// Original Name on disk. Not exposed to UI. /// public string OriginalName { get; set; } /// /// Summary information related to the Series /// public string Summary { get; set; } // TODO: Migrate into SeriesMetdata public DateTime Created { get; set; } public DateTime LastModified { get; set; } public byte[] CoverImage { get; set; } /// /// Sum of all Volume page counts /// public int Pages { get; set; } public SeriesMetadata Metadata { get; set; } // Relationships public List Volumes { get; set; } public Library Library { get; set; } public int LibraryId { get; set; } } }