using System; using System.Collections.Generic; using API.Entities.Enums; using API.Entities.Interfaces; namespace API.Entities; /// /// Represents an annotation in the Epub reader /// public class AppUserAnnotation : IEntityDate { public int Id { get; set; } /// /// Starting point of the Highlight /// public required string XPath { get; set; } /// /// Ending point of the Highlight. Can be the same as /// public string EndingXPath { get; set; } /// /// The text selected. /// public string SelectedText { get; set; } /// /// Rich text Comment /// public string? Comment { get; set; } /// /// The number of characters selected /// public int HighlightCount { get; set; } public int PageNumber { get; set; } /// /// Selected Highlight Slot Index [0-4] /// public int SelectedSlotIndex { get; set; } /// /// A calculated selection of the surrounding text. This does not update after creation. /// public string? Context { get; set; } public bool ContainsSpoiler { get; set; } // TODO: Figure out a simple mechansim to track upvotes (hashmap of userids?) /// /// Title of the TOC Chapter within Epub (not Chapter Entity) /// public string? ChapterTitle { get; set; } public required int LibraryId { get; set; } public required int SeriesId { get; set; } public required int VolumeId { get; set; } public required int ChapterId { get; set; } public Chapter Chapter { get; set; } public required int AppUserId { get; set; } public AppUser AppUser { get; set; } public DateTime Created { get; set; } public DateTime CreatedUtc { get; set; } public DateTime LastModified { get; set; } public DateTime LastModifiedUtc { get; set; } }