mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-02-19 23:38:01 -05:00
35 lines
833 B
C#
35 lines
833 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
using Cleanuparr.Domain.Enums;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Cleanuparr.Persistence.Models.State;
|
|
|
|
[Index(nameof(DownloadItemId), nameof(Type))]
|
|
[Index(nameof(CreatedAt))]
|
|
[Index(nameof(JobRunId))]
|
|
public class Strike
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; } = Guid.CreateVersion7();
|
|
|
|
[Required]
|
|
public Guid DownloadItemId { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public DownloadItem DownloadItem { get; set; } = null!;
|
|
|
|
[Required]
|
|
public Guid JobRunId { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public JobRun JobRun { get; set; } = null!;
|
|
|
|
[Required]
|
|
public required StrikeType Type { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
public long? LastDownloadedBytes { get; set; }
|
|
}
|