Very messy code that implements read status tracking. Needs major cleanup.
This commit is contained in:
parent
e0d70d16f9
commit
effdf07cef
24 changed files with 2179 additions and 24 deletions
|
@ -12,12 +12,15 @@ namespace API.Entities
|
|||
public DateTime Created { get; set; } = DateTime.Now;
|
||||
public DateTime LastActive { get; set; }
|
||||
public ICollection<Library> Libraries { get; set; }
|
||||
[ConcurrencyCheck]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
|
||||
public ICollection<AppUserRole> UserRoles { get; set; }
|
||||
|
||||
//public ICollection<SeriesProgress> SeriesProgresses { get; set; }
|
||||
public ICollection<AppUserProgress> Progresses { get; set; }
|
||||
|
||||
[ConcurrencyCheck]
|
||||
public uint RowVersion { get; set; }
|
||||
|
||||
public void OnSavingChanges()
|
||||
{
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
/// </summary>
|
||||
public class AppUserProgress
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int PagesRead { get; set; }
|
||||
|
||||
public AppUser AppUser { get; set; }
|
||||
public int AppUserId { get; set; }
|
||||
public int VolumeId { get; set; }
|
||||
public int SeriesId { get; set; } // shortcut
|
||||
//public bool VolumeCompleted { get; set; } // This will be set true if PagesRead == Sum of MangaFiles on volume
|
||||
}
|
||||
}
|
|
@ -26,6 +26,14 @@ namespace API.Entities
|
|||
public DateTime Created { get; set; }
|
||||
public DateTime LastModified { get; set; }
|
||||
public byte[] CoverImage { get; set; }
|
||||
/// <summary>
|
||||
/// Sum of all Volume pages
|
||||
/// </summary>
|
||||
public int Pages { get; set; }
|
||||
/// <summary>
|
||||
/// Total Volumes linked to Entity
|
||||
/// </summary>
|
||||
//public int TotalVolumes { get; set; }
|
||||
public ICollection<Volume> Volumes { get; set; }
|
||||
public Library Library { get; set; }
|
||||
public int LibraryId { get; set; }
|
||||
|
|
|
@ -15,8 +15,7 @@ namespace API.Entities
|
|||
public byte[] CoverImage { get; set; }
|
||||
public int Pages { get; set; }
|
||||
|
||||
// public string CachePath {get; set;} // Path where cache is located. Default null, resets to null on deletion.
|
||||
//public ICollection<AppUserProgress> AppUserProgress { get; set; }
|
||||
|
||||
|
||||
// Many-to-One relationships
|
||||
public Series Series { get; set; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue