Fase 3c (code, nog niet uitgerold): foto's altijd in de bibliotheektabel, HeroImages-migratie met controle, schakelaars en hulpmiddelen weg

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 00:21:58 +01:00
co-authored by Claude Sonnet 5.5
parent 7246efccc1
commit d9e57425c2
52 changed files with 792 additions and 2537 deletions
@@ -112,37 +112,6 @@ public class HeroImage
};
}
/// <summary>
/// The same photo as <see cref="HeroImage"/>, always stored in <c>HeroImages</c>. Only used while the photos live in the
/// library (phase 3b): then <c>HeroImages</c> is kept up to date from the library rows so the switch can be turned back.
/// </summary>
public class LegacyHeroImage
{
public Guid Id { get; set; }
public string OriginalSha256 { get; set; } = string.Empty;
public string OriginalKey { get; set; } = string.Empty;
public string SourceFormat { get; set; } = string.Empty;
public int Width { get; set; }
public int Height { get; set; }
public long Bytes { get; set; }
public double FocusX { get; set; } = 0.5;
public double FocusY { get; set; } = 0.5;
public double Zoom { get; set; } = 1.0;
public double? WideFocusX { get; set; }
public double? WideFocusY { get; set; }
public double? WideZoom { get; set; }
public double? TallFocusX { get; set; }
public double? TallFocusY { get; set; }
public double? TallZoom { get; set; }
public string SetHash { get; set; } = string.Empty;
public List<HeroVariant> Variants { get; set; } = [];
public DateTimeOffset CreatedAt { get; set; }
public Guid CreatedByUserId { get; set; }
public string? OriginalFileName { get; set; }
public DateTimeOffset? LastUsedAt { get; set; }
public DateTimeOffset? DeletedAt { get; set; }
}
/// <summary>One file of the current set: the ratio, its pixel size, the type and the file name inside the set.</summary>
public record HeroVariant(string Ratio, int Width, int Height, string Type, string FileName, long Bytes);