Phase 9 Wave 1: add ReleaseMedium discriminator + Session/Mix metadata

Add ReleaseMedium enum (Cut/Session/Mix) and two 1:1 satellite entities
(SessionMetadata, MixMetadata) with EF configs and an additive migration.
ReleaseDto.ReleaseType is now nullable, nulled for non-Cut at the converter.
Existing releases default to Cut via column default; no data migration.
This commit is contained in:
daniel-c-harvey
2026-06-12 21:47:04 -04:00
parent 6f63fe7d7c
commit 5d6b54d2fc
16 changed files with 767 additions and 4 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ using Data.Managers;
using DeepDrftData.Repositories;
using DeepDrftModels.DTOs;
using DeepDrftModels.Entities;
using DeepDrftModels.Enums;
using Microsoft.Extensions.Logging;
using Models.Common;
using NetBlocks.Models;
@@ -263,7 +264,10 @@ public class TrackManager
releaseEntity.Genre = release.Genre;
releaseEntity.ReleaseDate = release.ReleaseDate;
releaseEntity.ImagePath = release.ImagePath;
releaseEntity.ReleaseType = release.ReleaseType;
releaseEntity.Medium = release.Medium;
// DTO ReleaseType is nullable (meaningful only for Cut); the entity field is not.
// Default to Single when null, matching TrackConverter.Convert(ReleaseDto).
releaseEntity.ReleaseType = release.ReleaseType ?? ReleaseType.Single;
releaseEntity.CreatedByUserId = release.CreatedByUserId;
await Repository.UpdateReleaseAsync(releaseEntity);
}