// <auto-generated />
using System;
using System.Collections.Generic;
using System.Text.Json;
using DysonNetwork.Pass;
using DysonNetwork.Pass.Account;
using DysonNetwork.Pass.Wallet;
using DysonNetwork.Shared.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using NetTopologySuite.Geometries;
using NodaTime;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace DysonNetwork.Pass.Migrations
{
    [DbContext(typeof(AppDatabase))]
    [Migration("20250822142926_CacheSocialCreditsInProfile")]
    partial class CacheSocialCreditsInProfile
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.7")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis");
            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("DysonNetwork.Pass.Account.AbuseReport", 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>("Reason")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("reason");

                    b.Property<string>("Resolution")
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("resolution");

                    b.Property<Instant?>("ResolvedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("resolved_at");

                    b.Property<string>("ResourceIdentifier")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("resource_identifier");

                    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_abuse_reports");

                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_abuse_reports_account_id");

                    b.ToTable("abuse_reports", (string)null);
                });

            modelBuilder.Entity("DysonNetwork.Pass.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<Guid?>("AutomatedId")
                        .HasColumnType("uuid")
                        .HasColumnName("automated_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>("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.Pass.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.Pass.Account.AccountBadge", 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.Pass.Account.AccountConnection", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<string>("AccessToken")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("access_token");

                    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?>("LastUsedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("last_used_at");

                    b.Property<Dictionary<string, object>>("Meta")
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");

                    b.Property<string>("ProvidedIdentifier")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("provided_identifier");

                    b.Property<string>("Provider")
                        .IsRequired()
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("provider");

                    b.Property<string>("RefreshToken")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("refresh_token");

                    b.Property<Instant>("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.Pass.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<bool>("IsPublic")
                        .HasColumnType("boolean")
                        .HasColumnName("is_public");

                    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.Pass.Account.AccountProfile", 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>("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<List<ProfileLink>>("Links")
                        .HasColumnType("jsonb")
                        .HasColumnName("links");

                    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>("Pronouns")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("pronouns");

                    b.Property<double>("SocialCredits")
                        .HasColumnType("double precision")
                        .HasColumnName("social_credits");

                    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.Pass.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.ToTable("action_logs", (string)null);
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.CheckInResult", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<Guid>("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");

                    b.Property<Instant?>("BackdatedFrom")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("backdated_from");

                    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.Pass.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.Pass.Account.Punishment", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<Guid>("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");

                    b.Property<List<string>>("BlockedPermissions")
                        .HasColumnType("jsonb")
                        .HasColumnName("blocked_permissions");

                    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>("Reason")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("reason");

                    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_punishments");

                    b.HasIndex("AccountId")
                        .HasDatabaseName("ix_punishments_account_id");

                    b.ToTable("punishments", (string)null);
                });

            modelBuilder.Entity("DysonNetwork.Pass.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.Pass.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.Pass.Auth.ApiKey", 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>("Label")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("label");

                    b.Property<Guid>("SessionId")
                        .HasColumnType("uuid")
                        .HasColumnName("session_id");

                    b.Property<Instant>("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.Pass.Auth.AuthChallenge", 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<Guid?>("ClientId")
                        .HasColumnType("uuid")
                        .HasColumnName("client_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<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<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.HasIndex("ClientId")
                        .HasDatabaseName("ix_auth_challenges_client_id");

                    b.ToTable("auth_challenges", (string)null);
                });

            modelBuilder.Entity("DysonNetwork.Pass.Auth.AuthClient", 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(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("device_id");

                    b.Property<string>("DeviceLabel")
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("device_label");

                    b.Property<string>("DeviceName")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("device_name");

                    b.Property<int>("Platform")
                        .HasColumnType("integer")
                        .HasColumnName("platform");

                    b.Property<Instant>("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.Pass.Auth.AuthSession", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<Guid>("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");

                    b.Property<Guid?>("AppId")
                        .HasColumnType("uuid")
                        .HasColumnName("app_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<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.Pass.Credit.SocialCreditRecord", 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<double>("Delta")
                        .HasColumnType("double precision")
                        .HasColumnName("delta");

                    b.Property<Instant?>("ExpiredAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expired_at");

                    b.Property<string>("Reason")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason");

                    b.Property<string>("ReasonType")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason_type");

                    b.Property<Instant>("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.Pass.Leveling.ExperienceRecord", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<Guid>("AccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("account_id");

                    b.Property<double>("BonusMultiplier")
                        .HasColumnType("double precision")
                        .HasColumnName("bonus_multiplier");

                    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<long>("Delta")
                        .HasColumnType("bigint")
                        .HasColumnName("delta");

                    b.Property<string>("Reason")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason");

                    b.Property<string>("ReasonType")
                        .IsRequired()
                        .HasMaxLength(1024)
                        .HasColumnType("character varying(1024)")
                        .HasColumnName("reason_type");

                    b.Property<Instant>("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.Pass.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.Pass.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.Pass.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.Pass.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.Pass.Wallet.Order", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<decimal>("Amount")
                        .HasColumnType("numeric")
                        .HasColumnName("amount");

                    b.Property<string>("AppIdentifier")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("app_identifier");

                    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<Dictionary<string, object>>("Meta")
                        .HasColumnType("jsonb")
                        .HasColumnName("meta");

                    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("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.Pass.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.Pass.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.Pass.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.Pass.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("DysonNetwork.Pass.Account.AbuseReport", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_abuse_reports_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.AccountAuthFactor", b =>
                {
                    b.HasOne("DysonNetwork.Pass.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.Pass.Account.AccountBadge", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany("Badges")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_badges_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.AccountConnection", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany("Connections")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_connections_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.AccountContact", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany("Contacts")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_contacts_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.AccountProfile", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithOne("Profile")
                        .HasForeignKey("DysonNetwork.Pass.Account.AccountProfile", "AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_profiles_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.ActionLog", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_action_logs_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.CheckInResult", b =>
                {
                    b.HasOne("DysonNetwork.Pass.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.Pass.Account.MagicSpell", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .HasConstraintName("fk_magic_spells_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.Punishment", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_punishments_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.Relationship", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany("OutgoingRelationships")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_relationships_accounts_account_id");

                    b.HasOne("DysonNetwork.Pass.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.Pass.Account.Status", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_statuses_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Auth.ApiKey", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_api_keys_accounts_account_id");

                    b.HasOne("DysonNetwork.Pass.Auth.AuthSession", "Session")
                        .WithMany()
                        .HasForeignKey("SessionId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_api_keys_auth_sessions_session_id");

                    b.Navigation("Account");

                    b.Navigation("Session");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Auth.AuthChallenge", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany("Challenges")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_auth_challenges_accounts_account_id");

                    b.HasOne("DysonNetwork.Pass.Auth.AuthClient", "Client")
                        .WithMany()
                        .HasForeignKey("ClientId")
                        .HasConstraintName("fk_auth_challenges_auth_clients_client_id");

                    b.Navigation("Account");

                    b.Navigation("Client");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Auth.AuthClient", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_auth_clients_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Auth.AuthSession", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany("Sessions")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_auth_sessions_accounts_account_id");

                    b.HasOne("DysonNetwork.Pass.Auth.AuthChallenge", "Challenge")
                        .WithMany()
                        .HasForeignKey("ChallengeId")
                        .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id");

                    b.Navigation("Account");

                    b.Navigation("Challenge");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Credit.SocialCreditRecord", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_social_credit_records_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Leveling.ExperienceRecord", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_experience_records_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Permission.PermissionGroupMember", b =>
                {
                    b.HasOne("DysonNetwork.Pass.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.Pass.Permission.PermissionNode", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Permission.PermissionGroup", "Group")
                        .WithMany("Nodes")
                        .HasForeignKey("GroupId")
                        .HasConstraintName("fk_permission_nodes_permission_groups_group_id");

                    b.Navigation("Group");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Wallet.Order", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Wallet.Wallet", "PayeeWallet")
                        .WithMany()
                        .HasForeignKey("PayeeWalletId")
                        .HasConstraintName("fk_payment_orders_wallets_payee_wallet_id");

                    b.HasOne("DysonNetwork.Pass.Wallet.Transaction", "Transaction")
                        .WithMany()
                        .HasForeignKey("TransactionId")
                        .HasConstraintName("fk_payment_orders_payment_transactions_transaction_id");

                    b.Navigation("PayeeWallet");

                    b.Navigation("Transaction");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Wallet.Subscription", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_subscriptions_accounts_account_id");

                    b.HasOne("DysonNetwork.Pass.Wallet.Coupon", "Coupon")
                        .WithMany()
                        .HasForeignKey("CouponId")
                        .HasConstraintName("fk_wallet_subscriptions_wallet_coupons_coupon_id");

                    b.Navigation("Account");

                    b.Navigation("Coupon");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Wallet.Transaction", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Wallet.Wallet", "PayeeWallet")
                        .WithMany()
                        .HasForeignKey("PayeeWalletId")
                        .HasConstraintName("fk_payment_transactions_wallets_payee_wallet_id");

                    b.HasOne("DysonNetwork.Pass.Wallet.Wallet", "PayerWallet")
                        .WithMany()
                        .HasForeignKey("PayerWalletId")
                        .HasConstraintName("fk_payment_transactions_wallets_payer_wallet_id");

                    b.Navigation("PayeeWallet");

                    b.Navigation("PayerWallet");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Wallet.Wallet", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Account.Account", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallets_accounts_account_id");

                    b.Navigation("Account");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Wallet.WalletPocket", b =>
                {
                    b.HasOne("DysonNetwork.Pass.Wallet.Wallet", "Wallet")
                        .WithMany("Pockets")
                        .HasForeignKey("WalletId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_pockets_wallets_wallet_id");

                    b.Navigation("Wallet");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Account.Account", b =>
                {
                    b.Navigation("AuthFactors");

                    b.Navigation("Badges");

                    b.Navigation("Challenges");

                    b.Navigation("Connections");

                    b.Navigation("Contacts");

                    b.Navigation("IncomingRelationships");

                    b.Navigation("OutgoingRelationships");

                    b.Navigation("Profile")
                        .IsRequired();

                    b.Navigation("Sessions");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Permission.PermissionGroup", b =>
                {
                    b.Navigation("Members");

                    b.Navigation("Nodes");
                });

            modelBuilder.Entity("DysonNetwork.Pass.Wallet.Wallet", b =>
                {
                    b.Navigation("Pockets");
                });
#pragma warning restore 612, 618
        }
    }
}
