Enhance template and scheduling functionalities: add PlanningRules to template endpoints and commands, implement repeat limits and audience filtering in scheduling logic, and update related data structures. Refactor frontend components to support new rules and improve user experience in channel management.

This commit is contained in:
Leonid Pershin
2026-07-26 14:25:32 +03:00
parent 7b12a06d1b
commit 8494eb5e6a
30 changed files with 3400 additions and 438 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TeleWave.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class TemplatePlanningRules : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "RulesJson",
table: "ScheduleTemplates",
type: "jsonb",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RulesJson",
table: "ScheduleTemplates");
}
}
}
@@ -928,6 +928,9 @@ namespace TeleWave.Infrastructure.Migrations
b.Property<int>("Revision")
.HasColumnType("integer");
b.Property<string>("RulesJson")
.HasColumnType("jsonb");
b.HasKey("Id");
b.HasIndex("ChannelId");
@@ -10,6 +10,7 @@ public class ScheduleTemplateConfiguration : IEntityTypeConfiguration<ScheduleTe
public void Configure(EntityTypeBuilder<ScheduleTemplate> builder)
{
builder.Property(x => x.Name).IsRequired().HasMaxLength(256);
builder.Property(x => x.RulesJson).HasColumnType("jsonb");
builder.HasIndex(x => x.ChannelId);
builder