// 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.Data.Migrations { [DbContext(typeof(ContentDbContext))] [Migration("20250526174825_AddThumbnailUrlToPhoto")] partial class AddThumbnailUrlToPhoto { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("Content") .HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Album", 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("IsDeleted") .ValueGeneratedOnAddOrUpdate() .HasColumnType("boolean") .HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true); b.Property("Title") .IsRequired() .HasMaxLength(255) .HasColumnType("character varying(255)"); b.HasKey("Id"); b.ToTable("Albums", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.AlbumPhoto", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AlbumId") .HasColumnType("uuid"); b.Property("Caption") .HasMaxLength(255) .HasColumnType("character varying(255)"); 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("IsDeleted") .ValueGeneratedOnAddOrUpdate() .HasColumnType("boolean") .HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true); b.Property("Order") .HasColumnType("integer"); b.Property("OriginalUrl") .IsRequired() .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("ThumbnailUrl") .IsRequired() .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.HasKey("Id"); b.HasIndex("AlbumId"); b.ToTable("AlbumPhotos", "Content"); }); 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("CreatorId") .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("HtmlFileUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("ThumbnailUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("Title") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.PrimitiveCollection("Urls") .HasColumnType("text[]"); b.HasKey("Id"); b.HasIndex("CreatorId"); b.ToTable("Contents", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AcceptDonation") .HasColumnType("boolean"); b.Property("BannerUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone"); b.Property("CreatedBy") .HasColumnType("uuid"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone"); b.Property("DeletedBy") .HasColumnType("uuid"); b.Property("IsDeleted") .ValueGeneratedOnAddOrUpdate() .HasColumnType("boolean") .HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true); b.Property("Name") .IsRequired() .HasMaxLength(255) .HasColumnType("character varying(255)"); b.Property("PortraitUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.Property("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)"); b.Property("Title") .HasMaxLength(255) .HasColumnType("character varying(255)"); b.Property("Verified") .HasColumnType("boolean"); b.HasKey("Id"); b.ToTable("Creators", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Slugs", 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(128) .HasColumnType("character varying(128)"); b.Property("NormalizedName") .IsRequired() .ValueGeneratedOnAddOrUpdate() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasComputedColumnSql("LOWER( \"Content\".\"Slugs\".\"Name\")", true); b.Property("ReservedUntil") .HasColumnType("timestamp with time zone"); b.Property("UsedBy") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique(); b.ToTable("Slugs", "Content"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.AlbumPhoto", b => { b.HasOne("Hutopy.Web.Features.Contents.Data.Album", "Album") .WithMany("Photos") .HasForeignKey("AlbumId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Album"); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Content", b => { b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator") .WithMany() .HasForeignKey("CreatorId"); 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("Reactions", "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.Presentation", "Presentation", b1 => { b1.Property("CreatorId") .HasColumnType("uuid"); b1.Property("Description") .IsRequired() .HasColumnType("text"); b1.Property("Email") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("PhoneNumber") .HasMaxLength(255) .HasColumnType("character varying(255)"); b1.Property("VideoUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.HasKey("CreatorId"); b1.ToTable("Presentation", "Content"); b1.WithOwner() .HasForeignKey("CreatorId"); }); b.OwnsOne("Hutopy.Web.Features.Contents.Data.Socials", "Socials", b1 => { b1.Property("CreatorId") .HasColumnType("uuid"); b1.Property("FacebookUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("InstagramUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("LinkedInUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("RedditUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("TikTokUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("WebsiteUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("XUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.Property("YoutubeUrl") .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b1.HasKey("CreatorId"); b1.ToTable("Socials", "Content"); b1.WithOwner() .HasForeignKey("CreatorId"); }); b.Navigation("Presentation") .IsRequired(); b.Navigation("Socials") .IsRequired(); }); modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Album", b => { b.Navigation("Photos"); }); #pragma warning restore 612, 618 } } }