// using System; using System.Collections.Generic; using DysonNetwork.Sphere; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using NodaTime; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DysonNetwork.Sphere.Migrations { [DbContext(typeof(AppDatabase))] partial class AppDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("DysonNetwork.Sphere.Account.Account", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("IsSuperuser") .HasColumnType("boolean") .HasColumnName("is_superuser"); b.Property("Language") .IsRequired() .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("language"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property("Nick") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("nick"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_accounts"); b.HasIndex("Name") .IsUnique() .HasDatabaseName("ix_accounts_name"); b.ToTable("accounts", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountAuthFactor", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Secret") .HasColumnType("text") .HasColumnName("secret"); b.Property("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_account_auth_factors"); b.HasIndex("AccountId") .HasDatabaseName("ix_account_auth_factors_account_id"); b.ToTable("account_auth_factors", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountContact", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("Content") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("content"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("VerifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("verified_at"); b.HasKey("Id") .HasName("pk_account_contacts"); b.HasIndex("AccountId") .HasDatabaseName("ix_account_contacts_account_id"); b.ToTable("account_contacts", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Profile", b => { b.Property("Id") .HasColumnType("bigint") .HasColumnName("id"); b.Property("BackgroundId") .HasColumnType("text") .HasColumnName("background_id"); b.Property("Bio") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("bio"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("FirstName") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("first_name"); b.Property("LastName") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("last_name"); b.Property("MiddleName") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("middle_name"); b.Property("PictureId") .HasColumnType("text") .HasColumnName("picture_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_account_profiles"); b.HasIndex("BackgroundId") .HasDatabaseName("ix_account_profiles_background_id"); b.HasIndex("PictureId") .HasDatabaseName("ix_account_profiles_picture_id"); b.ToTable("account_profiles", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Relationship", b => { b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("RelatedId") .HasColumnType("bigint") .HasColumnName("related_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("AccountId", "RelatedId") .HasName("pk_account_relationships"); b.HasIndex("RelatedId") .HasDatabaseName("ix_account_relationships_related_id"); b.ToTable("account_relationships", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Auth.Challenge", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property>("Audiences") .IsRequired() .HasColumnType("jsonb") .HasColumnName("audiences"); b.Property>("BlacklistFactors") .IsRequired() .HasColumnType("jsonb") .HasColumnName("blacklist_factors"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("DeviceId") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("device_id"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("IpAddress") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("ip_address"); b.Property("Nonce") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("nonce"); b.Property>("Scopes") .IsRequired() .HasColumnType("jsonb") .HasColumnName("scopes"); b.Property("StepRemain") .HasColumnType("integer") .HasColumnName("step_remain"); b.Property("StepTotal") .HasColumnType("integer") .HasColumnName("step_total"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UserAgent") .HasMaxLength(512) .HasColumnType("character varying(512)") .HasColumnName("user_agent"); b.HasKey("Id") .HasName("pk_auth_challenges"); b.HasIndex("AccountId") .HasDatabaseName("ix_auth_challenges_account_id"); b.ToTable("auth_challenges", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Auth.Session", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("ChallengeId") .HasColumnType("uuid") .HasColumnName("challenge_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("LastGrantedAt") .HasColumnType("timestamp with time zone") .HasColumnName("last_granted_at"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_auth_sessions"); b.HasIndex("AccountId") .HasDatabaseName("ix_auth_sessions_account_id"); b.HasIndex("ChallengeId") .HasDatabaseName("ix_auth_sessions_challenge_id"); b.ToTable("auth_sessions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Content") .HasColumnType("text") .HasColumnName("content"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property("Downvotes") .HasColumnType("integer") .HasColumnName("downvotes"); b.Property("EditedAt") .HasColumnType("timestamp with time zone") .HasColumnName("edited_at"); b.Property("ForwardedPostId") .HasColumnType("bigint") .HasColumnName("forwarded_post_id"); b.Property("Language") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("language"); b.Property>("Meta") .HasColumnType("jsonb") .HasColumnName("meta"); b.Property("PublishedAt") .HasColumnType("timestamp with time zone") .HasColumnName("published_at"); b.Property("PublisherId") .HasColumnType("bigint") .HasColumnName("publisher_id"); b.Property("RepliedPostId") .HasColumnType("bigint") .HasColumnName("replied_post_id"); b.Property("ThreadedPostId") .HasColumnType("bigint") .HasColumnName("threaded_post_id"); b.Property("Title") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("title"); b.Property("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("Upvotes") .HasColumnType("integer") .HasColumnName("upvotes"); b.Property("ViewsTotal") .HasColumnType("integer") .HasColumnName("views_total"); b.Property("ViewsUnique") .HasColumnType("integer") .HasColumnName("views_unique"); b.Property("Visibility") .HasColumnType("integer") .HasColumnName("visibility"); b.HasKey("Id") .HasName("pk_posts"); b.HasIndex("ForwardedPostId") .HasDatabaseName("ix_posts_forwarded_post_id"); b.HasIndex("PublisherId") .HasDatabaseName("ix_posts_publisher_id"); b.HasIndex("RepliedPostId") .HasDatabaseName("ix_posts_replied_post_id"); b.HasIndex("ThreadedPostId") .IsUnique() .HasDatabaseName("ix_posts_threaded_post_id"); b.ToTable("posts", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCategory", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Name") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_post_categories"); b.ToTable("post_categories", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCollection", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property("Name") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property("PublisherId") .HasColumnType("bigint") .HasColumnName("publisher_id"); b.Property("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_post_collections"); b.HasIndex("PublisherId") .HasDatabaseName("ix_post_collections_publisher_id"); b.ToTable("post_collections", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostReaction", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("Attitude") .HasColumnType("integer") .HasColumnName("attitude"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("PostId") .HasColumnType("bigint") .HasColumnName("post_id"); b.Property("Symbol") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("symbol"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_post_reactions"); b.HasIndex("AccountId") .HasDatabaseName("ix_post_reactions_account_id"); b.HasIndex("PostId") .HasDatabaseName("ix_post_reactions_post_id"); b.ToTable("post_reactions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostTag", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Name") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_post_tags"); b.ToTable("post_tags", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Publisher", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("bigint") .HasColumnName("id"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("BackgroundId") .HasColumnType("text") .HasColumnName("background_id"); b.Property("Bio") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("bio"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property("Nick") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("nick"); b.Property("PictureId") .HasColumnType("text") .HasColumnName("picture_id"); b.Property("PublisherType") .HasColumnType("integer") .HasColumnName("publisher_type"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_publishers"); b.HasIndex("AccountId") .HasDatabaseName("ix_publishers_account_id"); b.HasIndex("BackgroundId") .HasDatabaseName("ix_publishers_background_id"); b.HasIndex("Name") .IsUnique() .HasDatabaseName("ix_publishers_name"); b.HasIndex("PictureId") .HasDatabaseName("ix_publishers_picture_id"); b.ToTable("publishers", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PublisherMember", b => { b.Property("PublisherId") .HasColumnType("bigint") .HasColumnName("publisher_id"); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("JoinedAt") .HasColumnType("timestamp with time zone") .HasColumnName("joined_at"); b.Property("Role") .HasColumnType("integer") .HasColumnName("role"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("PublisherId", "AccountId") .HasName("pk_publisher_members"); b.HasIndex("AccountId") .HasDatabaseName("ix_publisher_members_account_id"); b.ToTable("publisher_members", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b => { b.Property("Id") .HasColumnType("text") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("bigint") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property>("FileMeta") .HasColumnType("jsonb") .HasColumnName("file_meta"); b.Property("Hash") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("hash"); b.Property("MimeType") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("mime_type"); b.Property("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property("PostId") .HasColumnType("bigint") .HasColumnName("post_id"); b.Property("Size") .HasColumnType("bigint") .HasColumnName("size"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UploadedAt") .HasColumnType("timestamp with time zone") .HasColumnName("uploaded_at"); b.Property("UploadedTo") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("uploaded_to"); b.Property("UsedCount") .HasColumnType("integer") .HasColumnName("used_count"); b.Property>("UserMeta") .HasColumnType("jsonb") .HasColumnName("user_meta"); b.HasKey("Id") .HasName("pk_files"); b.HasIndex("AccountId") .HasDatabaseName("ix_files_account_id"); b.HasIndex("PostId") .HasDatabaseName("ix_files_post_id"); b.ToTable("files", (string)null); }); modelBuilder.Entity("PostPostCategory", b => { b.Property("CategoriesId") .HasColumnType("bigint") .HasColumnName("categories_id"); b.Property("PostsId") .HasColumnType("bigint") .HasColumnName("posts_id"); b.HasKey("CategoriesId", "PostsId") .HasName("pk_post_category_links"); b.HasIndex("PostsId") .HasDatabaseName("ix_post_category_links_posts_id"); b.ToTable("post_category_links", (string)null); }); modelBuilder.Entity("PostPostCollection", b => { b.Property("CollectionsId") .HasColumnType("bigint") .HasColumnName("collections_id"); b.Property("PostsId") .HasColumnType("bigint") .HasColumnName("posts_id"); b.HasKey("CollectionsId", "PostsId") .HasName("pk_post_collection_links"); b.HasIndex("PostsId") .HasDatabaseName("ix_post_collection_links_posts_id"); b.ToTable("post_collection_links", (string)null); }); modelBuilder.Entity("PostPostTag", b => { b.Property("PostsId") .HasColumnType("bigint") .HasColumnName("posts_id"); b.Property("TagsId") .HasColumnType("bigint") .HasColumnName("tags_id"); b.HasKey("PostsId", "TagsId") .HasName("pk_post_tag_links"); b.HasIndex("TagsId") .HasDatabaseName("ix_post_tag_links_tags_id"); b.ToTable("post_tag_links", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountAuthFactor", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("AuthFactors") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_auth_factors_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.AccountContact", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("Contacts") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_contacts_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Profile", b => { b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Background") .WithMany() .HasForeignKey("BackgroundId") .HasConstraintName("fk_account_profiles_files_background_id"); b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithOne("Profile") .HasForeignKey("DysonNetwork.Sphere.Account.Profile", "Id") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_profiles_accounts_id"); b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Picture") .WithMany() .HasForeignKey("PictureId") .HasConstraintName("fk_account_profiles_files_picture_id"); b.Navigation("Account"); b.Navigation("Background"); b.Navigation("Picture"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Relationship", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("OutgoingRelationships") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_relationships_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Account.Account", "Related") .WithMany("IncomingRelationships") .HasForeignKey("RelatedId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_relationships_accounts_related_id"); b.Navigation("Account"); b.Navigation("Related"); }); modelBuilder.Entity("DysonNetwork.Sphere.Auth.Challenge", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("Challenges") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_auth_challenges_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Auth.Session", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("Sessions") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_auth_sessions_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Auth.Challenge", "Challenge") .WithMany() .HasForeignKey("ChallengeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); b.Navigation("Account"); b.Navigation("Challenge"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b => { b.HasOne("DysonNetwork.Sphere.Post.Post", "ForwardedPost") .WithMany() .HasForeignKey("ForwardedPostId") .OnDelete(DeleteBehavior.Restrict) .HasConstraintName("fk_posts_posts_forwarded_post_id"); b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher") .WithMany("Posts") .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_posts_publishers_publisher_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", "RepliedPost") .WithMany() .HasForeignKey("RepliedPostId") .OnDelete(DeleteBehavior.Restrict) .HasConstraintName("fk_posts_posts_replied_post_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", "ThreadedPost") .WithOne() .HasForeignKey("DysonNetwork.Sphere.Post.Post", "ThreadedPostId") .HasConstraintName("fk_posts_posts_threaded_post_id"); b.Navigation("ForwardedPost"); b.Navigation("Publisher"); b.Navigation("RepliedPost"); b.Navigation("ThreadedPost"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCollection", b => { b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher") .WithMany("Collections") .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_collections_publishers_publisher_id"); b.Navigation("Publisher"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostReaction", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_reactions_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", "Post") .WithMany("Reactions") .HasForeignKey("PostId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_reactions_posts_post_id"); b.Navigation("Account"); b.Navigation("Post"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Publisher", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .HasConstraintName("fk_publishers_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Background") .WithMany() .HasForeignKey("BackgroundId") .HasConstraintName("fk_publishers_files_background_id"); b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "Picture") .WithMany() .HasForeignKey("PictureId") .HasConstraintName("fk_publishers_files_picture_id"); b.Navigation("Account"); b.Navigation("Background"); b.Navigation("Picture"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PublisherMember", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_publisher_members_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Post.Publisher", "Publisher") .WithMany("Members") .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_publisher_members_publishers_publisher_id"); b.Navigation("Account"); b.Navigation("Publisher"); }); modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_files_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", null) .WithMany("Attachments") .HasForeignKey("PostId") .HasConstraintName("fk_files_posts_post_id"); b.Navigation("Account"); }); modelBuilder.Entity("PostPostCategory", b => { b.HasOne("DysonNetwork.Sphere.Post.PostCategory", null) .WithMany() .HasForeignKey("CategoriesId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_category_links_post_categories_categories_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", null) .WithMany() .HasForeignKey("PostsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_category_links_posts_posts_id"); }); modelBuilder.Entity("PostPostCollection", b => { b.HasOne("DysonNetwork.Sphere.Post.PostCollection", null) .WithMany() .HasForeignKey("CollectionsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_collection_links_post_collections_collections_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", null) .WithMany() .HasForeignKey("PostsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_collection_links_posts_posts_id"); }); modelBuilder.Entity("PostPostTag", b => { b.HasOne("DysonNetwork.Sphere.Post.Post", null) .WithMany() .HasForeignKey("PostsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_tag_links_posts_posts_id"); b.HasOne("DysonNetwork.Sphere.Post.PostTag", null) .WithMany() .HasForeignKey("TagsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_post_tag_links_post_tags_tags_id"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Account", b => { b.Navigation("AuthFactors"); b.Navigation("Challenges"); b.Navigation("Contacts"); b.Navigation("IncomingRelationships"); b.Navigation("OutgoingRelationships"); b.Navigation("Profile") .IsRequired(); b.Navigation("Sessions"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b => { b.Navigation("Attachments"); b.Navigation("Reactions"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Publisher", b => { b.Navigation("Collections"); b.Navigation("Members"); b.Navigation("Posts"); }); #pragma warning restore 612, 618 } } }