mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-10 20:15:26 -04:00
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com> Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
32 lines
696 B
C#
32 lines
696 B
C#
|
|
using System;
|
|
|
|
namespace Kavita.Models.Entities;
|
|
|
|
public class FolderPath
|
|
{
|
|
public int Id { get; set; }
|
|
public required string Path { get; set; }
|
|
/// <summary>
|
|
/// Used when scanning to see if we can skip if nothing has changed
|
|
/// </summary>
|
|
/// <remarks>Time stored in UTC</remarks>
|
|
public DateTime LastScanned { get; set; }
|
|
|
|
// Relationship
|
|
public Library Library { get; set; } = null!;
|
|
public int LibraryId { get; set; }
|
|
|
|
public void UpdateLastScanned(DateTime? time)
|
|
{
|
|
if (time == null)
|
|
{
|
|
LastScanned = DateTime.Now;
|
|
}
|
|
else
|
|
{
|
|
LastScanned = (DateTime) time;
|
|
}
|
|
}
|
|
}
|