using System; using API.Entities.Interfaces; namespace API.Entities; /// /// A personal table of contents for a given user linked with a given book /// public class AppUserTableOfContent : IEntityDate { public int Id { get; set; } /// /// The page to bookmark /// public required int PageNumber { get; set; } /// /// The title of the bookmark. Defaults to Page {PageNumber} if not set /// public required string Title { get; set; } public required int SeriesId { get; set; } public virtual Series Series { get; set; } public required int ChapterId { get; set; } public virtual Chapter Chapter { get; set; } public int VolumeId { get; set; } public int LibraryId { get; set; } /// /// For Book Reader, represents the nearest passed anchor on the screen that can be used to resume scroll point. If empty, the ToC point is the beginning of the page /// public string? BookScrollId { get; set; } public DateTime Created { get; set; } public DateTime CreatedUtc { get; set; } public DateTime LastModified { get; set; } public DateTime LastModifiedUtc { get; set; } // Relationships /// /// Navigational Property for EF. Links to a unique AppUser /// public AppUser AppUser { get; set; } = null!; /// /// User this table of content belongs to /// public int AppUserId { get; set; } }