#nullable enable
using ErsatzTV.Core.Domain;

namespace ErsatzTV.Core.Api.Playouts;

public record PlayoutResponseModel(
    int Id,
    PlayoutScheduleKind ScheduleKind,
    string ChannelName,
    string ChannelNumber,
    ChannelPlayoutMode PlayoutMode,
    string ScheduleName,
    string? ScheduleFile,
    TimeSpan? DailyRebuildTime,
    PlayoutBuildStatusResponseModel? BuildStatus,
    int? DecoId,
    string? DecoName,
    bool IsLocked,
    int Seed)
{
    public static PlayoutResponseModel From(
        int id,
        PlayoutScheduleKind scheduleKind,
        string channelName,
        string channelNumber,
        ChannelPlayoutMode playoutMode,
        string scheduleName,
        string? scheduleFile,
        TimeSpan? dailyRebuildTime,
        PlayoutBuildStatusResponseModel? buildStatus,
        int? decoId,
        string? decoName,
        bool isLocked,
        int seed) =>
        new(
            id,
            scheduleKind,
            channelName,
            channelNumber,
            playoutMode,
            scheduleName,
            scheduleFile,
            dailyRebuildTime,
            buildStatus,
            decoId,
            decoName,
            isLocked,
            seed);
}
