Add interstitial endpoints and enhance media and template functionalities: implement MapInterstitialEndpoints in Program.cs, add preview functionality for media assets in MediaEndpoints, and introduce template preview capabilities in TemplateEndpoints. Remove obsolete bumper settings from Channel and related classes to streamline configuration.
build / backend (push) Successful in 5m58s
build / frontend (push) Successful in 47s
tests / backend-tests (push) Successful in 5m57s

This commit is contained in:
Leonid Pershin
2026-07-26 14:03:53 +03:00
parent 66040a8841
commit 7b12a06d1b
53 changed files with 4076 additions and 469 deletions
@@ -0,0 +1,68 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TeleWave.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class DropDeadBumperSettings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
// Значение 0 (прежняя «ротация») из перечисления убрано: курсора ротации больше нет,
// и выбор молча вырождался в случайный. Переводим такие каналы на выбор по весам.
migrationBuilder.Sql(
"""UPDATE "Channels" SET "BumperSelection" = 3 WHERE "BumperSelection" = 0;"""
);
migrationBuilder.DropColumn(
name: "BumperEpisodeChangeChance",
table: "Channels");
migrationBuilder.DropColumn(
name: "BumperMinIntervalMinutes",
table: "Channels");
migrationBuilder.DropColumn(
name: "BumperShowChangeChance",
table: "Channels");
migrationBuilder.DropColumn(
name: "NextBumperIndex",
table: "Channels");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<double>(
name: "BumperEpisodeChangeChance",
table: "Channels",
type: "double precision",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<int>(
name: "BumperMinIntervalMinutes",
table: "Channels",
type: "integer",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<double>(
name: "BumperShowChangeChance",
table: "Channels",
type: "double precision",
nullable: false,
defaultValue: 0.0);
migrationBuilder.AddColumn<int>(
name: "NextBumperIndex",
table: "Channels",
type: "integer",
nullable: false,
defaultValue: 0);
}
}
}
@@ -318,21 +318,12 @@ namespace TeleWave.Infrastructure.Migrations
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<double>("BumperEpisodeChangeChance")
.HasColumnType("double precision");
b.Property<int>("BumperFont")
.HasColumnType("integer");
b.Property<int>("BumperMinIntervalMinutes")
.HasColumnType("integer");
b.Property<int>("BumperSelection")
.HasColumnType("integer");
b.Property<double>("BumperShowChangeChance")
.HasColumnType("double precision");
b.Property<bool>("BumpersEnabled")
.HasColumnType("boolean");
@@ -356,9 +347,6 @@ namespace TeleWave.Infrastructure.Migrations
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<int>("NextBumperIndex")
.HasColumnType("integer");
b.Property<int?>("Number")
.HasColumnType("integer");