// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using TeleWave.Infrastructure.Persistence; #nullable disable namespace TeleWave.Infrastructure.Migrations { [DbContext(typeof(AppDbContext))] [Migration("20260724204325_AddBumpers")] partial class AddBumpers { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("text"); b.Property("ClaimValue") .HasColumnType("text"); b.Property("RoleId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("text"); b.Property("ClaimValue") .HasColumnType("text"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasColumnType("text"); b.Property("ProviderKey") .HasColumnType("text"); b.Property("ProviderDisplayName") .HasColumnType("text"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("uuid"); b.Property("RoleId") .HasColumnType("uuid"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("uuid"); b.Property("LoginProvider") .HasColumnType("text"); b.Property("Name") .HasColumnType("text"); b.Property("Value") .HasColumnType("text"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("TeleWave.Domain.Auth.RefreshToken", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("ExpiresAt") .HasColumnType("timestamp with time zone"); b.Property("ReplacedByTokenHash") .HasColumnType("text"); b.Property("RevokedAt") .HasColumnType("timestamp with time zone"); b.Property("TokenHash") .IsRequired() .HasColumnType("text"); b.Property("UserId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("TokenHash") .IsUnique(); b.HasIndex("UserId"); b.ToTable("RefreshTokens"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.BumperAsset", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("FromShowId") .HasColumnType("uuid"); b.Property("MediaAssetId") .HasColumnType("uuid"); b.Property("Signature") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("ToShowId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("FromShowId", "ToShowId", "Signature"); b.ToTable("BumperAssets"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.Channel", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("AdInsertion") .HasColumnType("integer"); b.Property("AdsPerBreak") .HasColumnType("integer"); b.Property("BumpersEnabled") .HasColumnType("boolean"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("EpochUtc") .HasColumnType("timestamp with time zone"); b.Property("FillerAssetId") .HasColumnType("uuid"); b.Property("IsEnabled") .HasColumnType("boolean"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("NextAdIndex") .HasColumnType("integer"); b.Property("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.HasKey("Id"); b.HasIndex("Slug") .IsUnique(); b.ToTable("Channels"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ChannelAd", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("ChannelId") .HasColumnType("uuid"); b.Property("MediaAssetId") .HasColumnType("uuid"); b.Property("Position") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("ChannelId", "Position"); b.ToTable("ChannelAd"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ChannelShow", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("BlockMode") .HasColumnType("integer"); b.Property("BlockValue") .HasColumnType("integer"); b.Property("ChannelId") .HasColumnType("uuid"); b.Property("IsEnabled") .HasColumnType("boolean"); b.Property("NextEpisodeIndex") .HasColumnType("integer"); b.Property("ShowId") .HasColumnType("uuid"); b.Property("Weight") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("ChannelId", "ShowId"); b.ToTable("ChannelShow"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.OverrideShow", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("ProgrammingOverrideId") .HasColumnType("uuid"); b.Property("ShowId") .HasColumnType("uuid"); b.Property("Weight") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("ProgrammingOverrideId"); b.ToTable("OverrideShow"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ProgrammingOverride", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("ChannelId") .HasColumnType("uuid"); b.Property("EndsAtUtc") .HasColumnType("timestamp with time zone"); b.Property("Mode") .HasColumnType("integer"); b.Property("StartsAtUtc") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("ChannelId", "StartsAtUtc", "EndsAtUtc"); b.ToTable("ProgrammingOverride"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ScheduleEntry", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("ChannelId") .HasColumnType("uuid"); b.Property("EndsAtUtc") .HasColumnType("timestamp with time zone"); b.Property("EpisodeIndex") .HasColumnType("integer"); b.Property("Kind") .HasColumnType("integer"); b.Property("MediaAssetId") .HasColumnType("uuid"); b.Property("ShowId") .HasColumnType("uuid"); b.Property("StartsAtUtc") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("ChannelId", "EndsAtUtc"); b.HasIndex("ChannelId", "ShowId"); b.HasIndex("ChannelId", "StartsAtUtc"); b.ToTable("ScheduleEntries"); }); modelBuilder.Entity("TeleWave.Domain.Library.Show", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Description") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("Kind") .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.HasKey("Id"); b.ToTable("Shows"); }); modelBuilder.Entity("TeleWave.Domain.Library.ShowEpisode", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("MediaAssetId") .HasColumnType("uuid"); b.Property("Position") .HasColumnType("integer"); b.Property("ShowId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("MediaAssetId"); b.HasIndex("ShowId", "Position"); b.ToTable("ShowEpisode"); }); modelBuilder.Entity("TeleWave.Domain.Media.MediaAsset", b => { b.Property("Id") .HasColumnType("uuid"); b.Property("AudioCodec") .HasMaxLength(32) .HasColumnType("character varying(32)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Duration") .HasColumnType("interval"); b.Property("ErrorMessage") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("Height") .HasColumnType("integer"); b.Property("OriginalExtension") .IsRequired() .HasMaxLength(16) .HasColumnType("character varying(16)"); b.Property("OriginalFileName") .IsRequired() .HasMaxLength(512) .HasColumnType("character varying(512)"); b.Property("RelativePath") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("SegmentCount") .HasColumnType("integer"); b.Property("SegmentSeconds") .HasColumnType("integer"); b.Property("Source") .HasColumnType("integer"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.Property("VideoCodec") .HasMaxLength(32) .HasColumnType("character varying(32)"); b.Property("Width") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("Status"); b.ToTable("MediaAssets"); }); modelBuilder.Entity("TeleWave.Infrastructure.Identity.AppRole", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("text"); b.Property("IsSystem") .HasColumnType("boolean"); b.Property("Name") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex"); b.ToTable("AspNetRoles", (string)null); }); modelBuilder.Entity("TeleWave.Infrastructure.Identity.AppUser", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AccessFailedCount") .HasColumnType("integer"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("text"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("Email") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("EmailConfirmed") .HasColumnType("boolean"); b.Property("IsBlocked") .HasColumnType("boolean"); b.Property("LockoutEnabled") .HasColumnType("boolean"); b.Property("LockoutEnd") .HasColumnType("timestamp with time zone"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("PasswordHash") .HasColumnType("text"); b.Property("PhoneNumber") .HasColumnType("text"); b.Property("PhoneNumberConfirmed") .HasColumnType("boolean"); b.Property("SecurityStamp") .HasColumnType("text"); b.Property("TwoFactorEnabled") .HasColumnType("boolean"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("character varying(256)"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex"); b.ToTable("AspNetUsers", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("TeleWave.Infrastructure.Identity.AppRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("TeleWave.Infrastructure.Identity.AppUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("TeleWave.Infrastructure.Identity.AppUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("TeleWave.Infrastructure.Identity.AppRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("TeleWave.Infrastructure.Identity.AppUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("TeleWave.Infrastructure.Identity.AppUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ChannelAd", b => { b.HasOne("TeleWave.Domain.Broadcast.Channel", null) .WithMany("Ads") .HasForeignKey("ChannelId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ChannelShow", b => { b.HasOne("TeleWave.Domain.Broadcast.Channel", null) .WithMany("Shows") .HasForeignKey("ChannelId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.OverrideShow", b => { b.HasOne("TeleWave.Domain.Broadcast.ProgrammingOverride", null) .WithMany("Shows") .HasForeignKey("ProgrammingOverrideId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ProgrammingOverride", b => { b.HasOne("TeleWave.Domain.Broadcast.Channel", null) .WithMany("Overrides") .HasForeignKey("ChannelId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TeleWave.Domain.Library.ShowEpisode", b => { b.HasOne("TeleWave.Domain.Library.Show", null) .WithMany("Episodes") .HasForeignKey("ShowId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.Channel", b => { b.Navigation("Ads"); b.Navigation("Overrides"); b.Navigation("Shows"); }); modelBuilder.Entity("TeleWave.Domain.Broadcast.ProgrammingOverride", b => { b.Navigation("Shows"); }); modelBuilder.Entity("TeleWave.Domain.Library.Show", b => { b.Navigation("Episodes"); }); #pragma warning restore 612, 618 } } }