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.
24 lines
686 B
C#
24 lines
686 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace Musify.Domain.ValueObjects
|
|
{
|
|
#pragma warning disable CS8618
|
|
public class TrackPictures
|
|
{
|
|
public string? OriginalName { get; set; }
|
|
|
|
public string? SmallName { get; set; }
|
|
|
|
public string? MediumName { get; set; }
|
|
|
|
public string? LargeName { get; set; }
|
|
|
|
public ProcessingStatus ProcessingStatus { get; set; } = ProcessingStatus.Pending;
|
|
|
|
[MemberNotNullWhen(true, nameof(SmallName))]
|
|
[MemberNotNullWhen(true, nameof(MediumName))]
|
|
[MemberNotNullWhen(true, nameof(LargeName))]
|
|
public bool IsProcessed => ProcessingStatus == ProcessingStatus.Completed;
|
|
}
|
|
}
|