using Models.Models;

namespace DeepDrftModels.DTOs;

// Inherits Id, CreatedAt, UpdatedAt from BaseModel (Cerebellum.BlazorBlocks.Models).
// BlazorBlocks's Manager<> generic constraint requires `new()` on the model type, which
// disqualifies `required` properties (the `new()` constraint and required members do not
// compose). EntryKey/TrackName therefore drop `required` here — the TrackEntity side remains
// required, and TrackConverter assigns every field on the round-trip so an empty default is
// never observable in production code paths.
//
// Track-cardinal data only (Phase 8 §8.0). Release-cardinal fields are read via Release?.X.
public class TrackDto : BaseModel
{
    public string EntryKey { get; set; } = string.Empty;
    public string TrackName { get; set; } = string.Empty;
    public string? OriginalFileName { get; set; }
    public int TrackNumber { get; set; } = 1;
    public double? DurationSeconds { get; set; }
    public long? ReleaseId { get; set; }
    public ReleaseDto? Release { get; set; }
}
