// 
using System;
using System.Collections.Generic;
using System.Text.Json;
using DysonNetwork.Pass;
using DysonNetwork.Shared.GeoIp;
using DysonNetwork.Shared.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NodaTime;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace DysonNetwork.Pass.Migrations
{
    [DbContext(typeof(AppDatabase))]
    [Migration("20251022164134_RemoveChatRoom")]
    partial class RemoveChatRoom
    {
        /// 
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.9")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);
            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("Reason")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("reason");
                    b.Property("Resolution")
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("resolution");
                    b.Property("ResolvedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("resolved_at");
                    b.Property("ResourceIdentifier")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("resource_identifier");
                    b.Property("Type")
                        .HasColumnType("integer")
                        .HasColumnName("type");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_abuse_reports");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_abuse_reports_account_id");
                    b.ToTable("abuse_reports", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("ActivatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("activated_at");
                    b.Property("AutomatedId")
                        .HasColumnType("uuid")
                        .HasColumnName("automated_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("Region")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("region");
                    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.Shared.Models.SnAccountAuthFactor", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property>("Config")
                        .HasColumnType("jsonb")
                        .HasColumnName("config");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("EnabledAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("enabled_at");
                    b.Property("ExpiredAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expired_at");
                    b.Property("Secret")
                        .HasMaxLength(8196)
                        .HasColumnType("character varying(8196)")
                        .HasColumnName("secret");
                    b.Property("Trustworthy")
                        .HasColumnType("integer")
                        .HasColumnName("trustworthy");
                    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.Shared.Models.SnAccountBadge", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("ActivatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("activated_at");
                    b.Property("Caption")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("caption");
                    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("Label")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("label");
                    b.Property>("Meta")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");
                    b.Property("Type")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("type");
                    b.Property("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.Shared.Models.SnAccountConnection", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccessToken")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("access_token");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("LastUsedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("last_used_at");
                    b.Property>("Meta")
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");
                    b.Property("ProvidedIdentifier")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("provided_identifier");
                    b.Property("Provider")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("provider");
                    b.Property("RefreshToken")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("refresh_token");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_account_connections");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_account_connections_account_id");
                    b.ToTable("account_connections", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("IsPrimary")
                        .HasColumnType("boolean")
                        .HasColumnName("is_primary");
                    b.Property("IsPublic")
                        .HasColumnType("boolean")
                        .HasColumnName("is_public");
                    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.Shared.Models.SnAccountProfile", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("ActiveBadge")
                        .HasColumnType("jsonb")
                        .HasColumnName("active_badge");
                    b.Property("Background")
                        .HasColumnType("jsonb")
                        .HasColumnName("background");
                    b.Property("Bio")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("bio");
                    b.Property("Birthday")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("birthday");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("Experience")
                        .HasColumnType("integer")
                        .HasColumnName("experience");
                    b.Property("FirstName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("first_name");
                    b.Property("Gender")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("gender");
                    b.Property("LastName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("last_name");
                    b.Property("LastSeenAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("last_seen_at");
                    b.Property>("Links")
                        .HasColumnType("jsonb")
                        .HasColumnName("links");
                    b.Property("Location")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("location");
                    b.Property("MiddleName")
                        .HasMaxLength(256)
                        .HasColumnType("character varying(256)")
                        .HasColumnName("middle_name");
                    b.Property("Picture")
                        .HasColumnType("jsonb")
                        .HasColumnName("picture");
                    b.Property("Pronouns")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("pronouns");
                    b.Property("SocialCredits")
                        .HasColumnType("double precision")
                        .HasColumnName("social_credits");
                    b.Property("TimeZone")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("time_zone");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.Property("UsernameColor")
                        .HasColumnType("jsonb")
                        .HasColumnName("username_color");
                    b.Property("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.Shared.Models.SnAccountPunishment", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property>("BlockedPermissions")
                        .HasColumnType("jsonb")
                        .HasColumnName("blocked_permissions");
                    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("Reason")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("reason");
                    b.Property("Type")
                        .HasColumnType("integer")
                        .HasColumnName("type");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_punishments");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_punishments_account_id");
                    b.ToTable("punishments", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b =>
                {
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("RelatedId")
                        .HasColumnType("uuid")
                        .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("smallint")
                        .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.Shared.Models.SnAccountStatus", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("AppIdentifier")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("app_identifier");
                    b.Property("Attitude")
                        .HasColumnType("integer")
                        .HasColumnName("attitude");
                    b.Property("ClearedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("cleared_at");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("IsAutomated")
                        .HasColumnType("boolean")
                        .HasColumnName("is_automated");
                    b.Property("IsInvisible")
                        .HasColumnType("boolean")
                        .HasColumnName("is_invisible");
                    b.Property("IsNotDisturb")
                        .HasColumnType("boolean")
                        .HasColumnName("is_not_disturb");
                    b.Property("Label")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("label");
                    b.Property>("Meta")
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");
                    b.Property("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.Shared.Models.SnActionLog", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("Action")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("action");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("IpAddress")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("ip_address");
                    b.Property("Location")
                        .HasColumnType("jsonb")
                        .HasColumnName("location");
                    b.Property>("Meta")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");
                    b.Property("SessionId")
                        .HasColumnType("uuid")
                        .HasColumnName("session_id");
                    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_action_logs");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_action_logs_account_id");
                    b.ToTable("action_logs", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("Label")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("label");
                    b.Property("SessionId")
                        .HasColumnType("uuid")
                        .HasColumnName("session_id");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_api_keys");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_api_keys_account_id");
                    b.HasIndex("SessionId")
                        .HasDatabaseName("ix_api_keys_session_id");
                    b.ToTable("api_keys", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property>("Audiences")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("audiences");
                    b.Property>("BlacklistFactors")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("blacklist_factors");
                    b.Property("ClientId")
                        .HasColumnType("uuid")
                        .HasColumnName("client_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("FailedAttempts")
                        .HasColumnType("integer")
                        .HasColumnName("failed_attempts");
                    b.Property("IpAddress")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("ip_address");
                    b.Property("Location")
                        .HasColumnType("jsonb")
                        .HasColumnName("location");
                    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("Type")
                        .HasColumnType("integer")
                        .HasColumnName("type");
                    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.HasIndex("ClientId")
                        .HasDatabaseName("ix_auth_challenges_client_id");
                    b.ToTable("auth_challenges", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("DeviceId")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("device_id");
                    b.Property("DeviceLabel")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("device_label");
                    b.Property("DeviceName")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("device_name");
                    b.Property("Platform")
                        .HasColumnType("integer")
                        .HasColumnName("platform");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_auth_clients");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_auth_clients_account_id");
                    b.ToTable("auth_clients", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("AppId")
                        .HasColumnType("uuid")
                        .HasColumnName("app_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.Shared.Models.SnCheckInResult", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("BackdatedFrom")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("backdated_from");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("Level")
                        .HasColumnType("integer")
                        .HasColumnName("level");
                    b.Property("RewardExperience")
                        .HasColumnType("integer")
                        .HasColumnName("reward_experience");
                    b.Property("RewardPoints")
                        .HasColumnType("numeric")
                        .HasColumnName("reward_points");
                    b.Property>("Tips")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("tips");
                    b.Property("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.Shared.Models.SnExperienceRecord", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("BonusMultiplier")
                        .HasColumnType("double precision")
                        .HasColumnName("bonus_multiplier");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("Delta")
                        .HasColumnType("bigint")
                        .HasColumnName("delta");
                    b.Property("Reason")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason");
                    b.Property("ReasonType")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason_type");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_experience_records");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_experience_records_account_id");
                    b.ToTable("experience_records", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("AffectedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("affected_at");
                    b.Property("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");
                    b.Property("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");
                    b.Property("ExpiresAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expires_at");
                    b.Property>("Meta")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");
                    b.Property("Spell")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("spell");
                    b.Property("Type")
                        .HasColumnType("integer")
                        .HasColumnName("type");
                    b.Property("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.Shared.Models.SnPermissionGroup", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("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("Key")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("key");
                    b.Property("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.Shared.Models.SnPermissionGroupMember", b =>
                {
                    b.Property("GroupId")
                        .HasColumnType("uuid")
                        .HasColumnName("group_id");
                    b.Property("Actor")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("actor");
                    b.Property("AffectedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("affected_at");
                    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("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.Shared.Models.SnPermissionNode", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("Actor")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("actor");
                    b.Property("AffectedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("affected_at");
                    b.Property("Area")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("area");
                    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("GroupId")
                        .HasColumnType("uuid")
                        .HasColumnName("group_id");
                    b.Property("Key")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("key");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.Property("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.Shared.Models.SnRealm", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");
                    b.Property("Background")
                        .HasColumnType("jsonb")
                        .HasColumnName("background");
                    b.Property("BackgroundId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("background_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")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("description");
                    b.Property("IsCommunity")
                        .HasColumnType("boolean")
                        .HasColumnName("is_community");
                    b.Property("IsPublic")
                        .HasColumnType("boolean")
                        .HasColumnName("is_public");
                    b.Property("Name")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("name");
                    b.Property("Picture")
                        .HasColumnType("jsonb")
                        .HasColumnName("picture");
                    b.Property("PictureId")
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("picture_id");
                    b.Property("Slug")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("slug");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.Property("Verification")
                        .HasColumnType("jsonb")
                        .HasColumnName("verification");
                    b.HasKey("Id")
                        .HasName("pk_realms");
                    b.HasIndex("Slug")
                        .IsUnique()
                        .HasDatabaseName("ix_realms_slug");
                    b.ToTable("realms", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b =>
                {
                    b.Property("RealmId")
                        .HasColumnType("uuid")
                        .HasColumnName("realm_id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("LeaveAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("leave_at");
                    b.Property("Role")
                        .HasColumnType("integer")
                        .HasColumnName("role");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("RealmId", "AccountId")
                        .HasName("pk_realm_members");
                    b.ToTable("realm_members", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b =>
                {
                    b.Property("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");
                    b.Property("AccountId")
                        .HasColumnType("uuid")
                        .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("Delta")
                        .HasColumnType("double precision")
                        .HasColumnName("delta");
                    b.Property("ExpiredAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expired_at");
                    b.Property("Reason")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason");
                    b.Property("ReasonType")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason_type");
                    b.Property("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");
                    b.HasKey("Id")
                        .HasName("pk_social_credit_records");
                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_social_credit_records_account_id");
                    b.ToTable("social_credit_records", (string)null);
                });
            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b =>
                {
                    b.Property