Adds TemplateController mirroring BlockController: groups CRUD, template
CRUD, item replace (PUT full-replace via ReplaceTemplateItems), and a
copy endpoint. Also wires the missing POST /api/blocks/{id}/copy since
CopyBlock's CQRS shape is directly analogous to CopyTemplate.
Fixes CreateTemplateHandler to validate the target template group exists
before insert (previously an unhandled FK violation -> 500), matching the
CreateBlockHandler fix (1e34e00e) for the same class of bug.
New DTOs in ErsatzTV.Core/Api/Scheduling; TimeSpan start times serialize
the same way as PlayoutResponseModel.DailyRebuildTime.
#144 S2 (#162)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10 lines
224 B
C#
10 lines
224 B
C#
#nullable enable
|
|
namespace ErsatzTV.Core.Api.Scheduling;
|
|
|
|
public record TemplateWithItemsResponseModel(
|
|
int Id,
|
|
int TemplateGroupId,
|
|
string GroupName,
|
|
string Name,
|
|
List<TemplateItemResponseModel> Items);
|