// <auto-generated />
using System;
using System.Collections.Generic;
using System.Text.Json;
using DysonNetwork.Pass;
using DysonNetwork.Shared.Geometry;
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("20251225145146_AddRewindPoint")]
    partial class AddRewindPoint
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.11")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", 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.Shared.Models.SnAccount", 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<string>("Region")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)")
                        .HasColumnName("region");

                    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.Shared.Models.SnAccountAuthFactor", 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.Shared.Models.SnAccountBadge", 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.Shared.Models.SnAccountConnection", 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.Shared.Models.SnAccountContact", 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.Shared.Models.SnAccountProfile", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

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

                    b.Property<SnAccountBadgeRef>("ActiveBadge")
                        .HasColumnType("jsonb")
                        .HasColumnName("active_badge");

                    b.Property<SnCloudFileReferenceObject>("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<SnProfileLink>>("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<SnCloudFileReferenceObject>("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<UsernameColor>("UsernameColor")
                        .HasColumnType("jsonb")
                        .HasColumnName("username_color");

                    b.Property<SnVerificationMark>("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<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.Shared.Models.SnAccountRelationship", 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.Shared.Models.SnAccountStatus", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

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

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

                    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>("IsAutomated")
                        .HasColumnType("boolean")
                        .HasColumnName("is_automated");

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

                    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.Shared.Models.SnActionLog", 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<GeoPoint>("Location")
                        .HasColumnType("jsonb")
                        .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.Shared.Models.SnAffiliationResult", 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>("ResourceIdentifier")
                        .IsRequired()
                        .HasMaxLength(8192)
                        .HasColumnType("character varying(8192)")
                        .HasColumnName("resource_identifier");

                    b.Property<Guid>("SpellId")
                        .HasColumnType("uuid")
                        .HasColumnName("spell_id");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.HasKey("Id")
                        .HasName("pk_affiliation_results");

                    b.HasIndex("SpellId")
                        .HasDatabaseName("ix_affiliation_results_spell_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAffiliationSpell", 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_affiliation_spells");

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

                    b.HasIndex("Spell")
                        .IsUnique()
                        .HasDatabaseName("ix_affiliation_spells_spell");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", 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.Shared.Models.SnAuthChallenge", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

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

                    b.Property<List<string>>("Audiences")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("audiences");

                    b.Property<List<Guid>>("BlacklistFactors")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("blacklist_factors");

                    b.Property<Instant>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");

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

                    b.Property<string>("DeviceId")
                        .IsRequired()
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("device_id");

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

                    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<GeoPoint>("Location")
                        .HasColumnType("jsonb")
                        .HasColumnName("location");

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

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

                    b.Property<List<string>>("Scopes")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("scopes");

                    b.Property<int>("StepRemain")
                        .HasColumnType("integer")
                        .HasColumnName("step_remain");

                    b.Property<int>("StepTotal")
                        .HasColumnType("integer")
                        .HasColumnName("step_total");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.Property<string>("UserAgent")
                        .HasMaxLength(512)
                        .HasColumnType("character varying(512)")
                        .HasColumnName("user_agent");

                    b.HasKey("Id")
                        .HasName("pk_auth_challenges");

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", 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.Shared.Models.SnAuthSession", 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<List<string>>("Audiences")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("audiences");

                    b.Property<Guid?>("ChallengeId")
                        .HasColumnType("uuid")
                        .HasColumnName("challenge_id");

                    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<string>("IpAddress")
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("ip_address");

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

                    b.Property<GeoPoint>("Location")
                        .HasColumnType("jsonb")
                        .HasColumnName("location");

                    b.Property<Guid?>("ParentSessionId")
                        .HasColumnType("uuid")
                        .HasColumnName("parent_session_id");

                    b.Property<List<string>>("Scopes")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("scopes");

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

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

                    b.HasIndex("ClientId")
                        .HasDatabaseName("ix_auth_sessions_client_id");

                    b.HasIndex("ParentSessionId")
                        .HasDatabaseName("ix_auth_sessions_parent_session_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", 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<CheckInFortuneTip>>("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.Shared.Models.SnExperienceRecord", 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.Shared.Models.SnLottery", 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?>("DrawDate")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("draw_date");

                    b.Property<int>("DrawStatus")
                        .HasColumnType("integer")
                        .HasColumnName("draw_status");

                    b.Property<List<int>>("MatchedRegionOneNumbers")
                        .HasColumnType("jsonb")
                        .HasColumnName("matched_region_one_numbers");

                    b.Property<int?>("MatchedRegionTwoNumber")
                        .HasColumnType("integer")
                        .HasColumnName("matched_region_two_number");

                    b.Property<int>("Multiplier")
                        .HasColumnType("integer")
                        .HasColumnName("multiplier");

                    b.Property<List<int>>("RegionOneNumbers")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("region_one_numbers");

                    b.Property<int>("RegionTwoNumber")
                        .HasColumnType("integer")
                        .HasColumnName("region_two_number");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.HasKey("Id")
                        .HasName("pk_lotteries");

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnLotteryRecord", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<Instant>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");

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

                    b.Property<Instant>("DrawDate")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("draw_date");

                    b.Property<long>("TotalPrizeAmount")
                        .HasColumnType("bigint")
                        .HasColumnName("total_prize_amount");

                    b.Property<int>("TotalPrizesAwarded")
                        .HasColumnType("integer")
                        .HasColumnName("total_prizes_awarded");

                    b.Property<int>("TotalTickets")
                        .HasColumnType("integer")
                        .HasColumnName("total_tickets");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.Property<List<int>>("WinningRegionOneNumbers")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("winning_region_one_numbers");

                    b.Property<int>("WinningRegionTwoNumber")
                        .HasColumnType("integer")
                        .HasColumnName("winning_region_two_number");

                    b.HasKey("Id")
                        .HasName("pk_lottery_records");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", 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.Shared.Models.SnPermissionGroup", 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.Shared.Models.SnPermissionGroupMember", 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.Shared.Models.SnPermissionNode", 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<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<int>("Type")
                        .HasColumnType("integer")
                        .HasColumnName("type");

                    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", "Actor")
                        .HasDatabaseName("ix_permission_nodes_key_actor");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

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

                    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<string>("LargeImage")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("large_image");

                    b.Property<Instant>("LeaseExpiresAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("lease_expires_at");

                    b.Property<int>("LeaseMinutes")
                        .HasColumnType("integer")
                        .HasColumnName("lease_minutes");

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

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

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

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

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

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

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

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

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

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

                    b.Property<SnCloudFileReferenceObject>("Background")
                        .HasColumnType("jsonb")
                        .HasColumnName("background");

                    b.Property<Instant>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");

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

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

                    b.Property<bool>("IsCommunity")
                        .HasColumnType("boolean")
                        .HasColumnName("is_community");

                    b.Property<bool>("IsPublic")
                        .HasColumnType("boolean")
                        .HasColumnName("is_public");

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

                    b.Property<SnCloudFileReferenceObject>("Picture")
                        .HasColumnType("jsonb")
                        .HasColumnName("picture");

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

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.Property<SnVerificationMark>("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<Guid>("RealmId")
                        .HasColumnType("uuid")
                        .HasColumnName("realm_id");

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

                    b.Property<Instant>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");

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

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

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

                    b.Property<int>("Role")
                        .HasColumnType("integer")
                        .HasColumnName("role");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.HasKey("RealmId", "AccountId")
                        .HasName("pk_realm_members");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnRewindPoint", 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<Dictionary<string, object>>("Data")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("data");

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

                    b.Property<int>("SchemaVersion")
                        .HasColumnType("integer")
                        .HasColumnName("schema_version");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.Property<int>("Year")
                        .HasColumnType("integer")
                        .HasColumnName("year");

                    b.HasKey("Id")
                        .HasName("pk_rewind_points");

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", 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<int>("Status")
                        .HasColumnType("integer")
                        .HasColumnName("status");

                    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.Shared.Models.SnWallet", 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.Shared.Models.SnWalletCoupon", 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.Shared.Models.SnWalletFund", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<int>("AmountOfSplits")
                        .HasColumnType("integer")
                        .HasColumnName("amount_of_splits");

                    b.Property<Instant>("CreatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("created_at");

                    b.Property<Guid>("CreatorAccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("creator_account_id");

                    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<bool>("IsOpen")
                        .HasColumnType("boolean")
                        .HasColumnName("is_open");

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

                    b.Property<decimal>("RemainingAmount")
                        .HasColumnType("numeric")
                        .HasColumnName("remaining_amount");

                    b.Property<int>("SplitType")
                        .HasColumnType("integer")
                        .HasColumnName("split_type");

                    b.Property<int>("Status")
                        .HasColumnType("integer")
                        .HasColumnName("status");

                    b.Property<decimal>("TotalAmount")
                        .HasColumnType("numeric")
                        .HasColumnName("total_amount");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.HasKey("Id")
                        .HasName("pk_wallet_funds");

                    b.HasIndex("CreatorAccountId")
                        .HasDatabaseName("ix_wallet_funds_creator_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFundRecipient", 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<Instant?>("DeletedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("deleted_at");

                    b.Property<Guid>("FundId")
                        .HasColumnType("uuid")
                        .HasColumnName("fund_id");

                    b.Property<bool>("IsReceived")
                        .HasColumnType("boolean")
                        .HasColumnName("is_received");

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

                    b.Property<Guid>("RecipientAccountId")
                        .HasColumnType("uuid")
                        .HasColumnName("recipient_account_id");

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.HasKey("Id")
                        .HasName("pk_wallet_fund_recipients");

                    b.HasIndex("FundId")
                        .HasDatabaseName("ix_wallet_fund_recipients_fund_id");

                    b.HasIndex("RecipientAccountId")
                        .HasDatabaseName("ix_wallet_fund_recipients_recipient_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<decimal>("BasePrice")
                        .HasColumnType("numeric")
                        .HasColumnName("base_price");

                    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>("ExpiresAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("expires_at");

                    b.Property<decimal>("FinalPrice")
                        .HasColumnType("numeric")
                        .HasColumnName("final_price");

                    b.Property<string>("GiftCode")
                        .IsRequired()
                        .HasMaxLength(128)
                        .HasColumnType("character varying(128)")
                        .HasColumnName("gift_code");

                    b.Property<Guid>("GifterId")
                        .HasColumnType("uuid")
                        .HasColumnName("gifter_id");

                    b.Property<bool>("IsOpenGift")
                        .HasColumnType("boolean")
                        .HasColumnName("is_open_gift");

                    b.Property<string>("Message")
                        .HasMaxLength(1000)
                        .HasColumnType("character varying(1000)")
                        .HasColumnName("message");

                    b.Property<SnPaymentDetails>("PaymentDetails")
                        .IsRequired()
                        .HasColumnType("jsonb")
                        .HasColumnName("payment_details");

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

                    b.Property<Guid?>("RecipientId")
                        .HasColumnType("uuid")
                        .HasColumnName("recipient_id");

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

                    b.Property<Guid?>("RedeemerId")
                        .HasColumnType("uuid")
                        .HasColumnName("redeemer_id");

                    b.Property<int>("Status")
                        .HasColumnType("integer")
                        .HasColumnName("status");

                    b.Property<Guid?>("SubscriptionId")
                        .HasColumnType("uuid")
                        .HasColumnName("subscription_id");

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

                    b.Property<Instant>("UpdatedAt")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("updated_at");

                    b.HasKey("Id")
                        .HasName("pk_wallet_gifts");

                    b.HasIndex("CouponId")
                        .HasDatabaseName("ix_wallet_gifts_coupon_id");

                    b.HasIndex("GiftCode")
                        .HasDatabaseName("ix_wallet_gifts_gift_code");

                    b.HasIndex("GifterId")
                        .HasDatabaseName("ix_wallet_gifts_gifter_id");

                    b.HasIndex("RecipientId")
                        .HasDatabaseName("ix_wallet_gifts_recipient_id");

                    b.HasIndex("RedeemerId")
                        .HasDatabaseName("ix_wallet_gifts_redeemer_id");

                    b.HasIndex("SubscriptionId")
                        .IsUnique()
                        .HasDatabaseName("ix_wallet_gifts_subscription_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletOrder", 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>("ProductIdentifier")
                        .HasMaxLength(4096)
                        .HasColumnType("character varying(4096)")
                        .HasColumnName("product_identifier");

                    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.Shared.Models.SnWalletPocket", 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.Shared.Models.SnWalletSubscription", 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<SnPaymentDetails>("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.HasIndex("Status")
                        .HasDatabaseName("ix_wallet_subscriptions_status");

                    b.HasIndex("AccountId", "Identifier")
                        .HasDatabaseName("ix_wallet_subscriptions_account_id_identifier");

                    b.HasIndex("AccountId", "IsActive")
                        .HasDatabaseName("ix_wallet_subscriptions_account_id_is_active");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletTransaction", 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.Shared.Models.SnAbuseReport", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_abuse_reports_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany("AuthFactors")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_auth_factors_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany("Badges")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_badges_accounts_account_id");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAffiliationResult", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAffiliationSpell", "Spell")
                        .WithMany()
                        .HasForeignKey("SpellId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_affiliation_results_affiliation_spells_spell_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAffiliationSpell", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .HasConstraintName("fk_affiliation_spells_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_api_keys_accounts_account_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAuthSession", "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.Shared.Models.SnAuthChallenge", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany("Challenges")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_auth_challenges_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_auth_clients_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany("Sessions")
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_auth_sessions_accounts_account_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client")
                        .WithMany()
                        .HasForeignKey("ClientId")
                        .HasConstraintName("fk_auth_sessions_auth_clients_client_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAuthSession", "ParentSession")
                        .WithMany()
                        .HasForeignKey("ParentSessionId")
                        .HasConstraintName("fk_auth_sessions_auth_sessions_parent_session_id");

                    b.Navigation("Account");

                    b.Navigation("Client");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_account_check_in_results_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_experience_records_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_lotteries_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .HasConstraintName("fk_magic_spells_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnPermissionGroup", "Group")
                        .WithMany("Members")
                        .HasForeignKey("GroupId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_permission_group_members_permission_groups_group_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnPermissionGroup", "Group")
                        .WithMany("Nodes")
                        .HasForeignKey("GroupId")
                        .HasConstraintName("fk_permission_nodes_permission_groups_group_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_presence_activities_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnRealm", "Realm")
                        .WithMany("Members")
                        .HasForeignKey("RealmId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_realm_members_realms_realm_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnRewindPoint", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_rewind_points_accounts_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_social_credit_records_accounts_account_id");

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

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "CreatorAccount")
                        .WithMany()
                        .HasForeignKey("CreatorAccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_funds_accounts_creator_account_id");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFundRecipient", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnWalletFund", "Fund")
                        .WithMany("Recipients")
                        .HasForeignKey("FundId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_fund_recipients_wallet_funds_fund_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "RecipientAccount")
                        .WithMany()
                        .HasForeignKey("RecipientAccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_fund_recipients_accounts_recipient_account_id");

                    b.Navigation("Fund");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnWalletCoupon", "Coupon")
                        .WithMany()
                        .HasForeignKey("CouponId")
                        .HasConstraintName("fk_wallet_gifts_wallet_coupons_coupon_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Gifter")
                        .WithMany()
                        .HasForeignKey("GifterId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_gifts_accounts_gifter_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Recipient")
                        .WithMany()
                        .HasForeignKey("RecipientId")
                        .HasConstraintName("fk_wallet_gifts_accounts_recipient_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Redeemer")
                        .WithMany()
                        .HasForeignKey("RedeemerId")
                        .HasConstraintName("fk_wallet_gifts_accounts_redeemer_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnWalletSubscription", "Subscription")
                        .WithOne("Gift")
                        .HasForeignKey("DysonNetwork.Shared.Models.SnWalletGift", "SubscriptionId")
                        .HasConstraintName("fk_wallet_gifts_wallet_subscriptions_subscription_id");

                    b.Navigation("Coupon");

                    b.Navigation("Gifter");

                    b.Navigation("Recipient");

                    b.Navigation("Redeemer");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletOrder", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnWallet", "PayeeWallet")
                        .WithMany()
                        .HasForeignKey("PayeeWalletId")
                        .HasConstraintName("fk_payment_orders_wallets_payee_wallet_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnWalletTransaction", "Transaction")
                        .WithMany()
                        .HasForeignKey("TransactionId")
                        .HasConstraintName("fk_payment_orders_payment_transactions_transaction_id");

                    b.Navigation("PayeeWallet");

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

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

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnAccount", "Account")
                        .WithMany()
                        .HasForeignKey("AccountId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired()
                        .HasConstraintName("fk_wallet_subscriptions_accounts_account_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnWalletCoupon", "Coupon")
                        .WithMany()
                        .HasForeignKey("CouponId")
                        .HasConstraintName("fk_wallet_subscriptions_wallet_coupons_coupon_id");

                    b.Navigation("Account");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletTransaction", b =>
                {
                    b.HasOne("DysonNetwork.Shared.Models.SnWallet", "PayeeWallet")
                        .WithMany()
                        .HasForeignKey("PayeeWalletId")
                        .HasConstraintName("fk_payment_transactions_wallets_payee_wallet_id");

                    b.HasOne("DysonNetwork.Shared.Models.SnWallet", "PayerWallet")
                        .WithMany()
                        .HasForeignKey("PayerWalletId")
                        .HasConstraintName("fk_payment_transactions_wallets_payer_wallet_id");

                    b.Navigation("PayeeWallet");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", 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.Shared.Models.SnPermissionGroup", b =>
                {
                    b.Navigation("Members");

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

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b =>
                {
                    b.Navigation("Members");
                });

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b =>
                {
                    b.Navigation("Pockets");
                });

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletFund", b =>
                {
                    b.Navigation("Recipients");
                });

            modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b =>
                {
                    b.Navigation("Gift");
                });
#pragma warning restore 612, 618
        }
    }
}
