397 lines
15 KiB
C#
397 lines
15 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Hutopy.Web.Features.Contents.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Hutopy.Web.Features.Contents.Data.Migrations
|
|
{
|
|
[DbContext(typeof(ContentDbContext))]
|
|
partial class ContentDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("boolean")
|
|
.HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true);
|
|
|
|
b.Property<string>("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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("AlbumId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Caption")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("boolean")
|
|
.HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true);
|
|
|
|
b.Property<int>("Order")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("PhotoUrl")
|
|
.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<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("CURRENT_TIMESTAMP");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("CreatorId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<string>("HtmlFileUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<string>("ThumbnailUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)");
|
|
|
|
b.PrimitiveCollection<string[]>("Urls")
|
|
.HasColumnType("text[]");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CreatorId");
|
|
|
|
b.ToTable("Contents", "Content");
|
|
});
|
|
|
|
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Creator", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("AcceptDonation")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("BannerUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("DeletedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("boolean")
|
|
.HasComputedColumnSql("\"DeletedAt\" IS NOT NULL", true);
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)");
|
|
|
|
b.Property<string>("PortraitUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)");
|
|
|
|
b.Property<string>("Title")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)");
|
|
|
|
b.Property<bool>("Verified")
|
|
.HasColumnType("boolean");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Creators", "Content");
|
|
});
|
|
|
|
modelBuilder.Entity("Hutopy.Web.Features.Contents.Data.Slugs", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.IsRequired()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("character varying(128)")
|
|
.HasComputedColumnSql("LOWER( \"Content\".\"Slugs\".\"Name\")", true);
|
|
|
|
b.Property<DateTimeOffset>("ReservedUntil")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("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<Guid>("ContentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b1.Property<int>("Id"));
|
|
|
|
b1.Property<int>("Reaction")
|
|
.HasColumnType("integer");
|
|
|
|
b1.Property<Guid>("UserId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<string>("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<Guid>("CreatorId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasMaxLength(2000)
|
|
.HasColumnType("character varying(2000)");
|
|
|
|
b1.Property<string>("Email")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)");
|
|
|
|
b1.Property<string>("PhoneNumber")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("character varying(255)");
|
|
|
|
b1.Property<string>("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<Guid>("CreatorId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<string>("FacebookUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("InstagramUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("LinkedInUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("RedditUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("TikTokUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("WebsiteUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("XUrl")
|
|
.HasMaxLength(2048)
|
|
.HasColumnType("character varying(2048)");
|
|
|
|
b1.Property<string>("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
|
|
}
|
|
}
|
|
}
|