refactor(backend): group track pipeline state into owned types

Track mixed catalog fields (Title, Artist credit, Duration) with
picture-processing and audio-transcode pipeline state as ten flat
columns plus two computed [NotMapped] flags, making the entity read
like a media-pipeline worksheet.

Introduce TrackPictures and TrackAudio as EF owned types mapped onto
the same existing columns (explicit column names, no schema change -
verified via `dotnet ef migrations has-pending-model-changes`).
Track now reads as Title/Artist/Duration/Pictures/Audio instead of
fourteen loose properties.
This commit is contained in:
2026-07-17 17:58:56 +02:00
parent 6e2f3a257a
commit aae45a5186
19 changed files with 270 additions and 124 deletions
@@ -0,0 +1,23 @@
using System.Diagnostics.CodeAnalysis;
namespace Musify.Domain.ValueObjects
{
#pragma warning disable CS8618
public class TrackAudio
{
public string? OriginalName { get; set; }
public string? FolderName { get; set; }
public ProcessingStatus TranscodeStatus { get; set; } = ProcessingStatus.Pending;
public bool DownloadRequested { get; set; }
public int RetryCount { get; set; }
public DateTime? LastRetryAt { get; set; }
[MemberNotNullWhen(true, nameof(FolderName))]
public bool IsProcessed => TranscodeStatus == ProcessingStatus.Completed;
}
}