// using System; using Hutopy.Web.Features.Contents.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Hutopy.Web.Features.Contents.Migrations { [DbContext(typeof(ContentDbContext))] [Migration("20240922064815_RemovesAboutAddsTitle")] partial class RemovesAboutAddsTitle { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("Content") .HasAnnotation("ProductVersion", "8.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("CURRENT_TIMESTAMP"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property("DeletedBy") .HasColumnType("uuid"); b.Property("Description") .IsRequired() .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("Title") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Urls") .HasColumnType("text[]"); b.HasKey("Id"); b.HasIndex("CreatedBy"); b.ToTable("Contents", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasMaxLength(255) .HasColumnType("character varying(255)"); b.Property("Title") .HasMaxLength(255) .HasColumnType("character varying(255)"); b.HasKey("Id"); b.ToTable("Creators", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b => { b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("CreatorId") .HasColumnType("uuid"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("CreatedBy", "CreatorId"); b.HasIndex("CreatorId"); b.ToTable("Subscriptions", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b => { b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator") .WithMany() .HasForeignKey("CreatedBy") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 => { b1.Property("ContentId") .HasColumnType("uuid"); b1.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property("Id")); b1.Property("Reaction") .HasColumnType("integer"); b1.Property("UserId") .HasColumnType("uuid"); b1.Property("UserName") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b1.HasKey("ContentId", "Id"); b1.ToTable("ContentReactions", "Content"); b1.WithOwner() .HasForeignKey("ContentId"); }); b.Navigation("Creator"); b.Navigation("Reactions"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b => { b.OwnsOne("Hutopy.Web.Features.Contents.Data.Colors", "Colors", b1 => { b1.Property("CreatorId") .HasColumnType("uuid"); b1.Property("Background") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("Error") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("OnBackground") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("OnError") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("OnPrimary") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("OnSecondary") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("OnSurface") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("Primary") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("Secondary") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.Property("Surface") .IsRequired() .HasMaxLength(9) .HasColumnType("character varying(9)"); b1.HasKey("CreatorId"); b1.ToTable("Colors", "Content"); b1.WithOwner() .HasForeignKey("CreatorId"); }); b.OwnsOne("Hutopy.Web.Features.Contents.Data.Images", "Images", b1 => { b1.Property("CreatorId") .HasColumnType("uuid"); b1.Property("Banner") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("Logo") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.HasKey("CreatorId"); b1.ToTable("Images", "Content"); b1.WithOwner() .HasForeignKey("CreatorId"); }); b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 => { b1.Property("CreatorId") .HasColumnType("uuid"); b1.Property("FacebookUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("InstagramUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("LinkedInUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("RedditUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("TikTokUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("WebsiteUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("XUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("YoutubeUrl") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.HasKey("CreatorId"); b1.ToTable("Socials", "Content"); b1.WithOwner() .HasForeignKey("CreatorId"); }); b.Navigation("Colors") .IsRequired(); b.Navigation("Images") .IsRequired(); b.Navigation("Socials") .IsRequired(); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Subscription", b => { b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator") .WithMany() .HasForeignKey("CreatorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Creator"); }); #pragma warning restore 612, 618 } } }