using FreeSql.DataAnnotations; namespace FATrace.Model { [Table(Name = "JellyfinMonitorTask")] public class JellyfinMonitorTask { [Column(IsPrimary = true, IsIdentity = true)] public long Id { get; set; } [Column(IsNullable = false)] public long OemRawUseId { get; set; } [Column(StringLength = 256, IsNullable = false)] public string? LocalFileNameOrPath { get; set; } [Column(StringLength = 100, IsNullable = false)] public string? Code { get; set; } [Column(StringLength = 100, IsNullable = false)] public string? RawName { get; set; } [Column(StringLength = 100, IsNullable = false)] public string? User { get; set; } [Column(IsNullable = false)] public TaskStatus Status { get; set; } = TaskStatus.Pending; [Column(IsNullable = false)] public int TryCount { get; set; } = 0; /// /// 对应下载任务的时间窗口:开始时间(用于 VideoAction.StartTime) /// [Column(IsNullable = true)] public DateTime? NvrStartTime { get; set; } /// /// 对应下载任务的时间窗口:结束时间(用于 VideoAction.EndTime) /// [Column(IsNullable = true)] public DateTime? NvrEndTime { get; set; } [Column(StringLength = 100)] public string? FoundItemId { get; set; } [Column(StringLength = 500)] public string? Error { get; set; } [Column(ServerTime = DateTimeKind.Local, CanUpdate = true)] public DateTime CreateTime { get; set; } [Column(ServerTime = DateTimeKind.Local, CanUpdate = true)] public DateTime UpdateTime { get; set; } } }