using DeepDrftModels.DTOs; using DeepDrftModels.Enums; using Models.Common; using NetBlocks.Models; namespace DeepDrftData; /// /// SQL-side release service. Repository outputs entities; this service outputs DTOs via TrackConverter. /// Backs the medium-aware release read endpoints (paged list + by-id detail) and the two metadata /// write paths (Session hero image, Mix waveform). The entity never escapes the service layer. /// public interface IReleaseService { /// Paginated releases, optionally filtered to one medium. The matching medium's metadata satellite is included in the result. Omit medium for all releases. Task>> GetPagedAsync( int page, int pageSize, string? sortColumn, bool sortDescending, ReleaseMedium? medium, CancellationToken cancellationToken = default); /// Single release with both metadata navs included (nulls for non-matching media). Task> GetByIdAsync(long id, CancellationToken cancellationToken = default); /// Track entry keys for a release. Single-entry for Session/Mix (enforced at upload); may be multiple for Cut. Task>> GetTrackEntryKeysAsync(long releaseId, CancellationToken cancellationToken = default); /// Find-or-create the Session satellite and set its hero image entry key. Fails when the release is not a Session. Task SetSessionHeroImageAsync(long releaseId, string heroImageEntryKey, CancellationToken cancellationToken = default); /// Find-or-create the Mix satellite and set its waveform entry key. Fails when the release is not a Mix. Task SetMixWaveformAsync(long releaseId, string waveformEntryKey, CancellationToken cancellationToken = default); }