Update scheduling parameters and refactor channel endpoints: extend HorizonDays to 7 and RetentionDays to 90 in appsettings.json. Consolidate channel-related endpoint logic by removing obsolete files and enhancing the ShowEndpoints with audience and genre management capabilities. Improve error handling and streamline command handlers for channel operations.
build / backend (push) Successful in 7m40s
build / frontend (push) Failing after 39s
tests / backend-tests (push) Successful in 6m9s

This commit is contained in:
Leonid Pershin
2026-07-26 13:32:13 +03:00
parent c4ef954dea
commit 66040a8841
272 changed files with 27944 additions and 8699 deletions
@@ -0,0 +1,35 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace TeleWave.Application.Programming.Templates;
/// <summary>
/// Откуда слот-повтор берёт содержимое: точка в уже записанной ленте того же канала. «Вечерний фильм
/// утром в субботу» — это <c>daysAgo = 1, time = 20:00</c>.
/// </summary>
public sealed record RepeatSource(int DaysAgo, TimeOnly Time, int DurationMinutes)
{
private static readonly JsonSerializerOptions Options = new()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
Converters = { new JsonStringEnumConverter() },
};
public string ToJson() => JsonSerializer.Serialize(this, Options);
public static RepeatSource? FromJson(string? json)
{
if (string.IsNullOrWhiteSpace(json))
return null;
try
{
return JsonSerializer.Deserialize<RepeatSource>(json, Options);
}
catch (JsonException)
{
return null;
}
}
}