Implement BumperEndpoints and remove deprecated bumper-related functionality
Added new BumperEndpoints to the API for managing bumper templates and variants, enhancing the channel management capabilities. Removed outdated bumper-related commands and handlers from the application, streamlining the codebase and improving maintainability. Updated ChannelEndpoints to reflect these changes and ensure proper routing for the new endpoints.
This commit is contained in:
@@ -164,18 +164,19 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ChannelId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<Guid>("FromShowId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("MediaAssetId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid?>("PosterShowId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("RenderedLinesJson")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.Property<string>("Signature")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
@@ -184,15 +185,15 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<Guid>("TemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ToShowId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("VariantId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FromShowId", "ToShowId", "Signature");
|
||||
b.HasIndex("MediaAssetId");
|
||||
|
||||
b.HasIndex("Signature")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("BumperAssets");
|
||||
});
|
||||
@@ -227,20 +228,17 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<Guid?>("BackgroundImageId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ChannelId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("Font")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("Revision")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -251,9 +249,9 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ChannelId", "Position");
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("BumperTemplate");
|
||||
b.ToTable("BumperTemplates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Broadcast.BumperTextVariant", b =>
|
||||
@@ -261,40 +259,20 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int>("Background")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<Guid>("BumperTemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("Kind")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Line1")
|
||||
.IsRequired()
|
||||
.HasMaxLength(120)
|
||||
.HasColumnType("character varying(120)");
|
||||
|
||||
b.Property<string>("Line2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(120)
|
||||
.HasColumnType("character varying(120)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("NextLabel")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<string>("NowLabel")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<int>("Position")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -321,15 +299,6 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<double>("AnalogFilterStrength")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<int>("BumperFont")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("BumperSelection")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<bool>("BumpersEnabled")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
@@ -886,6 +855,18 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<Guid?>("BumperTemplateId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid?>("BumperVariantId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("ChoiceKey")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("character varying(64)");
|
||||
|
||||
b.Property<int>("ChoiceWeight")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<string>("ConditionsJson")
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
@@ -906,6 +887,10 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BumperTemplateId");
|
||||
|
||||
b.HasIndex("BumperVariantId");
|
||||
|
||||
b.HasIndex("GroupId");
|
||||
|
||||
b.HasIndex("JunctionTemplateId", "Position");
|
||||
@@ -918,12 +903,12 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ChannelId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int?>("MaxTotalSeconds")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
@@ -931,7 +916,7 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ChannelId");
|
||||
b.HasIndex("Name");
|
||||
|
||||
b.ToTable("JunctionTemplates");
|
||||
});
|
||||
@@ -1234,15 +1219,6 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Broadcast.BumperTemplate", b =>
|
||||
{
|
||||
b.HasOne("TeleWave.Domain.Broadcast.Channel", null)
|
||||
.WithMany("BumperTemplates")
|
||||
.HasForeignKey("ChannelId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Broadcast.BumperTextVariant", b =>
|
||||
{
|
||||
b.HasOne("TeleWave.Domain.Broadcast.BumperTemplate", null)
|
||||
@@ -1250,6 +1226,37 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
.HasForeignKey("BumperTemplateId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.OwnsMany("TeleWave.Domain.Broadcast.BumperLine", "Lines", b1 =>
|
||||
{
|
||||
b1.Property<Guid>("BumperTextVariantId");
|
||||
|
||||
b1.Property<int>("__synthesizedOrdinal")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b1.Property<int>("Color");
|
||||
|
||||
b1.Property<int>("Position");
|
||||
|
||||
b1.Property<int>("Style");
|
||||
|
||||
b1.Property<string>("Text")
|
||||
.IsRequired()
|
||||
.HasMaxLength(120);
|
||||
|
||||
b1.HasKey("BumperTextVariantId", "__synthesizedOrdinal");
|
||||
|
||||
b1.ToTable("BumperTextVariants");
|
||||
|
||||
b1
|
||||
.ToJson("Lines")
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b1.WithOwner()
|
||||
.HasForeignKey("BumperTextVariantId");
|
||||
});
|
||||
|
||||
b.Navigation("Lines");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Library.CollectionItem", b =>
|
||||
@@ -1320,6 +1327,16 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Programming.JunctionElement", b =>
|
||||
{
|
||||
b.HasOne("TeleWave.Domain.Broadcast.BumperTemplate", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("BumperTemplateId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("TeleWave.Domain.Broadcast.BumperTextVariant", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("BumperVariantId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("TeleWave.Domain.Programming.Group", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("GroupId")
|
||||
@@ -1360,11 +1377,6 @@ namespace TeleWave.Infrastructure.Migrations
|
||||
b.Navigation("Variants");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Broadcast.Channel", b =>
|
||||
{
|
||||
b.Navigation("BumperTemplates");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TeleWave.Domain.Library.Collection", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
||||
Reference in New Issue
Block a user