Refactor Channel endpoints and data models: replace jingle functionality with bumper templates, update related commands and handlers, and enhance API routes for managing bumper templates. Remove obsolete jingle-related code and adjust channel data structures to support new bumper template features.

This commit is contained in:
Leonid Pershin
2026-07-25 11:02:16 +03:00
parent 27571a4ab6
commit 84c2867062
60 changed files with 2805 additions and 1045 deletions
@@ -17,8 +17,6 @@ public sealed record ChannelShowDto(
public sealed record ChannelAdDto(Guid Id, Guid MediaAssetId, string? AssetName, int Position);
public sealed record ChannelJingleDto(Guid Id, Guid MediaAssetId, string? AssetName, int Position);
public sealed record OverrideShowDto(Guid ShowId, string ShowName, int Weight);
public sealed record ProgrammingOverrideDto(
@@ -29,20 +27,29 @@ public sealed record ProgrammingOverrideDto(
IReadOnlyList<OverrideShowDto> Shows
);
/// <summary>Общие для канала настройки ТВ-заставок (стиль/звук — на каждом блоке, см. <see cref="BumperTemplateDto"/>).</summary>
public sealed record BumperSettingsDto(
BumperMode Mode,
int DurationSeconds,
string BackgroundColor,
string BackgroundColor2,
string AccentColor,
string TextColor,
BumperFont Font,
string NowLabel,
string NextLabel,
int MinIntervalMinutes,
bool OnlyBetweenDifferentShows,
BumperSelection Selection
);
/// <summary>Блок заставки: своё оформление + звук. <see cref="AudioDurationSeconds"/> — длина звука (сек).</summary>
public sealed record BumperTemplateDto(
Guid Id,
int Position,
bool IsDefault,
string Name,
string BackgroundColor,
string BackgroundColor2,
string AccentColor,
string TextColor,
bool HasBackground,
bool HasMusic
bool HasAudio,
double? AudioDurationSeconds
);
public sealed record ChannelDto(
@@ -54,9 +61,9 @@ public sealed record ChannelDto(
int AdsPerBreak,
bool BumpersEnabled,
BumperSettingsDto Bumper,
IReadOnlyList<BumperTemplateDto> BumperTemplates,
Guid? FillerAssetId,
IReadOnlyList<ChannelShowDto> Shows,
IReadOnlyList<ChannelAdDto> Ads,
IReadOnlyList<ChannelJingleDto> Jingles,
IReadOnlyList<ProgrammingOverrideDto> Overrides
);