Files
ersatztv/ErsatzTV.Core/Api/Scheduling/ScheduleItemResponseModel.cs
T
timothyandClaude Fable 5 d7782dccac feat(api): flat schedule-item DTO + discovery endpoints (#126 #207 #212)
Task A (#126): new non-polymorphic ScheduleItemResponseModel /
ScheduleItemsResponseModel in Core/Api/Scheduling, plus shared
NamedIdResponseModel. ScheduleItemResponseMapper flattens the
One/Flood/Multiple/Duration VM hierarchy. ScheduleController GET/POST/PUT
items now return the flat DTOs.

Task B: GET /api/languages (LanguagesController + LanguageCodeResponseModel);
GET /api/channels/music-video-credits-templates and
GET /api/channels/stream-selectors; FillerKind added to
FillerPresetResponseModel with optional ?fillerKind= filter on
GET /api/filler-presets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 23:40:47 +02:00

71 lines
2.3 KiB
C#

#nullable enable
using System.Collections.Generic;
using ErsatzTV.Core.Domain;
using ErsatzTV.Core.Scheduling;
namespace ErsatzTV.Core.Api.Scheduling;
/// <summary>
/// A flat, non-polymorphic projection of a program schedule item (issue #126). Unlike the
/// Application-layer <c>ProgramScheduleItemViewModel</c> hierarchy (One/Flood/Multiple/Duration
/// subtypes), every subtype-specific field is a nullable member here so the OpenAPI schema fully
/// describes the shape. The mutation fields are named 1:1 with
/// <c>ScheduleItemRequest</c> so a GET can be mapped losslessly back to a PUT/POST request.
/// </summary>
public record ScheduleItemResponseModel(
int Id,
int Index,
StartType StartType,
TimeSpan? StartTime,
FixedStartTimeBehavior? FixedStartTimeBehavior,
PlayoutMode PlayoutMode,
CollectionType CollectionType,
int? CollectionId,
int? MultiCollectionId,
int? SmartCollectionId,
int? RerunCollectionId,
int? MediaItemId,
int? PlaylistId,
string? SearchTitle,
string? SearchQuery,
PlaybackOrder PlaybackOrder,
MarathonGroupBy MarathonGroupBy,
bool MarathonShuffleGroups,
bool MarathonShuffleItems,
int? MarathonBatchSize,
FillWithGroupMode FillWithGroupMode,
MultipleMode? MultipleMode,
string? MultipleCount,
TimeSpan? PlayoutDuration,
TailMode? TailMode,
int? DiscardToFillAttempts,
string? CustomTitle,
GuideMode GuideMode,
int? PreRollFillerId,
int? MidRollFillerId,
int? PostRollFillerId,
int? TailFillerId,
int? FallbackFillerId,
List<int> WatermarkIds,
List<int> GraphicsElementIds,
string? PreferredAudioLanguageCode,
string? PreferredAudioTitle,
string? PreferredSubtitleLanguageCode,
ChannelSubtitleMode? SubtitleMode,
string? CollectionName,
string? MultiCollectionName,
string? SmartCollectionName,
string? RerunCollectionName,
string? PlaylistName,
int? PlaylistGroupId,
string? MediaItemName,
string? PreRollFillerName,
string? MidRollFillerName,
string? PostRollFillerName,
string? TailFillerName,
string? FallbackFillerName,
List<NamedIdResponseModel> Watermarks,
List<NamedIdResponseModel> GraphicsElements,
string? Name,
TimeSpan? DurationEstimate);