mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-09 16:44:16 -04:00
* Lots of cleanup on the warnings in the solution. Deprecated IsLastWriteLessThan and made a new method HasFileBeenModifiedSince. * Added some tests for the new extension method. * Changed filter import to use correct import * Scan Series now uses Refresh Metadata for Series, rather than library one. * Fixed an issue where cover generation wasn't properly taking forced update into consideration. Removed a case of cover generation for no reason. * Fixed series downloads not triggering backend call
71 lines
2.0 KiB
C#
71 lines
2.0 KiB
C#
|
|
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using API.Entities.Interfaces;
|
|
|
|
namespace API.Entities
|
|
{
|
|
/// <summary>
|
|
/// Represents the progress a single user has on a given Chapter.
|
|
/// </summary>
|
|
//[Index(nameof(SeriesId), nameof(VolumeId), nameof(ChapterId), nameof(AppUserId), IsUnique = true)]
|
|
public class AppUserProgress : IEntityDate, IHasConcurrencyToken
|
|
{
|
|
/// <summary>
|
|
/// Id of Entity
|
|
/// </summary>
|
|
public int Id { get; set; }
|
|
/// <summary>
|
|
/// Pages Read for given Chapter
|
|
/// </summary>
|
|
public int PagesRead { get; set; }
|
|
/// <summary>
|
|
/// Volume belonging to Chapter
|
|
/// </summary>
|
|
public int VolumeId { get; set; }
|
|
/// <summary>
|
|
/// Series belonging to Chapter
|
|
/// </summary>
|
|
public int SeriesId { get; set; }
|
|
/// <summary>
|
|
/// Chapter
|
|
/// </summary>
|
|
public int ChapterId { get; set; }
|
|
/// <summary>
|
|
/// For Book Reader, represents the nearest passed anchor on the screen that can be used to resume scroll point
|
|
/// on next load
|
|
/// </summary>
|
|
public string BookScrollId { get; set; }
|
|
|
|
// Relationships
|
|
/// <summary>
|
|
/// Navigational Property for EF. Links to a unique AppUser
|
|
/// </summary>
|
|
public AppUser AppUser { get; set; }
|
|
/// <summary>
|
|
/// User this progress belongs to
|
|
/// </summary>
|
|
public int AppUserId { get; set; }
|
|
|
|
/// <summary>
|
|
/// When this was first created
|
|
/// </summary>
|
|
public DateTime Created { get; set; }
|
|
/// <summary>
|
|
/// Last date this was updated
|
|
/// </summary>
|
|
public DateTime LastModified { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
[ConcurrencyCheck]
|
|
public uint RowVersion { get; private set; }
|
|
|
|
|
|
/// <inheritdoc />
|
|
public void OnSavingChanges()
|
|
{
|
|
RowVersion++;
|
|
}
|
|
}
|
|
}
|