namespace PSLauncher.Models;

/// <summary>
/// État persistant d'un téléchargement en cours, écrit régulièrement sur disque
/// pour permettre la reprise si le launcher est fermé / crashe pendant le DL.
/// </summary>
public sealed class DownloadState
{
    public int SchemaVersion { get; set; } = 1;
    public string Version { get; set; } = string.Empty;
    public string Url { get; set; } = string.Empty;
    public long TotalBytes { get; set; }
    public long DownloadedBytes { get; set; }
    public string ExpectedSha256 { get; set; } = string.Empty;
    public string? Etag { get; set; }
    public string? LastModified { get; set; }
    public string PartialPath { get; set; } = string.Empty;
    public DateTime StartedAtUtc { get; set; }
    public DateTime LastChunkAtUtc { get; set; }
}
