Kavita/Kavita.Models/Entities/FolderPath.cs
Fesaa c62b20f54b
BE Tech Debt (#4497)
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
2026-03-07 10:04:08 -08:00

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;
}
}
}