// <auto-generated /> using System; using System.Collections.Generic; using System.Text.Json; using DysonNetwork.Sphere; using DysonNetwork.Sphere.Account; using DysonNetwork.Sphere.Chat; using DysonNetwork.Sphere.Storage; using DysonNetwork.Sphere.Wallet; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using NetTopologySuite.Geometries; using NodaTime; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using NpgsqlTypes; #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.HasPostgresExtension(modelBuilder, "postgis"); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("DysonNetwork.Sphere.Account.Account", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant?>("ActivatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("activated_at"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<bool>("IsSuperuser") .HasColumnType("boolean") .HasColumnName("is_superuser"); b.Property<string>("Language") .IsRequired() .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("language"); b.Property<string>("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property<string>("Nick") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("nick"); b.Property<Instant>("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<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Dictionary<string, object>>("Config") .HasColumnType("jsonb") .HasColumnName("config"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("EnabledAt") .HasColumnType("timestamp with time zone") .HasColumnName("enabled_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("Secret") .HasMaxLength(8196) .HasColumnType("character varying(8196)") .HasColumnName("secret"); b.Property<int>("Trustworthy") .HasColumnType("integer") .HasColumnName("trustworthy"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("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<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<string>("Content") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("content"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<bool>("IsPrimary") .HasColumnType("boolean") .HasColumnName("is_primary"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<Instant?>("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.ActionLog", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<string>("Action") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("action"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("IpAddress") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("ip_address"); b.Property<Point>("Location") .HasColumnType("geometry") .HasColumnName("location"); b.Property<Dictionary<string, object>>("Meta") .IsRequired() .HasColumnType("jsonb") .HasColumnName("meta"); b.Property<Guid?>("SessionId") .HasColumnType("uuid") .HasColumnName("session_id"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<string>("UserAgent") .HasMaxLength(512) .HasColumnType("character varying(512)") .HasColumnName("user_agent"); b.HasKey("Id") .HasName("pk_action_logs"); b.HasIndex("AccountId") .HasDatabaseName("ix_action_logs_account_id"); b.HasIndex("SessionId") .HasDatabaseName("ix_action_logs_session_id"); b.ToTable("action_logs", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Badge", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant?>("ActivatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("activated_at"); b.Property<string>("Caption") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("caption"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("Label") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("label"); b.Property<Dictionary<string, object>>("Meta") .IsRequired() .HasColumnType("jsonb") .HasColumnName("meta"); b.Property<string>("Type") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_badges"); b.HasIndex("AccountId") .HasDatabaseName("ix_badges_account_id"); b.ToTable("badges", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.CheckInResult", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<int>("Level") .HasColumnType("integer") .HasColumnName("level"); b.Property<int?>("RewardExperience") .HasColumnType("integer") .HasColumnName("reward_experience"); b.Property<decimal?>("RewardPoints") .HasColumnType("numeric") .HasColumnName("reward_points"); b.Property<ICollection<FortuneTip>>("Tips") .IsRequired() .HasColumnType("jsonb") .HasColumnName("tips"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_account_check_in_results"); b.HasIndex("AccountId") .HasDatabaseName("ix_account_check_in_results_account_id"); b.ToTable("account_check_in_results", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.MagicSpell", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid?>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant?>("AffectedAt") .HasColumnType("timestamp with time zone") .HasColumnName("affected_at"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiresAt") .HasColumnType("timestamp with time zone") .HasColumnName("expires_at"); b.Property<Dictionary<string, object>>("Meta") .IsRequired() .HasColumnType("jsonb") .HasColumnName("meta"); b.Property<string>("Spell") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("spell"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_magic_spells"); b.HasIndex("AccountId") .HasDatabaseName("ix_magic_spells_account_id"); b.HasIndex("Spell") .IsUnique() .HasDatabaseName("ix_magic_spells_spell"); b.ToTable("magic_spells", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Notification", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<string>("Content") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("content"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Dictionary<string, object>>("Meta") .HasColumnType("jsonb") .HasColumnName("meta"); b.Property<int>("Priority") .HasColumnType("integer") .HasColumnName("priority"); b.Property<string>("Subtitle") .HasMaxLength(2048) .HasColumnType("character varying(2048)") .HasColumnName("subtitle"); b.Property<string>("Title") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("title"); b.Property<string>("Topic") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("topic"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<Instant?>("ViewedAt") .HasColumnType("timestamp with time zone") .HasColumnName("viewed_at"); b.HasKey("Id") .HasName("pk_notifications"); b.HasIndex("AccountId") .HasDatabaseName("ix_notifications_account_id"); b.ToTable("notifications", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.NotificationPushSubscription", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("DeviceId") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("device_id"); b.Property<string>("DeviceToken") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("device_token"); b.Property<Instant?>("LastUsedAt") .HasColumnType("timestamp with time zone") .HasColumnName("last_used_at"); b.Property<int>("Provider") .HasColumnType("integer") .HasColumnName("provider"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_notification_push_subscriptions"); b.HasIndex("AccountId") .HasDatabaseName("ix_notification_push_subscriptions_account_id"); b.HasIndex("DeviceToken", "DeviceId", "AccountId") .IsUnique() .HasDatabaseName("ix_notification_push_subscriptions_device_token_device_id_acco"); b.ToTable("notification_push_subscriptions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Profile", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<BadgeReferenceObject>("ActiveBadge") .HasColumnType("jsonb") .HasColumnName("active_badge"); b.Property<CloudFileReferenceObject>("Background") .HasColumnType("jsonb") .HasColumnName("background"); b.Property<string>("BackgroundId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("background_id"); b.Property<string>("Bio") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("bio"); b.Property<Instant?>("Birthday") .HasColumnType("timestamp with time zone") .HasColumnName("birthday"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<int>("Experience") .HasColumnType("integer") .HasColumnName("experience"); b.Property<string>("FirstName") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("first_name"); b.Property<string>("Gender") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("gender"); b.Property<string>("LastName") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("last_name"); b.Property<Instant?>("LastSeenAt") .HasColumnType("timestamp with time zone") .HasColumnName("last_seen_at"); b.Property<string>("Location") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("location"); b.Property<string>("MiddleName") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("middle_name"); b.Property<CloudFileReferenceObject>("Picture") .HasColumnType("jsonb") .HasColumnName("picture"); b.Property<string>("PictureId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("picture_id"); b.Property<string>("Pronouns") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("pronouns"); b.Property<SubscriptionReferenceObject>("StellarMembership") .HasColumnType("jsonb") .HasColumnName("stellar_membership"); b.Property<string>("TimeZone") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("time_zone"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<VerificationMark>("Verification") .HasColumnType("jsonb") .HasColumnName("verification"); b.HasKey("Id") .HasName("pk_account_profiles"); b.HasIndex("AccountId") .IsUnique() .HasDatabaseName("ix_account_profiles_account_id"); b.ToTable("account_profiles", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Relationship", b => { b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Guid>("RelatedId") .HasColumnType("uuid") .HasColumnName("related_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<short>("Status") .HasColumnType("smallint") .HasColumnName("status"); b.Property<Instant>("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.Account.Status", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<int>("Attitude") .HasColumnType("integer") .HasColumnName("attitude"); b.Property<Instant?>("ClearedAt") .HasColumnType("timestamp with time zone") .HasColumnName("cleared_at"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<bool>("IsInvisible") .HasColumnType("boolean") .HasColumnName("is_invisible"); b.Property<bool>("IsNotDisturb") .HasColumnType("boolean") .HasColumnName("is_not_disturb"); b.Property<string>("Label") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("label"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_account_statuses"); b.HasIndex("AccountId") .HasDatabaseName("ix_account_statuses_account_id"); b.ToTable("account_statuses", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Auth.Challenge", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<List<string>>("Audiences") .IsRequired() .HasColumnType("jsonb") .HasColumnName("audiences"); b.Property<List<Guid>>("BlacklistFactors") .IsRequired() .HasColumnType("jsonb") .HasColumnName("blacklist_factors"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("DeviceId") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("device_id"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<int>("FailedAttempts") .HasColumnType("integer") .HasColumnName("failed_attempts"); b.Property<string>("IpAddress") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("ip_address"); b.Property<Point>("Location") .HasColumnType("geometry") .HasColumnName("location"); b.Property<string>("Nonce") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("nonce"); b.Property<int>("Platform") .HasColumnType("integer") .HasColumnName("platform"); b.Property<List<string>>("Scopes") .IsRequired() .HasColumnType("jsonb") .HasColumnName("scopes"); b.Property<int>("StepRemain") .HasColumnType("integer") .HasColumnName("step_remain"); b.Property<int>("StepTotal") .HasColumnType("integer") .HasColumnName("step_total"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<string>("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<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Guid>("ChallengeId") .HasColumnType("uuid") .HasColumnName("challenge_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("Label") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("label"); b.Property<Instant?>("LastGrantedAt") .HasColumnType("timestamp with time zone") .HasColumnName("last_granted_at"); b.Property<Instant>("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.Chat.ChatMember", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant?>("BreakUntil") .HasColumnType("timestamp with time zone") .HasColumnName("break_until"); b.Property<Guid>("ChatRoomId") .HasColumnType("uuid") .HasColumnName("chat_room_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<bool>("IsBot") .HasColumnType("boolean") .HasColumnName("is_bot"); b.Property<Instant?>("JoinedAt") .HasColumnType("timestamp with time zone") .HasColumnName("joined_at"); b.Property<Instant?>("LastReadAt") .HasColumnType("timestamp with time zone") .HasColumnName("last_read_at"); b.Property<Instant?>("LeaveAt") .HasColumnType("timestamp with time zone") .HasColumnName("leave_at"); b.Property<string>("Nick") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("nick"); b.Property<int>("Notify") .HasColumnType("integer") .HasColumnName("notify"); b.Property<int>("Role") .HasColumnType("integer") .HasColumnName("role"); b.Property<ChatTimeoutCause>("TimeoutCause") .HasColumnType("jsonb") .HasColumnName("timeout_cause"); b.Property<Instant?>("TimeoutUntil") .HasColumnType("timestamp with time zone") .HasColumnName("timeout_until"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_chat_members"); b.HasAlternateKey("ChatRoomId", "AccountId") .HasName("ak_chat_members_chat_room_id_account_id"); b.HasIndex("AccountId") .HasDatabaseName("ix_chat_members_account_id"); b.ToTable("chat_members", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatRoom", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<CloudFileReferenceObject>("Background") .HasColumnType("jsonb") .HasColumnName("background"); b.Property<string>("BackgroundId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("background_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property<bool>("IsCommunity") .HasColumnType("boolean") .HasColumnName("is_community"); b.Property<bool>("IsPublic") .HasColumnType("boolean") .HasColumnName("is_public"); b.Property<string>("Name") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property<CloudFileReferenceObject>("Picture") .HasColumnType("jsonb") .HasColumnName("picture"); b.Property<string>("PictureId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("picture_id"); b.Property<Guid?>("RealmId") .HasColumnType("uuid") .HasColumnName("realm_id"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_chat_rooms"); b.HasIndex("RealmId") .HasDatabaseName("ix_chat_rooms_realm_id"); b.ToTable("chat_rooms", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.Message", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<List<CloudFileReferenceObject>>("Attachments") .IsRequired() .HasColumnType("jsonb") .HasColumnName("attachments"); b.Property<Guid>("ChatRoomId") .HasColumnType("uuid") .HasColumnName("chat_room_id"); b.Property<string>("Content") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("content"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("EditedAt") .HasColumnType("timestamp with time zone") .HasColumnName("edited_at"); b.Property<Guid?>("ForwardedMessageId") .HasColumnType("uuid") .HasColumnName("forwarded_message_id"); b.Property<List<Guid>>("MembersMentioned") .HasColumnType("jsonb") .HasColumnName("members_mentioned"); b.Property<Dictionary<string, object>>("Meta") .HasColumnType("jsonb") .HasColumnName("meta"); b.Property<string>("Nonce") .IsRequired() .HasMaxLength(36) .HasColumnType("character varying(36)") .HasColumnName("nonce"); b.Property<Guid?>("RepliedMessageId") .HasColumnType("uuid") .HasColumnName("replied_message_id"); b.Property<Guid>("SenderId") .HasColumnType("uuid") .HasColumnName("sender_id"); b.Property<string>("Type") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_chat_messages"); b.HasIndex("ChatRoomId") .HasDatabaseName("ix_chat_messages_chat_room_id"); b.HasIndex("ForwardedMessageId") .HasDatabaseName("ix_chat_messages_forwarded_message_id"); b.HasIndex("RepliedMessageId") .HasDatabaseName("ix_chat_messages_replied_message_id"); b.HasIndex("SenderId") .HasDatabaseName("ix_chat_messages_sender_id"); b.ToTable("chat_messages", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.MessageReaction", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<int>("Attitude") .HasColumnType("integer") .HasColumnName("attitude"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Guid>("MessageId") .HasColumnType("uuid") .HasColumnName("message_id"); b.Property<Guid>("SenderId") .HasColumnType("uuid") .HasColumnName("sender_id"); b.Property<string>("Symbol") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("symbol"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_chat_reactions"); b.HasIndex("MessageId") .HasDatabaseName("ix_chat_reactions_message_id"); b.HasIndex("SenderId") .HasDatabaseName("ix_chat_reactions_sender_id"); b.ToTable("chat_reactions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.RealtimeCall", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("EndedAt") .HasColumnType("timestamp with time zone") .HasColumnName("ended_at"); b.Property<string>("ProviderName") .HasColumnType("text") .HasColumnName("provider_name"); b.Property<Guid>("RoomId") .HasColumnType("uuid") .HasColumnName("room_id"); b.Property<Guid>("SenderId") .HasColumnType("uuid") .HasColumnName("sender_id"); b.Property<string>("SessionId") .HasColumnType("text") .HasColumnName("session_id"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<string>("UpstreamConfigJson") .HasColumnType("jsonb") .HasColumnName("upstream"); b.HasKey("Id") .HasName("pk_chat_realtime_call"); b.HasIndex("RoomId") .HasDatabaseName("ix_chat_realtime_call_room_id"); b.HasIndex("SenderId") .HasDatabaseName("ix_chat_realtime_call_sender_id"); b.ToTable("chat_realtime_call", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Developer.CustomApp", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<string>("Slug") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("slug"); b.Property<int>("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<string>("VerifiedAs") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("verified_as"); b.Property<Instant?>("VerifiedAt") .HasColumnType("timestamp with time zone") .HasColumnName("verified_at"); b.HasKey("Id") .HasName("pk_custom_apps"); b.HasIndex("PublisherId") .HasDatabaseName("ix_custom_apps_publisher_id"); b.ToTable("custom_apps", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Developer.CustomAppSecret", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AppId") .HasColumnType("uuid") .HasColumnName("app_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("Remarks") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("remarks"); b.Property<string>("Secret") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("secret"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_custom_app_secrets"); b.HasIndex("AppId") .HasDatabaseName("ix_custom_app_secrets_app_id"); b.ToTable("custom_app_secrets", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroup", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Key") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("key"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_permission_groups"); b.ToTable("permission_groups", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroupMember", b => { b.Property<Guid>("GroupId") .HasColumnType("uuid") .HasColumnName("group_id"); b.Property<string>("Actor") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("actor"); b.Property<Instant?>("AffectedAt") .HasColumnType("timestamp with time zone") .HasColumnName("affected_at"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("GroupId", "Actor") .HasName("pk_permission_group_members"); b.ToTable("permission_group_members", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionNode", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<string>("Actor") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("actor"); b.Property<Instant?>("AffectedAt") .HasColumnType("timestamp with time zone") .HasColumnName("affected_at"); b.Property<string>("Area") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("area"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<Guid?>("GroupId") .HasColumnType("uuid") .HasColumnName("group_id"); b.Property<string>("Key") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("key"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<JsonDocument>("Value") .IsRequired() .HasColumnType("jsonb") .HasColumnName("value"); b.HasKey("Id") .HasName("pk_permission_nodes"); b.HasIndex("GroupId") .HasDatabaseName("ix_permission_nodes_group_id"); b.HasIndex("Key", "Area", "Actor") .HasDatabaseName("ix_permission_nodes_key_area_actor"); b.ToTable("permission_nodes", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<List<CloudFileReferenceObject>>("Attachments") .IsRequired() .HasColumnType("jsonb") .HasColumnName("attachments"); b.Property<string>("Content") .HasColumnType("text") .HasColumnName("content"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property<int>("Downvotes") .HasColumnType("integer") .HasColumnName("downvotes"); b.Property<Instant?>("EditedAt") .HasColumnType("timestamp with time zone") .HasColumnName("edited_at"); b.Property<Guid?>("ForwardedPostId") .HasColumnType("uuid") .HasColumnName("forwarded_post_id"); b.Property<string>("Language") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("language"); b.Property<Dictionary<string, object>>("Meta") .HasColumnType("jsonb") .HasColumnName("meta"); b.Property<Instant?>("PublishedAt") .HasColumnType("timestamp with time zone") .HasColumnName("published_at"); b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<Guid?>("RepliedPostId") .HasColumnType("uuid") .HasColumnName("replied_post_id"); b.Property<NpgsqlTsVector>("SearchVector") .IsRequired() .ValueGeneratedOnAddOrUpdate() .HasColumnType("tsvector") .HasColumnName("search_vector") .HasAnnotation("Npgsql:TsVectorConfig", "simple") .HasAnnotation("Npgsql:TsVectorProperties", new[] { "Title", "Description", "Content" }); b.Property<string>("Title") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("title"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<int>("Upvotes") .HasColumnType("integer") .HasColumnName("upvotes"); b.Property<int>("ViewsTotal") .HasColumnType("integer") .HasColumnName("views_total"); b.Property<int>("ViewsUnique") .HasColumnType("integer") .HasColumnName("views_unique"); b.Property<int>("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("SearchVector") .HasDatabaseName("ix_posts_search_vector"); NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("SearchVector"), "GIN"); b.ToTable("posts", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCategory", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Name") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property<string>("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property<Instant>("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<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property<string>("Name") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<string>("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property<Instant>("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<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<int>("Attitude") .HasColumnType("integer") .HasColumnName("attitude"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Guid>("PostId") .HasColumnType("uuid") .HasColumnName("post_id"); b.Property<string>("Symbol") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("symbol"); b.Property<Instant>("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<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Name") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property<string>("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property<Instant>("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.Publisher.Publisher", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid?>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<CloudFileReferenceObject>("Background") .HasColumnType("jsonb") .HasColumnName("background"); b.Property<string>("BackgroundId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("background_id"); b.Property<string>("Bio") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("bio"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property<string>("Nick") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("nick"); b.Property<CloudFileReferenceObject>("Picture") .HasColumnType("jsonb") .HasColumnName("picture"); b.Property<string>("PictureId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("picture_id"); b.Property<Guid?>("RealmId") .HasColumnType("uuid") .HasColumnName("realm_id"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<VerificationMark>("Verification") .HasColumnType("jsonb") .HasColumnName("verification"); b.HasKey("Id") .HasName("pk_publishers"); b.HasIndex("AccountId") .HasDatabaseName("ix_publishers_account_id"); b.HasIndex("Name") .IsUnique() .HasDatabaseName("ix_publishers_name"); b.HasIndex("RealmId") .HasDatabaseName("ix_publishers_realm_id"); b.ToTable("publishers", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Publisher.PublisherFeature", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("Flag") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("flag"); b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_publisher_features"); b.HasIndex("PublisherId") .HasDatabaseName("ix_publisher_features_publisher_id"); b.ToTable("publisher_features", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Publisher.PublisherMember", b => { b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("JoinedAt") .HasColumnType("timestamp with time zone") .HasColumnName("joined_at"); b.Property<int>("Role") .HasColumnType("integer") .HasColumnName("role"); b.Property<Instant>("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.Publisher.PublisherSubscription", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<int>("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property<int>("Tier") .HasColumnType("integer") .HasColumnName("tier"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_publisher_subscriptions"); b.HasIndex("AccountId") .HasDatabaseName("ix_publisher_subscriptions_account_id"); b.HasIndex("PublisherId") .HasDatabaseName("ix_publisher_subscriptions_publisher_id"); b.ToTable("publisher_subscriptions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Realm.Realm", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<CloudFileReferenceObject>("Background") .HasColumnType("jsonb") .HasColumnName("background"); b.Property<string>("BackgroundId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("background_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Description") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property<bool>("IsCommunity") .HasColumnType("boolean") .HasColumnName("is_community"); b.Property<bool>("IsPublic") .HasColumnType("boolean") .HasColumnName("is_public"); b.Property<string>("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property<CloudFileReferenceObject>("Picture") .HasColumnType("jsonb") .HasColumnName("picture"); b.Property<string>("PictureId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("picture_id"); b.Property<string>("Slug") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("slug"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<VerificationMark>("Verification") .HasColumnType("jsonb") .HasColumnName("verification"); b.HasKey("Id") .HasName("pk_realms"); b.HasIndex("AccountId") .HasDatabaseName("ix_realms_account_id"); b.HasIndex("Slug") .IsUnique() .HasDatabaseName("ix_realms_slug"); b.ToTable("realms", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Realm.RealmMember", b => { b.Property<Guid>("RealmId") .HasColumnType("uuid") .HasColumnName("realm_id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("JoinedAt") .HasColumnType("timestamp with time zone") .HasColumnName("joined_at"); b.Property<Instant?>("LeaveAt") .HasColumnType("timestamp with time zone") .HasColumnName("leave_at"); b.Property<int>("Role") .HasColumnType("integer") .HasColumnName("role"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("RealmId", "AccountId") .HasName("pk_realm_members"); b.HasIndex("AccountId") .HasDatabaseName("ix_realm_members_account_id"); b.ToTable("realm_members", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Sticker.Sticker", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<CloudFileReferenceObject>("Image") .HasColumnType("jsonb") .HasColumnName("image"); b.Property<string>("ImageId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("image_id"); b.Property<Guid>("PackId") .HasColumnType("uuid") .HasColumnName("pack_id"); b.Property<string>("Slug") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("slug"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_stickers"); b.HasIndex("PackId") .HasDatabaseName("ix_stickers_pack_id"); b.HasIndex("Slug") .HasDatabaseName("ix_stickers_slug"); b.ToTable("stickers", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Sticker.StickerPack", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Description") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property<string>("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property<string>("Prefix") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("prefix"); b.Property<Guid>("PublisherId") .HasColumnType("uuid") .HasColumnName("publisher_id"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_sticker_packs"); b.HasIndex("Prefix") .IsUnique() .HasDatabaseName("ix_sticker_packs_prefix"); b.HasIndex("PublisherId") .HasDatabaseName("ix_sticker_packs_publisher_id"); b.ToTable("sticker_packs", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFile", b => { b.Property<string>("Id") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<string>("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property<Dictionary<string, object>>("FileMeta") .HasColumnType("jsonb") .HasColumnName("file_meta"); b.Property<bool>("HasCompression") .HasColumnType("boolean") .HasColumnName("has_compression"); b.Property<string>("Hash") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("hash"); b.Property<bool>("IsMarkedRecycle") .HasColumnType("boolean") .HasColumnName("is_marked_recycle"); b.Property<Guid?>("MessageId") .HasColumnType("uuid") .HasColumnName("message_id"); b.Property<string>("MimeType") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("mime_type"); b.Property<string>("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property<Guid?>("PostId") .HasColumnType("uuid") .HasColumnName("post_id"); b.Property<List<CloudFileSensitiveMark>>("SensitiveMarks") .HasColumnType("jsonb") .HasColumnName("sensitive_marks"); b.Property<long>("Size") .HasColumnType("bigint") .HasColumnName("size"); b.Property<string>("StorageId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("storage_id"); b.Property<string>("StorageUrl") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("storage_url"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<Instant?>("UploadedAt") .HasColumnType("timestamp with time zone") .HasColumnName("uploaded_at"); b.Property<string>("UploadedTo") .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("uploaded_to"); b.Property<Dictionary<string, object>>("UserMeta") .HasColumnType("jsonb") .HasColumnName("user_meta"); b.HasKey("Id") .HasName("pk_files"); b.HasIndex("AccountId") .HasDatabaseName("ix_files_account_id"); b.HasIndex("MessageId") .HasDatabaseName("ix_files_message_id"); b.HasIndex("PostId") .HasDatabaseName("ix_files_post_id"); b.ToTable("files", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFileReference", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("FileId") .IsRequired() .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("file_id"); b.Property<string>("ResourceId") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("resource_id"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<string>("Usage") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("usage"); b.HasKey("Id") .HasName("pk_file_references"); b.HasIndex("FileId") .HasDatabaseName("ix_file_references_file_id"); b.ToTable("file_references", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Coupon", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Instant?>("AffectedAt") .HasColumnType("timestamp with time zone") .HasColumnName("affected_at"); b.Property<string>("Code") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("code"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<decimal?>("DiscountAmount") .HasColumnType("numeric") .HasColumnName("discount_amount"); b.Property<double?>("DiscountRate") .HasColumnType("double precision") .HasColumnName("discount_rate"); b.Property<Instant?>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<string>("Identifier") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("identifier"); b.Property<int?>("MaxUsage") .HasColumnType("integer") .HasColumnName("max_usage"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_wallet_coupons"); b.ToTable("wallet_coupons", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Order", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<decimal>("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<string>("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant>("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property<Guid?>("IssuerAppId") .HasColumnType("uuid") .HasColumnName("issuer_app_id"); b.Property<Guid>("PayeeWalletId") .HasColumnType("uuid") .HasColumnName("payee_wallet_id"); b.Property<string>("Remarks") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("remarks"); b.Property<int>("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property<Guid?>("TransactionId") .HasColumnType("uuid") .HasColumnName("transaction_id"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_payment_orders"); b.HasIndex("IssuerAppId") .HasDatabaseName("ix_payment_orders_issuer_app_id"); b.HasIndex("PayeeWalletId") .HasDatabaseName("ix_payment_orders_payee_wallet_id"); b.HasIndex("TransactionId") .HasDatabaseName("ix_payment_orders_transaction_id"); b.ToTable("payment_orders", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Subscription", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<decimal>("BasePrice") .HasColumnType("numeric") .HasColumnName("base_price"); b.Property<Instant>("BegunAt") .HasColumnType("timestamp with time zone") .HasColumnName("begun_at"); b.Property<Guid?>("CouponId") .HasColumnType("uuid") .HasColumnName("coupon_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant?>("EndedAt") .HasColumnType("timestamp with time zone") .HasColumnName("ended_at"); b.Property<string>("Identifier") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("identifier"); b.Property<bool>("IsActive") .HasColumnType("boolean") .HasColumnName("is_active"); b.Property<bool>("IsFreeTrial") .HasColumnType("boolean") .HasColumnName("is_free_trial"); b.Property<PaymentDetails>("PaymentDetails") .IsRequired() .HasColumnType("jsonb") .HasColumnName("payment_details"); b.Property<string>("PaymentMethod") .IsRequired() .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("payment_method"); b.Property<Instant?>("RenewalAt") .HasColumnType("timestamp with time zone") .HasColumnName("renewal_at"); b.Property<int>("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_wallet_subscriptions"); b.HasIndex("AccountId") .HasDatabaseName("ix_wallet_subscriptions_account_id"); b.HasIndex("CouponId") .HasDatabaseName("ix_wallet_subscriptions_coupon_id"); b.HasIndex("Identifier") .HasDatabaseName("ix_wallet_subscriptions_identifier"); b.ToTable("wallet_subscriptions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Transaction", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<decimal>("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<string>("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Guid?>("PayeeWalletId") .HasColumnType("uuid") .HasColumnName("payee_wallet_id"); b.Property<Guid?>("PayerWalletId") .HasColumnType("uuid") .HasColumnName("payer_wallet_id"); b.Property<string>("Remarks") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("remarks"); b.Property<int>("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_payment_transactions"); b.HasIndex("PayeeWalletId") .HasDatabaseName("ix_payment_transactions_payee_wallet_id"); b.HasIndex("PayerWalletId") .HasDatabaseName("ix_payment_transactions_payer_wallet_id"); b.ToTable("payment_transactions", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Wallet", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<Guid>("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_wallets"); b.HasIndex("AccountId") .HasDatabaseName("ix_wallets_account_id"); b.ToTable("wallets", (string)null); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.WalletPocket", b => { b.Property<Guid>("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property<decimal>("Amount") .HasColumnType("numeric") .HasColumnName("amount"); b.Property<Instant>("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property<string>("Currency") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("currency"); b.Property<Instant?>("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property<Instant>("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property<Guid>("WalletId") .HasColumnType("uuid") .HasColumnName("wallet_id"); b.HasKey("Id") .HasName("pk_wallet_pockets"); b.HasIndex("WalletId") .HasDatabaseName("ix_wallet_pockets_wallet_id"); b.ToTable("wallet_pockets", (string)null); }); modelBuilder.Entity("PostPostCategory", b => { b.Property<Guid>("CategoriesId") .HasColumnType("uuid") .HasColumnName("categories_id"); b.Property<Guid>("PostsId") .HasColumnType("uuid") .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<Guid>("CollectionsId") .HasColumnType("uuid") .HasColumnName("collections_id"); b.Property<Guid>("PostsId") .HasColumnType("uuid") .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<Guid>("PostsId") .HasColumnType("uuid") .HasColumnName("posts_id"); b.Property<Guid>("TagsId") .HasColumnType("uuid") .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.ActionLog", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_action_logs_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Auth.Session", "Session") .WithMany() .HasForeignKey("SessionId") .HasConstraintName("fk_action_logs_auth_sessions_session_id"); b.Navigation("Account"); b.Navigation("Session"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Badge", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("Badges") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_badges_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.CheckInResult", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_check_in_results_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.MagicSpell", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .HasConstraintName("fk_magic_spells_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Notification", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_notifications_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.NotificationPushSubscription", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_notification_push_subscriptions_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Account.Profile", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithOne("Profile") .HasForeignKey("DysonNetwork.Sphere.Account.Profile", "AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_profiles_accounts_account_id"); b.Navigation("Account"); }); 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.Account.Status", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_account_statuses_accounts_account_id"); b.Navigation("Account"); }); 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.Chat.ChatMember", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_members_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Chat.ChatRoom", "ChatRoom") .WithMany("Members") .HasForeignKey("ChatRoomId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_members_chat_rooms_chat_room_id"); b.Navigation("Account"); b.Navigation("ChatRoom"); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatRoom", b => { b.HasOne("DysonNetwork.Sphere.Realm.Realm", "Realm") .WithMany("ChatRooms") .HasForeignKey("RealmId") .HasConstraintName("fk_chat_rooms_realms_realm_id"); b.Navigation("Realm"); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.Message", b => { b.HasOne("DysonNetwork.Sphere.Chat.ChatRoom", "ChatRoom") .WithMany() .HasForeignKey("ChatRoomId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_messages_chat_rooms_chat_room_id"); b.HasOne("DysonNetwork.Sphere.Chat.Message", "ForwardedMessage") .WithMany() .HasForeignKey("ForwardedMessageId") .OnDelete(DeleteBehavior.Restrict) .HasConstraintName("fk_chat_messages_chat_messages_forwarded_message_id"); b.HasOne("DysonNetwork.Sphere.Chat.Message", "RepliedMessage") .WithMany() .HasForeignKey("RepliedMessageId") .OnDelete(DeleteBehavior.Restrict) .HasConstraintName("fk_chat_messages_chat_messages_replied_message_id"); b.HasOne("DysonNetwork.Sphere.Chat.ChatMember", "Sender") .WithMany() .HasForeignKey("SenderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_messages_chat_members_sender_id"); b.Navigation("ChatRoom"); b.Navigation("ForwardedMessage"); b.Navigation("RepliedMessage"); b.Navigation("Sender"); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.MessageReaction", b => { b.HasOne("DysonNetwork.Sphere.Chat.Message", "Message") .WithMany("Reactions") .HasForeignKey("MessageId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_reactions_chat_messages_message_id"); b.HasOne("DysonNetwork.Sphere.Chat.ChatMember", "Sender") .WithMany() .HasForeignKey("SenderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_reactions_chat_members_sender_id"); b.Navigation("Message"); b.Navigation("Sender"); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.RealtimeCall", b => { b.HasOne("DysonNetwork.Sphere.Chat.ChatRoom", "Room") .WithMany() .HasForeignKey("RoomId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_realtime_call_chat_rooms_room_id"); b.HasOne("DysonNetwork.Sphere.Chat.ChatMember", "Sender") .WithMany() .HasForeignKey("SenderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_chat_realtime_call_chat_members_sender_id"); b.Navigation("Room"); b.Navigation("Sender"); }); modelBuilder.Entity("DysonNetwork.Sphere.Developer.CustomApp", b => { b.HasOne("DysonNetwork.Sphere.Publisher.Publisher", "Developer") .WithMany() .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_custom_apps_publishers_publisher_id"); b.Navigation("Developer"); }); modelBuilder.Entity("DysonNetwork.Sphere.Developer.CustomAppSecret", b => { b.HasOne("DysonNetwork.Sphere.Developer.CustomApp", "App") .WithMany() .HasForeignKey("AppId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_custom_app_secrets_custom_apps_app_id"); b.Navigation("App"); }); modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroupMember", b => { b.HasOne("DysonNetwork.Sphere.Permission.PermissionGroup", "Group") .WithMany("Members") .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_permission_group_members_permission_groups_group_id"); b.Navigation("Group"); }); modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionNode", b => { b.HasOne("DysonNetwork.Sphere.Permission.PermissionGroup", "Group") .WithMany("Nodes") .HasForeignKey("GroupId") .HasConstraintName("fk_permission_nodes_permission_groups_group_id"); b.Navigation("Group"); }); 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.Publisher.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.Navigation("ForwardedPost"); b.Navigation("Publisher"); b.Navigation("RepliedPost"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.PostCollection", b => { b.HasOne("DysonNetwork.Sphere.Publisher.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.Publisher.Publisher", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .HasConstraintName("fk_publishers_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Realm.Realm", "Realm") .WithMany() .HasForeignKey("RealmId") .HasConstraintName("fk_publishers_realms_realm_id"); b.Navigation("Account"); b.Navigation("Realm"); }); modelBuilder.Entity("DysonNetwork.Sphere.Publisher.PublisherFeature", b => { b.HasOne("DysonNetwork.Sphere.Publisher.Publisher", "Publisher") .WithMany() .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_publisher_features_publishers_publisher_id"); b.Navigation("Publisher"); }); modelBuilder.Entity("DysonNetwork.Sphere.Publisher.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.Publisher.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.Publisher.PublisherSubscription", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_publisher_subscriptions_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Publisher.Publisher", "Publisher") .WithMany("Subscriptions") .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_publisher_subscriptions_publishers_publisher_id"); b.Navigation("Account"); b.Navigation("Publisher"); }); modelBuilder.Entity("DysonNetwork.Sphere.Realm.Realm", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_realms_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Realm.RealmMember", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_realm_members_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Realm.Realm", "Realm") .WithMany("Members") .HasForeignKey("RealmId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_realm_members_realms_realm_id"); b.Navigation("Account"); b.Navigation("Realm"); }); modelBuilder.Entity("DysonNetwork.Sphere.Sticker.Sticker", b => { b.HasOne("DysonNetwork.Sphere.Sticker.StickerPack", "Pack") .WithMany() .HasForeignKey("PackId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_stickers_sticker_packs_pack_id"); b.Navigation("Pack"); }); modelBuilder.Entity("DysonNetwork.Sphere.Sticker.StickerPack", b => { b.HasOne("DysonNetwork.Sphere.Publisher.Publisher", "Publisher") .WithMany() .HasForeignKey("PublisherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_sticker_packs_publishers_publisher_id"); 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.Chat.Message", null) .WithMany("OutdatedAttachments") .HasForeignKey("MessageId") .HasConstraintName("fk_files_chat_messages_message_id"); b.HasOne("DysonNetwork.Sphere.Post.Post", null) .WithMany("OutdatedAttachments") .HasForeignKey("PostId") .HasConstraintName("fk_files_posts_post_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Storage.CloudFileReference", b => { b.HasOne("DysonNetwork.Sphere.Storage.CloudFile", "File") .WithMany() .HasForeignKey("FileId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_file_references_files_file_id"); b.Navigation("File"); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Order", b => { b.HasOne("DysonNetwork.Sphere.Developer.CustomApp", "IssuerApp") .WithMany() .HasForeignKey("IssuerAppId") .HasConstraintName("fk_payment_orders_custom_apps_issuer_app_id"); b.HasOne("DysonNetwork.Sphere.Wallet.Wallet", "PayeeWallet") .WithMany() .HasForeignKey("PayeeWalletId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_payment_orders_wallets_payee_wallet_id"); b.HasOne("DysonNetwork.Sphere.Wallet.Transaction", "Transaction") .WithMany() .HasForeignKey("TransactionId") .HasConstraintName("fk_payment_orders_payment_transactions_transaction_id"); b.Navigation("IssuerApp"); b.Navigation("PayeeWallet"); b.Navigation("Transaction"); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Subscription", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany("Subscriptions") .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_wallet_subscriptions_accounts_account_id"); b.HasOne("DysonNetwork.Sphere.Wallet.Coupon", "Coupon") .WithMany() .HasForeignKey("CouponId") .HasConstraintName("fk_wallet_subscriptions_wallet_coupons_coupon_id"); b.Navigation("Account"); b.Navigation("Coupon"); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Transaction", b => { b.HasOne("DysonNetwork.Sphere.Wallet.Wallet", "PayeeWallet") .WithMany() .HasForeignKey("PayeeWalletId") .HasConstraintName("fk_payment_transactions_wallets_payee_wallet_id"); b.HasOne("DysonNetwork.Sphere.Wallet.Wallet", "PayerWallet") .WithMany() .HasForeignKey("PayerWalletId") .HasConstraintName("fk_payment_transactions_wallets_payer_wallet_id"); b.Navigation("PayeeWallet"); b.Navigation("PayerWallet"); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Wallet", b => { b.HasOne("DysonNetwork.Sphere.Account.Account", "Account") .WithMany() .HasForeignKey("AccountId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_wallets_accounts_account_id"); b.Navigation("Account"); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.WalletPocket", b => { b.HasOne("DysonNetwork.Sphere.Wallet.Wallet", "Wallet") .WithMany("Pockets") .HasForeignKey("WalletId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_wallet_pockets_wallets_wallet_id"); b.Navigation("Wallet"); }); 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("Badges"); b.Navigation("Challenges"); b.Navigation("Contacts"); b.Navigation("IncomingRelationships"); b.Navigation("OutgoingRelationships"); b.Navigation("Profile") .IsRequired(); b.Navigation("Sessions"); b.Navigation("Subscriptions"); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.ChatRoom", b => { b.Navigation("Members"); }); modelBuilder.Entity("DysonNetwork.Sphere.Chat.Message", b => { b.Navigation("OutdatedAttachments"); b.Navigation("Reactions"); }); modelBuilder.Entity("DysonNetwork.Sphere.Permission.PermissionGroup", b => { b.Navigation("Members"); b.Navigation("Nodes"); }); modelBuilder.Entity("DysonNetwork.Sphere.Post.Post", b => { b.Navigation("OutdatedAttachments"); b.Navigation("Reactions"); }); modelBuilder.Entity("DysonNetwork.Sphere.Publisher.Publisher", b => { b.Navigation("Collections"); b.Navigation("Members"); b.Navigation("Posts"); b.Navigation("Subscriptions"); }); modelBuilder.Entity("DysonNetwork.Sphere.Realm.Realm", b => { b.Navigation("ChatRooms"); b.Navigation("Members"); }); modelBuilder.Entity("DysonNetwork.Sphere.Wallet.Wallet", b => { b.Navigation("Pockets"); }); #pragma warning restore 612, 618 } } }