diff --git a/DysonNetwork.Pass/DysonNetwork.Pass.csproj b/DysonNetwork.Pass/DysonNetwork.Pass.csproj index 57114d3..ae96bba 100644 --- a/DysonNetwork.Pass/DysonNetwork.Pass.csproj +++ b/DysonNetwork.Pass/DysonNetwork.Pass.csproj @@ -132,4 +132,8 @@ + + + + diff --git a/DysonNetwork.Pass/Migrations/20250715075623_ReinitalMigration.cs b/DysonNetwork.Pass/Migrations/20250715075623_ReinitalMigration.cs deleted file mode 100644 index b649b94..0000000 --- a/DysonNetwork.Pass/Migrations/20250715075623_ReinitalMigration.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class ReinitalMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "background_id", - table: "account_profiles"); - - migrationBuilder.DropColumn( - name: "picture_id", - table: "account_profiles"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "background_id", - table: "account_profiles", - type: "character varying(32)", - maxLength: 32, - nullable: true); - - migrationBuilder.AddColumn( - name: "picture_id", - table: "account_profiles", - type: "character varying(32)", - maxLength: 32, - nullable: true); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250720193202_RemoveNotification.cs b/DysonNetwork.Pass/Migrations/20250720193202_RemoveNotification.cs deleted file mode 100644 index d31cdb8..0000000 --- a/DysonNetwork.Pass/Migrations/20250720193202_RemoveNotification.cs +++ /dev/null @@ -1,94 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RemoveNotification : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "notification_push_subscriptions"); - - migrationBuilder.DropTable( - name: "notifications"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "notification_push_subscriptions", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true), - device_id = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - device_token = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - last_used_at = table.Column(type: "timestamp with time zone", nullable: true), - provider = table.Column(type: "integer", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_notification_push_subscriptions", x => x.id); - table.ForeignKey( - name: "fk_notification_push_subscriptions_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "notifications", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - content = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true), - meta = table.Column>(type: "jsonb", nullable: true), - priority = table.Column(type: "integer", nullable: false), - subtitle = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), - title = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - topic = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - viewed_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_notifications", x => x.id); - table.ForeignKey( - name: "fk_notifications_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_notification_push_subscriptions_account_id", - table: "notification_push_subscriptions", - column: "account_id"); - - migrationBuilder.CreateIndex( - name: "ix_notification_push_subscriptions_device_token_device_id_acco", - table: "notification_push_subscriptions", - columns: new[] { "device_token", "device_id", "account_id" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_notifications_account_id", - table: "notifications", - column: "account_id"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250731071524_AddCheckInBackdated.cs b/DysonNetwork.Pass/Migrations/20250731071524_AddCheckInBackdated.cs deleted file mode 100644 index ab4e3a2..0000000 --- a/DysonNetwork.Pass/Migrations/20250731071524_AddCheckInBackdated.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddCheckInBackdated : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "backdated_from", - table: "account_check_in_results", - type: "timestamp with time zone", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "backdated_from", - table: "account_check_in_results"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250807162919_RemoveDevelopers.cs b/DysonNetwork.Pass/Migrations/20250807162919_RemoveDevelopers.cs deleted file mode 100644 index 62cb7e2..0000000 --- a/DysonNetwork.Pass/Migrations/20250807162919_RemoveDevelopers.cs +++ /dev/null @@ -1,130 +0,0 @@ -using DysonNetwork.Shared.Models; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RemoveDevelopers : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_sessions_custom_apps_app_id", - table: "auth_sessions"); - - migrationBuilder.DropTable( - name: "custom_app_secrets"); - - migrationBuilder.DropTable( - name: "custom_apps"); - - migrationBuilder.DropIndex( - name: "ix_auth_sessions_app_id", - table: "auth_sessions"); - - migrationBuilder.CreateTable( - name: "punishments", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - reason = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false), - expired_at = table.Column(type: "timestamp with time zone", nullable: true), - type = table.Column(type: "integer", nullable: false), - blocked_permissions = table.Column>(type: "jsonb", nullable: true), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_punishments", x => x.id); - table.ForeignKey( - name: "fk_punishments_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_punishments_account_id", - table: "punishments", - column: "account_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "punishments"); - - migrationBuilder.CreateTable( - name: "custom_apps", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - background = table.Column(type: "jsonb", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - picture = table.Column(type: "jsonb", nullable: true), - slug = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - status = table.Column(type: "integer", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - verification = table.Column(type: "jsonb", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_custom_apps", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "custom_app_secrets", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - app_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - expired_at = table.Column(type: "timestamp with time zone", nullable: true), - is_oidc = table.Column(type: "boolean", nullable: false), - secret = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_custom_app_secrets", x => x.id); - table.ForeignKey( - name: "fk_custom_app_secrets_custom_apps_app_id", - column: x => x.app_id, - principalTable: "custom_apps", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_auth_sessions_app_id", - table: "auth_sessions", - column: "app_id"); - - migrationBuilder.CreateIndex( - name: "ix_custom_app_secrets_app_id", - table: "custom_app_secrets", - column: "app_id"); - - migrationBuilder.AddForeignKey( - name: "fk_auth_sessions_custom_apps_app_id", - table: "auth_sessions", - column: "app_id", - principalTable: "custom_apps", - principalColumn: "id"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250808152643_AddProfileLinks.cs b/DysonNetwork.Pass/Migrations/20250808152643_AddProfileLinks.cs deleted file mode 100644 index e3aeea7..0000000 --- a/DysonNetwork.Pass/Migrations/20250808152643_AddProfileLinks.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddProfileLinks : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn>( - name: "links", - table: "account_profiles", - type: "jsonb", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "links", - table: "account_profiles"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250808152851_AddPublicContact.cs b/DysonNetwork.Pass/Migrations/20250808152851_AddPublicContact.cs deleted file mode 100644 index 17e3d5a..0000000 --- a/DysonNetwork.Pass/Migrations/20250808152851_AddPublicContact.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddPublicContact : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "is_public", - table: "account_contacts", - type: "boolean", - nullable: false, - defaultValue: false); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "is_public", - table: "account_contacts"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250813072436_AddAuthorizeDevice.cs b/DysonNetwork.Pass/Migrations/20250813072436_AddAuthorizeDevice.cs deleted file mode 100644 index 7809741..0000000 --- a/DysonNetwork.Pass/Migrations/20250813072436_AddAuthorizeDevice.cs +++ /dev/null @@ -1,109 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddAuthorizeDevice : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "device_id", - table: "auth_challenges", - type: "character varying(1024)", - maxLength: 1024, - nullable: true, - oldClrType: typeof(string), - oldType: "character varying(256)", - oldMaxLength: 256, - oldNullable: true); - - migrationBuilder.AddColumn( - name: "client_id", - table: "auth_challenges", - type: "uuid", - nullable: true); - - migrationBuilder.CreateTable( - name: "auth_clients", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - device_name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - device_label = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - device_id = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_auth_clients", x => x.id); - table.ForeignKey( - name: "fk_auth_clients_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_auth_challenges_client_id", - table: "auth_challenges", - column: "client_id"); - - migrationBuilder.CreateIndex( - name: "ix_auth_clients_account_id", - table: "auth_clients", - column: "account_id"); - - migrationBuilder.CreateIndex( - name: "ix_auth_clients_device_id", - table: "auth_clients", - column: "device_id", - unique: true); - - migrationBuilder.AddForeignKey( - name: "fk_auth_challenges_auth_clients_client_id", - table: "auth_challenges", - column: "client_id", - principalTable: "auth_clients", - principalColumn: "id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_challenges_auth_clients_client_id", - table: "auth_challenges"); - - migrationBuilder.DropTable( - name: "auth_clients"); - - migrationBuilder.DropIndex( - name: "ix_auth_challenges_client_id", - table: "auth_challenges"); - - migrationBuilder.DropColumn( - name: "client_id", - table: "auth_challenges"); - - migrationBuilder.AlterColumn( - name: "device_id", - table: "auth_challenges", - type: "character varying(256)", - maxLength: 256, - nullable: true, - oldClrType: typeof(string), - oldType: "character varying(1024)", - oldMaxLength: 1024, - oldNullable: true); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250813121421_AddAuthDevicePlatform.cs b/DysonNetwork.Pass/Migrations/20250813121421_AddAuthDevicePlatform.cs deleted file mode 100644 index 143b720..0000000 --- a/DysonNetwork.Pass/Migrations/20250813121421_AddAuthDevicePlatform.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddAuthDevicePlatform : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "platform", - table: "auth_challenges"); - - migrationBuilder.AddColumn( - name: "platform", - table: "auth_clients", - type: "integer", - nullable: false, - defaultValue: 0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "platform", - table: "auth_clients"); - - migrationBuilder.AddColumn( - name: "platform", - table: "auth_challenges", - type: "integer", - nullable: false, - defaultValue: 0); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250815041723_RemoveAuthClientIndex.cs b/DysonNetwork.Pass/Migrations/20250815041723_RemoveAuthClientIndex.cs deleted file mode 100644 index dc9f089..0000000 --- a/DysonNetwork.Pass/Migrations/20250815041723_RemoveAuthClientIndex.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RemoveAuthClientIndex : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "ix_auth_clients_device_id", - table: "auth_clients"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateIndex( - name: "ix_auth_clients_device_id", - table: "auth_clients", - column: "device_id", - unique: true); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250818125540_RemoveChallengeOldDeviceId.cs b/DysonNetwork.Pass/Migrations/20250818125540_RemoveChallengeOldDeviceId.cs deleted file mode 100644 index 7efa0bf..0000000 --- a/DysonNetwork.Pass/Migrations/20250818125540_RemoveChallengeOldDeviceId.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RemoveChallengeOldDeviceId : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "device_id", - table: "auth_challenges"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "device_id", - table: "auth_challenges", - type: "character varying(1024)", - maxLength: 1024, - nullable: true); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250819162856_AddBotAccount.cs b/DysonNetwork.Pass/Migrations/20250819162856_AddBotAccount.cs deleted file mode 100644 index 4bafc44..0000000 --- a/DysonNetwork.Pass/Migrations/20250819162856_AddBotAccount.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddBotAccount : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "automated_id", - table: "accounts", - type: "uuid", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "automated_id", - table: "accounts"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250820104425_AddApiKeys.cs b/DysonNetwork.Pass/Migrations/20250820104425_AddApiKeys.cs deleted file mode 100644 index 3728292..0000000 --- a/DysonNetwork.Pass/Migrations/20250820104425_AddApiKeys.cs +++ /dev/null @@ -1,113 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddApiKeys : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "label", - table: "auth_sessions"); - - migrationBuilder.AlterColumn( - name: "challenge_id", - table: "auth_sessions", - type: "uuid", - nullable: true, - oldClrType: typeof(Guid), - oldType: "uuid"); - - migrationBuilder.CreateTable( - name: "api_keys", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - label = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - session_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_api_keys", x => x.id); - table.ForeignKey( - name: "fk_api_keys_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_api_keys_auth_sessions_session_id", - column: x => x.session_id, - principalTable: "auth_sessions", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_api_keys_account_id", - table: "api_keys", - column: "account_id"); - - migrationBuilder.CreateIndex( - name: "ix_api_keys_session_id", - table: "api_keys", - column: "session_id"); - - migrationBuilder.AddForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - table: "auth_sessions", - column: "challenge_id", - principalTable: "auth_challenges", - principalColumn: "id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - table: "auth_sessions"); - - migrationBuilder.DropTable( - name: "api_keys"); - - migrationBuilder.AlterColumn( - name: "challenge_id", - table: "auth_sessions", - type: "uuid", - nullable: false, - defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), - oldClrType: typeof(Guid), - oldType: "uuid", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "label", - table: "auth_sessions", - type: "character varying(1024)", - maxLength: 1024, - nullable: true); - - migrationBuilder.AddForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - table: "auth_sessions", - column: "challenge_id", - principalTable: "auth_challenges", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250820120632_AddCreditAndLevelingRecords.cs b/DysonNetwork.Pass/Migrations/20250820120632_AddCreditAndLevelingRecords.cs deleted file mode 100644 index 9f7da01..0000000 --- a/DysonNetwork.Pass/Migrations/20250820120632_AddCreditAndLevelingRecords.cs +++ /dev/null @@ -1,84 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddCreditAndLevelingRecords : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "experience_records", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - reason_type = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - reason = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - delta = table.Column(type: "bigint", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_experience_records", x => x.id); - table.ForeignKey( - name: "fk_experience_records_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "social_credit_records", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - reason_type = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - reason = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - delta = table.Column(type: "double precision", nullable: false), - expired_at = table.Column(type: "timestamp with time zone", nullable: true), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_social_credit_records", x => x.id); - table.ForeignKey( - name: "fk_social_credit_records_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_experience_records_account_id", - table: "experience_records", - column: "account_id"); - - migrationBuilder.CreateIndex( - name: "ix_social_credit_records_account_id", - table: "social_credit_records", - column: "account_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "experience_records"); - - migrationBuilder.DropTable( - name: "social_credit_records"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250821093930_AddLevelingBonusMultiplier.cs b/DysonNetwork.Pass/Migrations/20250821093930_AddLevelingBonusMultiplier.cs deleted file mode 100644 index 487dff6..0000000 --- a/DysonNetwork.Pass/Migrations/20250821093930_AddLevelingBonusMultiplier.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddLevelingBonusMultiplier : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "bonus_multiplier", - table: "experience_records", - type: "double precision", - nullable: false, - defaultValue: 0.0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "bonus_multiplier", - table: "experience_records"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250822142926_CacheSocialCreditsInProfile.cs b/DysonNetwork.Pass/Migrations/20250822142926_CacheSocialCreditsInProfile.cs deleted file mode 100644 index 3753fe9..0000000 --- a/DysonNetwork.Pass/Migrations/20250822142926_CacheSocialCreditsInProfile.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class CacheSocialCreditsInProfile : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "social_credits", - table: "account_profiles", - type: "double precision", - nullable: false, - defaultValue: 0.0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "social_credits", - table: "account_profiles"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250904144723_AddOrderProductIdentifier.cs b/DysonNetwork.Pass/Migrations/20250904144723_AddOrderProductIdentifier.cs deleted file mode 100644 index ba30744..0000000 --- a/DysonNetwork.Pass/Migrations/20250904144723_AddOrderProductIdentifier.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddOrderProductIdentifier : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "product_identifier", - table: "payment_orders", - type: "character varying(4096)", - maxLength: 4096, - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "product_identifier", - table: "payment_orders"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250906174610_AddAccountRegion.cs b/DysonNetwork.Pass/Migrations/20250906174610_AddAccountRegion.cs deleted file mode 100644 index d489ebe..0000000 --- a/DysonNetwork.Pass/Migrations/20250906174610_AddAccountRegion.cs +++ /dev/null @@ -1,30 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddAccountRegion : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "region", - table: "accounts", - type: "character varying(32)", - maxLength: 32, - nullable: false, - defaultValue: ""); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "region", - table: "accounts"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250907065433_RefactorGeoIpPoint.cs b/DysonNetwork.Pass/Migrations/20250907065433_RefactorGeoIpPoint.cs deleted file mode 100644 index 894f089..0000000 --- a/DysonNetwork.Pass/Migrations/20250907065433_RefactorGeoIpPoint.cs +++ /dev/null @@ -1,63 +0,0 @@ -using DysonNetwork.Shared.Geometry; -using Microsoft.EntityFrameworkCore.Migrations; -using NetTopologySuite.Geometries; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RefactorGeoIpPoint : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.Sql("UPDATE auth_challenges SET location = NULL;"); - migrationBuilder.Sql("UPDATE action_logs SET location = NULL;"); - - migrationBuilder.DropColumn( - name: "location", - table: "auth_challenges"); - - migrationBuilder.AddColumn( - name: "location", - table: "auth_challenges", - type: "jsonb", - nullable: true); - - migrationBuilder.DropColumn( - name: "location", - table: "action_logs"); - - migrationBuilder.AddColumn( - name: "location", - table: "action_logs", - type: "jsonb", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "location", - table: "auth_challenges"); - - migrationBuilder.AddColumn( - name: "location", - table: "auth_challenges", - type: "geometry", - nullable: true); - - migrationBuilder.DropColumn( - name: "location", - table: "action_logs"); - - migrationBuilder.AddColumn( - name: "location", - table: "action_logs", - type: "geometry", - nullable: true); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250907065933_RemoveNetTopo.cs b/DysonNetwork.Pass/Migrations/20250907065933_RemoveNetTopo.cs deleted file mode 100644 index 44abcf2..0000000 --- a/DysonNetwork.Pass/Migrations/20250907065933_RemoveNetTopo.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RemoveNetTopo : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .OldAnnotation("Npgsql:PostgresExtension:postgis", ",,"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterDatabase() - .Annotation("Npgsql:PostgresExtension:postgis", ",,"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250908151924_AddAutomatedStatus.cs b/DysonNetwork.Pass/Migrations/20250908151924_AddAutomatedStatus.cs deleted file mode 100644 index 80ff578..0000000 --- a/DysonNetwork.Pass/Migrations/20250908151924_AddAutomatedStatus.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddAutomatedStatus : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "app_identifier", - table: "account_statuses", - type: "character varying(4096)", - maxLength: 4096, - nullable: true); - - migrationBuilder.AddColumn( - name: "is_automated", - table: "account_statuses", - type: "boolean", - nullable: false, - defaultValue: false); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "app_identifier", - table: "account_statuses"); - - migrationBuilder.DropColumn( - name: "is_automated", - table: "account_statuses"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20250924054811_AddStatusMeta.cs b/DysonNetwork.Pass/Migrations/20250924054811_AddStatusMeta.cs deleted file mode 100644 index c1b526e..0000000 --- a/DysonNetwork.Pass/Migrations/20250924054811_AddStatusMeta.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddStatusMeta : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn>( - name: "meta", - table: "account_statuses", - type: "jsonb", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "meta", - table: "account_statuses"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251003061315_AddSubscriptionGift.Designer.cs b/DysonNetwork.Pass/Migrations/20251003061315_AddSubscriptionGift.Designer.cs deleted file mode 100644 index d3afdd9..0000000 --- a/DysonNetwork.Pass/Migrations/20251003061315_AddSubscriptionGift.Designer.cs +++ /dev/null @@ -1,2207 +0,0 @@ -// -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("20251003061315_AddSubscriptionGift")] - partial class AddSubscriptionGift - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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.SnWalletGift", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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.ToTable("wallet_gifts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletOrder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("GiftId") - .HasColumnType("uuid") - .HasColumnName("gift_id"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("GiftId") - .IsUnique() - .HasDatabaseName("ix_wallet_subscriptions_gift_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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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.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.Navigation("Coupon"); - - b.Navigation("Gifter"); - - b.Navigation("Recipient"); - - b.Navigation("Redeemer"); - }); - - 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.HasOne("DysonNetwork.Shared.Models.SnWalletGift", "Gift") - .WithOne("Subscription") - .HasForeignKey("DysonNetwork.Shared.Models.SnWalletSubscription", "GiftId") - .HasConstraintName("fk_wallet_subscriptions_wallet_gifts_gift_id"); - - b.Navigation("Account"); - - b.Navigation("Coupon"); - - b.Navigation("Gift"); - }); - - 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.SnWallet", b => - { - b.Navigation("Pockets"); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletGift", b => - { - b.Navigation("Subscription"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251003061315_AddSubscriptionGift.cs b/DysonNetwork.Pass/Migrations/20251003061315_AddSubscriptionGift.cs deleted file mode 100644 index 2e002af..0000000 --- a/DysonNetwork.Pass/Migrations/20251003061315_AddSubscriptionGift.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using DysonNetwork.Shared.Models; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddSubscriptionGift : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "wallet_gifts", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - gifter_id = table.Column(type: "uuid", nullable: false), - recipient_id = table.Column(type: "uuid", nullable: true), - gift_code = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - message = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), - subscription_identifier = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - base_price = table.Column(type: "numeric", nullable: false), - final_price = table.Column(type: "numeric", nullable: false), - status = table.Column(type: "integer", nullable: false), - redeemed_at = table.Column(type: "timestamp with time zone", nullable: true), - redeemer_id = table.Column(type: "uuid", nullable: true), - expires_at = table.Column(type: "timestamp with time zone", nullable: false), - is_open_gift = table.Column(type: "boolean", nullable: false), - payment_method = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - payment_details = table.Column(type: "jsonb", nullable: false), - coupon_id = table.Column(type: "uuid", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_wallet_gifts", x => x.id); - table.ForeignKey( - name: "fk_wallet_gifts_accounts_gifter_id", - column: x => x.gifter_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_wallet_gifts_accounts_recipient_id", - column: x => x.recipient_id, - principalTable: "accounts", - principalColumn: "id"); - table.ForeignKey( - name: "fk_wallet_gifts_accounts_redeemer_id", - column: x => x.redeemer_id, - principalTable: "accounts", - principalColumn: "id"); - table.ForeignKey( - name: "fk_wallet_gifts_wallet_coupons_coupon_id", - column: x => x.coupon_id, - principalTable: "wallet_coupons", - principalColumn: "id"); - }); - - migrationBuilder.AddColumn( - name: "gift_id", - table: "wallet_subscriptions", - type: "uuid", - nullable: true); - - migrationBuilder.CreateIndex( - name: "ix_wallet_gifts_coupon_id", - table: "wallet_gifts", - column: "coupon_id"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_gifts_gift_code", - table: "wallet_gifts", - column: "gift_code"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_gifts_gifter_id", - table: "wallet_gifts", - column: "gifter_id"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_gifts_recipient_id", - table: "wallet_gifts", - column: "recipient_id"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_gifts_redeemer_id", - table: "wallet_gifts", - column: "redeemer_id"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_subscriptions_gift_id", - table: "wallet_subscriptions", - column: "gift_id", - unique: true); - - migrationBuilder.AddForeignKey( - name: "fk_wallet_subscriptions_wallet_gifts_gift_id", - table: "wallet_subscriptions", - column: "gift_id", - principalTable: "wallet_gifts", - principalColumn: "id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_wallet_subscriptions_wallet_gifts_gift_id", - table: "wallet_subscriptions"); - - migrationBuilder.DropTable( - name: "wallet_gifts"); - - migrationBuilder.DropIndex( - name: "ix_wallet_subscriptions_gift_id", - table: "wallet_subscriptions"); - - migrationBuilder.DropColumn( - name: "gift_id", - table: "wallet_subscriptions"); - } - } -} \ No newline at end of file diff --git a/DysonNetwork.Pass/Migrations/20251003123103_RefactorSubscriptionRelation.Designer.cs b/DysonNetwork.Pass/Migrations/20251003123103_RefactorSubscriptionRelation.Designer.cs deleted file mode 100644 index 26c96a4..0000000 --- a/DysonNetwork.Pass/Migrations/20251003123103_RefactorSubscriptionRelation.Designer.cs +++ /dev/null @@ -1,2207 +0,0 @@ -// -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("20251003123103_RefactorSubscriptionRelation")] - partial class RefactorSubscriptionRelation - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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.SnWalletGift", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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.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.SnWallet", b => - { - b.Navigation("Pockets"); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWalletSubscription", b => - { - b.Navigation("Gift"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251003123103_RefactorSubscriptionRelation.cs b/DysonNetwork.Pass/Migrations/20251003123103_RefactorSubscriptionRelation.cs deleted file mode 100644 index 6022d23..0000000 --- a/DysonNetwork.Pass/Migrations/20251003123103_RefactorSubscriptionRelation.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RefactorSubscriptionRelation : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_wallet_subscriptions_wallet_gifts_gift_id", - table: "wallet_subscriptions"); - - migrationBuilder.DropIndex( - name: "ix_wallet_subscriptions_gift_id", - table: "wallet_subscriptions"); - - migrationBuilder.DropColumn( - name: "gift_id", - table: "wallet_subscriptions"); - - migrationBuilder.AddColumn( - name: "subscription_id", - table: "wallet_gifts", - type: "uuid", - nullable: true); - - migrationBuilder.CreateIndex( - name: "ix_wallet_gifts_subscription_id", - table: "wallet_gifts", - column: "subscription_id", - unique: true); - - migrationBuilder.AddForeignKey( - name: "fk_wallet_gifts_wallet_subscriptions_subscription_id", - table: "wallet_gifts", - column: "subscription_id", - principalTable: "wallet_subscriptions", - principalColumn: "id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_wallet_gifts_wallet_subscriptions_subscription_id", - table: "wallet_gifts"); - - migrationBuilder.DropIndex( - name: "ix_wallet_gifts_subscription_id", - table: "wallet_gifts"); - - migrationBuilder.DropColumn( - name: "subscription_id", - table: "wallet_gifts"); - - migrationBuilder.AddColumn( - name: "gift_id", - table: "wallet_subscriptions", - type: "uuid", - nullable: true); - - migrationBuilder.CreateIndex( - name: "ix_wallet_subscriptions_gift_id", - table: "wallet_subscriptions", - column: "gift_id", - unique: true); - - migrationBuilder.AddForeignKey( - name: "fk_wallet_subscriptions_wallet_gifts_gift_id", - table: "wallet_subscriptions", - column: "gift_id", - principalTable: "wallet_gifts", - principalColumn: "id"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251003152102_AddWalletFund.Designer.cs b/DysonNetwork.Pass/Migrations/20251003152102_AddWalletFund.Designer.cs deleted file mode 100644 index d23f6fa..0000000 --- a/DysonNetwork.Pass/Migrations/20251003152102_AddWalletFund.Designer.cs +++ /dev/null @@ -1,2355 +0,0 @@ -// -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("20251003152102_AddWalletFund")] - partial class AddWalletFund - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251003152102_AddWalletFund.cs b/DysonNetwork.Pass/Migrations/20251003152102_AddWalletFund.cs deleted file mode 100644 index a1f6a79..0000000 --- a/DysonNetwork.Pass/Migrations/20251003152102_AddWalletFund.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddWalletFund : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "wallet_funds", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - currency = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), - total_amount = table.Column(type: "numeric", nullable: false), - split_type = table.Column(type: "integer", nullable: false), - status = table.Column(type: "integer", nullable: false), - message = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - creator_account_id = table.Column(type: "uuid", nullable: false), - expired_at = table.Column(type: "timestamp with time zone", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_wallet_funds", x => x.id); - table.ForeignKey( - name: "fk_wallet_funds_accounts_creator_account_id", - column: x => x.creator_account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "wallet_fund_recipients", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - fund_id = table.Column(type: "uuid", nullable: false), - recipient_account_id = table.Column(type: "uuid", nullable: false), - amount = table.Column(type: "numeric", nullable: false), - is_received = table.Column(type: "boolean", nullable: false), - received_at = table.Column(type: "timestamp with time zone", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_wallet_fund_recipients", x => x.id); - table.ForeignKey( - name: "fk_wallet_fund_recipients_accounts_recipient_account_id", - column: x => x.recipient_account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - table.ForeignKey( - name: "fk_wallet_fund_recipients_wallet_funds_fund_id", - column: x => x.fund_id, - principalTable: "wallet_funds", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_wallet_fund_recipients_fund_id", - table: "wallet_fund_recipients", - column: "fund_id"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_fund_recipients_recipient_account_id", - table: "wallet_fund_recipients", - column: "recipient_account_id"); - - migrationBuilder.CreateIndex( - name: "ix_wallet_funds_creator_account_id", - table: "wallet_funds", - column: "creator_account_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "wallet_fund_recipients"); - - migrationBuilder.DropTable( - name: "wallet_funds"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251008050851_AddUsernameColor.Designer.cs b/DysonNetwork.Pass/Migrations/20251008050851_AddUsernameColor.Designer.cs deleted file mode 100644 index 946d191..0000000 --- a/DysonNetwork.Pass/Migrations/20251008050851_AddUsernameColor.Designer.cs +++ /dev/null @@ -1,2359 +0,0 @@ -// -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("20251008050851_AddUsernameColor")] - partial class AddUsernameColor - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251008050851_AddUsernameColor.cs b/DysonNetwork.Pass/Migrations/20251008050851_AddUsernameColor.cs deleted file mode 100644 index e5d86c5..0000000 --- a/DysonNetwork.Pass/Migrations/20251008050851_AddUsernameColor.cs +++ /dev/null @@ -1,29 +0,0 @@ -using DysonNetwork.Shared.Models; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddUsernameColor : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "username_color", - table: "account_profiles", - type: "jsonb", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "username_color", - table: "account_profiles"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251021153439_AddRealmFromSphere.Designer.cs b/DysonNetwork.Pass/Migrations/20251021153439_AddRealmFromSphere.Designer.cs deleted file mode 100644 index f83b2e2..0000000 --- a/DysonNetwork.Pass/Migrations/20251021153439_AddRealmFromSphere.Designer.cs +++ /dev/null @@ -1,2677 +0,0 @@ -// -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("20251021153439_AddRealmFromSphere")] - partial class AddRealmFromSphere - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.7") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatMember", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BreakUntil") - .HasColumnType("timestamp with time zone") - .HasColumnName("break_until"); - - b.Property("ChatRoomId") - .HasColumnType("uuid") - .HasColumnName("chat_room_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsBot") - .HasColumnType("boolean") - .HasColumnName("is_bot"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LastReadAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_read_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Nick") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nick"); - - b.Property("Notify") - .HasColumnType("integer") - .HasColumnName("notify"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("TimeoutCause") - .HasColumnType("jsonb") - .HasColumnName("timeout_cause"); - - b.Property("TimeoutUntil") - .HasColumnType("timestamp with time zone") - .HasColumnName("timeout_until"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_sn_chat_member"); - - b.HasIndex("ChatRoomId") - .HasDatabaseName("ix_sn_chat_member_chat_room_id"); - - b.ToTable("sn_chat_member", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatRoom", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("BackgroundId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("background_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("PictureId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("picture_id"); - - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("SnRealmId") - .HasColumnType("uuid") - .HasColumnName("sn_realm_id"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_sn_chat_room"); - - b.HasIndex("SnRealmId") - .HasDatabaseName("ix_sn_chat_room_sn_realm_id"); - - b.ToTable("sn_chat_room", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("BackgroundId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("background_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("PictureId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("picture_id"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatMember", b => - { - b.HasOne("DysonNetwork.Shared.Models.SnChatRoom", "ChatRoom") - .WithMany("Members") - .HasForeignKey("ChatRoomId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("fk_sn_chat_member_sn_chat_room_chat_room_id"); - - b.Navigation("ChatRoom"); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnChatRoom", b => - { - b.HasOne("DysonNetwork.Shared.Models.SnRealm", null) - .WithMany("ChatRooms") - .HasForeignKey("SnRealmId") - .HasConstraintName("fk_sn_chat_room_realms_sn_realm_id"); - }); - - 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.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.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.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.SnChatRoom", b => - { - b.Navigation("Members"); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Navigation("Members"); - - b.Navigation("Nodes"); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b => - { - b.Navigation("ChatRooms"); - - 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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251021153439_AddRealmFromSphere.cs b/DysonNetwork.Pass/Migrations/20251021153439_AddRealmFromSphere.cs deleted file mode 100644 index 2fa7220..0000000 --- a/DysonNetwork.Pass/Migrations/20251021153439_AddRealmFromSphere.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using DysonNetwork.Shared.Models; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddRealmFromSphere : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "realms", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - slug = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - is_community = table.Column(type: "boolean", nullable: false), - is_public = table.Column(type: "boolean", nullable: false), - picture_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - background_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - picture = table.Column(type: "jsonb", nullable: true), - background = table.Column(type: "jsonb", nullable: true), - verification = table.Column(type: "jsonb", nullable: true), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_realms", x => x.id); - }); - - migrationBuilder.CreateTable( - name: "realm_members", - columns: table => new - { - realm_id = table.Column(type: "uuid", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - role = table.Column(type: "integer", nullable: false), - joined_at = table.Column(type: "timestamp with time zone", nullable: true), - leave_at = table.Column(type: "timestamp with time zone", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_realm_members", x => new { x.realm_id, x.account_id }); - table.ForeignKey( - name: "fk_realm_members_realms_realm_id", - column: x => x.realm_id, - principalTable: "realms", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "sn_chat_room", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - type = table.Column(type: "integer", nullable: false), - is_community = table.Column(type: "boolean", nullable: false), - is_public = table.Column(type: "boolean", nullable: false), - picture_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - background_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - picture = table.Column(type: "jsonb", nullable: true), - background = table.Column(type: "jsonb", nullable: true), - realm_id = table.Column(type: "uuid", nullable: true), - sn_realm_id = table.Column(type: "uuid", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_sn_chat_room", x => x.id); - table.ForeignKey( - name: "fk_sn_chat_room_realms_sn_realm_id", - column: x => x.sn_realm_id, - principalTable: "realms", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "sn_chat_member", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - chat_room_id = table.Column(type: "uuid", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - nick = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - role = table.Column(type: "integer", nullable: false), - notify = table.Column(type: "integer", nullable: false), - last_read_at = table.Column(type: "timestamp with time zone", nullable: true), - joined_at = table.Column(type: "timestamp with time zone", nullable: true), - leave_at = table.Column(type: "timestamp with time zone", nullable: true), - is_bot = table.Column(type: "boolean", nullable: false), - break_until = table.Column(type: "timestamp with time zone", nullable: true), - timeout_until = table.Column(type: "timestamp with time zone", nullable: true), - timeout_cause = table.Column(type: "jsonb", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_sn_chat_member", x => x.id); - table.ForeignKey( - name: "fk_sn_chat_member_sn_chat_room_chat_room_id", - column: x => x.chat_room_id, - principalTable: "sn_chat_room", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_realms_slug", - table: "realms", - column: "slug", - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_sn_chat_member_chat_room_id", - table: "sn_chat_member", - column: "chat_room_id"); - - migrationBuilder.CreateIndex( - name: "ix_sn_chat_room_sn_realm_id", - table: "sn_chat_room", - column: "sn_realm_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "realm_members"); - - migrationBuilder.DropTable( - name: "sn_chat_member"); - - migrationBuilder.DropTable( - name: "sn_chat_room"); - - migrationBuilder.DropTable( - name: "realms"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251022164134_RemoveChatRoom.Designer.cs b/DysonNetwork.Pass/Migrations/20251022164134_RemoveChatRoom.Designer.cs deleted file mode 100644 index 276e081..0000000 --- a/DysonNetwork.Pass/Migrations/20251022164134_RemoveChatRoom.Designer.cs +++ /dev/null @@ -1,2497 +0,0 @@ -// -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("20251022164134_RemoveChatRoom")] - partial class RemoveChatRoom - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnMagicSpell", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("BackgroundId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("background_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("PictureId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("picture_id"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251022164134_RemoveChatRoom.cs b/DysonNetwork.Pass/Migrations/20251022164134_RemoveChatRoom.cs deleted file mode 100644 index 794ed82..0000000 --- a/DysonNetwork.Pass/Migrations/20251022164134_RemoveChatRoom.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using DysonNetwork.Shared.Models; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class RemoveChatRoom : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "sn_chat_member"); - - migrationBuilder.DropTable( - name: "sn_chat_room"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "sn_chat_room", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - background = table.Column(type: "jsonb", nullable: true), - background_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - is_community = table.Column(type: "boolean", nullable: false), - is_public = table.Column(type: "boolean", nullable: false), - name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - picture = table.Column(type: "jsonb", nullable: true), - picture_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - realm_id = table.Column(type: "uuid", nullable: true), - sn_realm_id = table.Column(type: "uuid", nullable: true), - type = table.Column(type: "integer", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_sn_chat_room", x => x.id); - table.ForeignKey( - name: "fk_sn_chat_room_realms_sn_realm_id", - column: x => x.sn_realm_id, - principalTable: "realms", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "sn_chat_member", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - chat_room_id = table.Column(type: "uuid", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - break_until = table.Column(type: "timestamp with time zone", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true), - is_bot = table.Column(type: "boolean", nullable: false), - joined_at = table.Column(type: "timestamp with time zone", nullable: true), - last_read_at = table.Column(type: "timestamp with time zone", nullable: true), - leave_at = table.Column(type: "timestamp with time zone", nullable: true), - nick = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - notify = table.Column(type: "integer", nullable: false), - role = table.Column(type: "integer", nullable: false), - timeout_cause = table.Column(type: "jsonb", nullable: true), - timeout_until = table.Column(type: "timestamp with time zone", nullable: true), - updated_at = table.Column(type: "timestamp with time zone", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("pk_sn_chat_member", x => x.id); - table.ForeignKey( - name: "fk_sn_chat_member_sn_chat_room_chat_room_id", - column: x => x.chat_room_id, - principalTable: "sn_chat_room", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_sn_chat_member_chat_room_id", - table: "sn_chat_member", - column: "chat_room_id"); - - migrationBuilder.CreateIndex( - name: "ix_sn_chat_room_sn_realm_id", - table: "sn_chat_room", - column: "sn_realm_id"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251023173204_AddLotteries.Designer.cs b/DysonNetwork.Pass/Migrations/20251023173204_AddLotteries.Designer.cs deleted file mode 100644 index 5fde9c9..0000000 --- a/DysonNetwork.Pass/Migrations/20251023173204_AddLotteries.Designer.cs +++ /dev/null @@ -1,2612 +0,0 @@ -// -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("20251023173204_AddLotteries")] - partial class AddLotteries - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("BackgroundId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("background_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("PictureId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("picture_id"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251023173204_AddLotteries.cs b/DysonNetwork.Pass/Migrations/20251023173204_AddLotteries.cs deleted file mode 100644 index f849e44..0000000 --- a/DysonNetwork.Pass/Migrations/20251023173204_AddLotteries.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddLotteries : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "lotteries", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - region_one_numbers = table.Column>(type: "jsonb", nullable: false), - region_two_number = table.Column(type: "integer", nullable: false), - multiplier = table.Column(type: "integer", nullable: false), - draw_status = table.Column(type: "integer", nullable: false), - draw_date = table.Column(type: "timestamp with time zone", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_lotteries", x => x.id); - table.ForeignKey( - name: "fk_lotteries_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateTable( - name: "lottery_records", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - draw_date = table.Column(type: "timestamp with time zone", nullable: false), - winning_region_one_numbers = table.Column>(type: "jsonb", nullable: false), - winning_region_two_number = table.Column(type: "integer", nullable: false), - total_tickets = table.Column(type: "integer", nullable: false), - total_prizes_awarded = table.Column(type: "integer", nullable: false), - total_prize_amount = table.Column(type: "bigint", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_lottery_records", x => x.id); - }); - - migrationBuilder.CreateIndex( - name: "ix_lotteries_account_id", - table: "lotteries", - column: "account_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "lotteries"); - - migrationBuilder.DropTable( - name: "lottery_records"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251024154539_AddDetailLotteriesStatus.Designer.cs b/DysonNetwork.Pass/Migrations/20251024154539_AddDetailLotteriesStatus.Designer.cs deleted file mode 100644 index d95d0bc..0000000 --- a/DysonNetwork.Pass/Migrations/20251024154539_AddDetailLotteriesStatus.Designer.cs +++ /dev/null @@ -1,2620 +0,0 @@ -// -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("20251024154539_AddDetailLotteriesStatus")] - partial class AddDetailLotteriesStatus - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.9") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("BackgroundId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("background_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("PictureId") - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("picture_id"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251024154539_AddDetailLotteriesStatus.cs b/DysonNetwork.Pass/Migrations/20251024154539_AddDetailLotteriesStatus.cs deleted file mode 100644 index d926a12..0000000 --- a/DysonNetwork.Pass/Migrations/20251024154539_AddDetailLotteriesStatus.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddDetailLotteriesStatus : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn>( - name: "matched_region_one_numbers", - table: "lotteries", - type: "jsonb", - nullable: true); - - migrationBuilder.AddColumn( - name: "matched_region_two_number", - table: "lotteries", - type: "integer", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "matched_region_one_numbers", - table: "lotteries"); - - migrationBuilder.DropColumn( - name: "matched_region_two_number", - table: "lotteries"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251101092348_AddPresenceActivity.Designer.cs b/DysonNetwork.Pass/Migrations/20251101092348_AddPresenceActivity.Designer.cs deleted file mode 100644 index 364eac8..0000000 --- a/DysonNetwork.Pass/Migrations/20251101092348_AddPresenceActivity.Designer.cs +++ /dev/null @@ -1,2690 +0,0 @@ -// -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("20251101092348_AddPresenceActivity")] - partial class AddPresenceActivity - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251101092348_AddPresenceActivity.cs b/DysonNetwork.Pass/Migrations/20251101092348_AddPresenceActivity.cs deleted file mode 100644 index 6f59e07..0000000 --- a/DysonNetwork.Pass/Migrations/20251101092348_AddPresenceActivity.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddPresenceActivity : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "background_id", - table: "realms"); - - migrationBuilder.DropColumn( - name: "picture_id", - table: "realms"); - - migrationBuilder.CreateTable( - name: "presence_activities", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - type = table.Column(type: "integer", nullable: false), - manual_id = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - title = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - subtitle = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - caption = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - meta = table.Column>(type: "jsonb", nullable: true), - lease_minutes = table.Column(type: "integer", nullable: false), - lease_expires_at = table.Column(type: "timestamp with time zone", nullable: false), - account_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_presence_activities", x => x.id); - table.ForeignKey( - name: "fk_presence_activities_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_presence_activities_account_id", - table: "presence_activities", - column: "account_id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "presence_activities"); - - migrationBuilder.AddColumn( - name: "background_id", - table: "realms", - type: "character varying(32)", - maxLength: 32, - nullable: true); - - migrationBuilder.AddColumn( - name: "picture_id", - table: "realms", - type: "character varying(32)", - maxLength: 32, - nullable: true); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251101142549_EnrichPresenceActivity.Designer.cs b/DysonNetwork.Pass/Migrations/20251101142549_EnrichPresenceActivity.Designer.cs deleted file mode 100644 index 35d5d1d..0000000 --- a/DysonNetwork.Pass/Migrations/20251101142549_EnrichPresenceActivity.Designer.cs +++ /dev/null @@ -1,2710 +0,0 @@ -// -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("20251101142549_EnrichPresenceActivity")] - partial class EnrichPresenceActivity - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251101142549_EnrichPresenceActivity.cs b/DysonNetwork.Pass/Migrations/20251101142549_EnrichPresenceActivity.cs deleted file mode 100644 index f7d71e5..0000000 --- a/DysonNetwork.Pass/Migrations/20251101142549_EnrichPresenceActivity.cs +++ /dev/null @@ -1,62 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class EnrichPresenceActivity : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "large_image", - table: "presence_activities", - type: "character varying(4096)", - maxLength: 4096, - nullable: true); - - migrationBuilder.AddColumn( - name: "small_image", - table: "presence_activities", - type: "character varying(4096)", - maxLength: 4096, - nullable: true); - - migrationBuilder.AddColumn( - name: "subtitle_url", - table: "presence_activities", - type: "character varying(4096)", - maxLength: 4096, - nullable: true); - - migrationBuilder.AddColumn( - name: "title_url", - table: "presence_activities", - type: "character varying(4096)", - maxLength: 4096, - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "large_image", - table: "presence_activities"); - - migrationBuilder.DropColumn( - name: "small_image", - table: "presence_activities"); - - migrationBuilder.DropColumn( - name: "subtitle_url", - table: "presence_activities"); - - migrationBuilder.DropColumn( - name: "title_url", - table: "presence_activities"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251101175500_AddSocialCreditRecordStatus.Designer.cs b/DysonNetwork.Pass/Migrations/20251101175500_AddSocialCreditRecordStatus.Designer.cs deleted file mode 100644 index b578f76..0000000 --- a/DysonNetwork.Pass/Migrations/20251101175500_AddSocialCreditRecordStatus.Designer.cs +++ /dev/null @@ -1,2714 +0,0 @@ -// -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("20251101175500_AddSocialCreditRecordStatus")] - partial class AddSocialCreditRecordStatus - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "9.0.10") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAbuseReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251101175500_AddSocialCreditRecordStatus.cs b/DysonNetwork.Pass/Migrations/20251101175500_AddSocialCreditRecordStatus.cs deleted file mode 100644 index f4c39e4..0000000 --- a/DysonNetwork.Pass/Migrations/20251101175500_AddSocialCreditRecordStatus.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddSocialCreditRecordStatus : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "status", - table: "social_credit_records", - type: "integer", - nullable: false, - defaultValue: 0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "status", - table: "social_credit_records"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251116153151_OpenableFunds.Designer.cs b/DysonNetwork.Pass/Migrations/20251116153151_OpenableFunds.Designer.cs deleted file mode 100644 index 18dcefa..0000000 --- a/DysonNetwork.Pass/Migrations/20251116153151_OpenableFunds.Designer.cs +++ /dev/null @@ -1,2722 +0,0 @@ -// -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("20251116153151_OpenableFunds")] - partial class OpenableFunds - { - /// - 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IsOpen") - .HasColumnType("boolean") - .HasColumnName("is_open"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("RemainingAmount") - .HasColumnType("numeric") - .HasColumnName("remaining_amount"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251116153151_OpenableFunds.cs b/DysonNetwork.Pass/Migrations/20251116153151_OpenableFunds.cs deleted file mode 100644 index 90d7714..0000000 --- a/DysonNetwork.Pass/Migrations/20251116153151_OpenableFunds.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class OpenableFunds : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "is_open", - table: "wallet_funds", - type: "boolean", - nullable: false, - defaultValue: false); - - migrationBuilder.AddColumn( - name: "remaining_amount", - table: "wallet_funds", - type: "numeric", - nullable: false, - defaultValue: 0m); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "is_open", - table: "wallet_funds"); - - migrationBuilder.DropColumn( - name: "remaining_amount", - table: "wallet_funds"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251116163407_OpenFundsTotalSplits.Designer.cs b/DysonNetwork.Pass/Migrations/20251116163407_OpenFundsTotalSplits.Designer.cs deleted file mode 100644 index ca5df1c..0000000 --- a/DysonNetwork.Pass/Migrations/20251116163407_OpenFundsTotalSplits.Designer.cs +++ /dev/null @@ -1,2726 +0,0 @@ -// -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("20251116163407_OpenFundsTotalSplits")] - partial class OpenFundsTotalSplits - { - /// - 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.HasIndex("ClientId") - .HasDatabaseName("ix_auth_challenges_client_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.ToTable("auth_sessions", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnCheckInResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AmountOfSplits") - .HasColumnType("integer") - .HasColumnName("amount_of_splits"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IsOpen") - .HasColumnType("boolean") - .HasColumnName("is_open"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("RemainingAmount") - .HasColumnType("numeric") - .HasColumnName("remaining_amount"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.HasOne("DysonNetwork.Shared.Models.SnAuthClient", "Client") - .WithMany() - .HasForeignKey("ClientId") - .HasConstraintName("fk_auth_challenges_auth_clients_client_id"); - - b.Navigation("Account"); - - b.Navigation("Client"); - }); - - 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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_id"); - - b.Navigation("Account"); - - b.Navigation("Challenge"); - }); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251116163407_OpenFundsTotalSplits.cs b/DysonNetwork.Pass/Migrations/20251116163407_OpenFundsTotalSplits.cs deleted file mode 100644 index aff3376..0000000 --- a/DysonNetwork.Pass/Migrations/20251116163407_OpenFundsTotalSplits.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class OpenFundsTotalSplits : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "amount_of_splits", - table: "wallet_funds", - type: "integer", - nullable: false, - defaultValue: 0); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "amount_of_splits", - table: "wallet_funds"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251129095046_DecoupleAuthSessionAndChallenge.Designer.cs b/DysonNetwork.Pass/Migrations/20251129095046_DecoupleAuthSessionAndChallenge.Designer.cs deleted file mode 100644 index afcee60..0000000 --- a/DysonNetwork.Pass/Migrations/20251129095046_DecoupleAuthSessionAndChallenge.Designer.cs +++ /dev/null @@ -1,2755 +0,0 @@ -// -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("20251129095046_DecoupleAuthSessionAndChallenge")] - partial class DecoupleAuthSessionAndChallenge - { - /// - 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnApiKey", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("device_id"); - - b.Property("DeviceName") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("ParentSessionId") - .HasColumnType("uuid") - .HasColumnName("parent_session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AmountOfSplits") - .HasColumnType("integer") - .HasColumnName("amount_of_splits"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IsOpen") - .HasColumnType("boolean") - .HasColumnName("is_open"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("RemainingAmount") - .HasColumnType("numeric") - .HasColumnName("remaining_amount"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_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("Challenge"); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251129095046_DecoupleAuthSessionAndChallenge.cs b/DysonNetwork.Pass/Migrations/20251129095046_DecoupleAuthSessionAndChallenge.cs deleted file mode 100644 index 32f37f7..0000000 --- a/DysonNetwork.Pass/Migrations/20251129095046_DecoupleAuthSessionAndChallenge.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class DecoupleAuthSessionAndChallenge : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_challenges_auth_clients_client_id", - table: "auth_challenges"); - - migrationBuilder.DropIndex( - name: "ix_auth_challenges_client_id", - table: "auth_challenges"); - - migrationBuilder.DropColumn( - name: "client_id", - table: "auth_challenges"); - - migrationBuilder.AddColumn( - name: "client_id", - table: "auth_sessions", - type: "uuid", - nullable: true); - - migrationBuilder.AddColumn( - name: "parent_session_id", - table: "auth_sessions", - type: "uuid", - nullable: true); - - migrationBuilder.AddColumn( - name: "device_id", - table: "auth_challenges", - type: "character varying(512)", - maxLength: 512, - nullable: false, - defaultValue: ""); - - migrationBuilder.AddColumn( - name: "device_name", - table: "auth_challenges", - type: "character varying(1024)", - maxLength: 1024, - nullable: true); - - migrationBuilder.AddColumn( - name: "platform", - table: "auth_challenges", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.CreateIndex( - name: "ix_auth_sessions_client_id", - table: "auth_sessions", - column: "client_id"); - - migrationBuilder.CreateIndex( - name: "ix_auth_sessions_parent_session_id", - table: "auth_sessions", - column: "parent_session_id"); - - migrationBuilder.AddForeignKey( - name: "fk_auth_sessions_auth_clients_client_id", - table: "auth_sessions", - column: "client_id", - principalTable: "auth_clients", - principalColumn: "id"); - - migrationBuilder.AddForeignKey( - name: "fk_auth_sessions_auth_sessions_parent_session_id", - table: "auth_sessions", - column: "parent_session_id", - principalTable: "auth_sessions", - principalColumn: "id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_sessions_auth_clients_client_id", - table: "auth_sessions"); - - migrationBuilder.DropForeignKey( - name: "fk_auth_sessions_auth_sessions_parent_session_id", - table: "auth_sessions"); - - migrationBuilder.DropIndex( - name: "ix_auth_sessions_client_id", - table: "auth_sessions"); - - migrationBuilder.DropIndex( - name: "ix_auth_sessions_parent_session_id", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "client_id", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "parent_session_id", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "device_id", - table: "auth_challenges"); - - migrationBuilder.DropColumn( - name: "device_name", - table: "auth_challenges"); - - migrationBuilder.DropColumn( - name: "platform", - table: "auth_challenges"); - - migrationBuilder.AddColumn( - name: "client_id", - table: "auth_challenges", - type: "uuid", - nullable: true); - - migrationBuilder.CreateIndex( - name: "ix_auth_challenges_client_id", - table: "auth_challenges", - column: "client_id"); - - migrationBuilder.AddForeignKey( - name: "fk_auth_challenges_auth_clients_client_id", - table: "auth_challenges", - column: "client_id", - principalTable: "auth_clients", - principalColumn: "id"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251201145617_AddAffiliationSpell.Designer.cs b/DysonNetwork.Pass/Migrations/20251201145617_AddAffiliationSpell.Designer.cs deleted file mode 100644 index fff27e1..0000000 --- a/DysonNetwork.Pass/Migrations/20251201145617_AddAffiliationSpell.Designer.cs +++ /dev/null @@ -1,2874 +0,0 @@ -// -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("20251201145617_AddAffiliationSpell")] - partial class AddAffiliationSpell - { - /// - 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAffiliationResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resource_identifier"); - - b.Property("SpellId") - .HasColumnType("uuid") - .HasColumnName("spell_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("device_id"); - - b.Property("DeviceName") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("ParentSessionId") - .HasColumnType("uuid") - .HasColumnName("parent_session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Area") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("area"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Area", "Actor") - .HasDatabaseName("ix_permission_nodes_key_area_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AmountOfSplits") - .HasColumnType("integer") - .HasColumnName("amount_of_splits"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IsOpen") - .HasColumnType("boolean") - .HasColumnName("is_open"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("RemainingAmount") - .HasColumnType("numeric") - .HasColumnName("remaining_amount"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_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("Challenge"); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251201145617_AddAffiliationSpell.cs b/DysonNetwork.Pass/Migrations/20251201145617_AddAffiliationSpell.cs deleted file mode 100644 index 0ecdaec..0000000 --- a/DysonNetwork.Pass/Migrations/20251201145617_AddAffiliationSpell.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; -using NodaTime; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddAffiliationSpell : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "affiliation_spells", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - spell = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - type = table.Column(type: "integer", nullable: false), - expires_at = table.Column(type: "timestamp with time zone", nullable: true), - affected_at = table.Column(type: "timestamp with time zone", nullable: true), - meta = table.Column>(type: "jsonb", nullable: false), - account_id = table.Column(type: "uuid", nullable: true), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_affiliation_spells", x => x.id); - table.ForeignKey( - name: "fk_affiliation_spells_accounts_account_id", - column: x => x.account_id, - principalTable: "accounts", - principalColumn: "id"); - }); - - migrationBuilder.CreateTable( - name: "affiliation_results", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - resource_identifier = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false), - spell_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_affiliation_results", x => x.id); - table.ForeignKey( - name: "fk_affiliation_results_affiliation_spells_spell_id", - column: x => x.spell_id, - principalTable: "affiliation_spells", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "ix_affiliation_results_spell_id", - table: "affiliation_results", - column: "spell_id"); - - migrationBuilder.CreateIndex( - name: "ix_affiliation_spells_account_id", - table: "affiliation_spells", - column: "account_id"); - - migrationBuilder.CreateIndex( - name: "ix_affiliation_spells_spell", - table: "affiliation_spells", - column: "spell", - unique: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "affiliation_results"); - - migrationBuilder.DropTable( - name: "affiliation_spells"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251202134035_SimplifiedPermissionNode.Designer.cs b/DysonNetwork.Pass/Migrations/20251202134035_SimplifiedPermissionNode.Designer.cs deleted file mode 100644 index a58eb52..0000000 --- a/DysonNetwork.Pass/Migrations/20251202134035_SimplifiedPermissionNode.Designer.cs +++ /dev/null @@ -1,2872 +0,0 @@ -// -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("20251202134035_SimplifiedPermissionNode")] - partial class SimplifiedPermissionNode - { - /// - 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAffiliationResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resource_identifier"); - - b.Property("SpellId") - .HasColumnType("uuid") - .HasColumnName("spell_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("device_id"); - - b.Property("DeviceName") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("ParentSessionId") - .HasColumnType("uuid") - .HasColumnName("parent_session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_sessions"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_sessions_account_id"); - - b.HasIndex("ChallengeId") - .HasDatabaseName("ix_auth_sessions_challenge_id"); - - b.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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Actor") - .HasDatabaseName("ix_permission_nodes_key_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AmountOfSplits") - .HasColumnType("integer") - .HasColumnName("amount_of_splits"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IsOpen") - .HasColumnType("boolean") - .HasColumnName("is_open"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("RemainingAmount") - .HasColumnType("numeric") - .HasColumnName("remaining_amount"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.SnAuthChallenge", "Challenge") - .WithMany() - .HasForeignKey("ChallengeId") - .HasConstraintName("fk_auth_sessions_auth_challenges_challenge_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("Challenge"); - - 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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251202134035_SimplifiedPermissionNode.cs b/DysonNetwork.Pass/Migrations/20251202134035_SimplifiedPermissionNode.cs deleted file mode 100644 index 0f2ce4d..0000000 --- a/DysonNetwork.Pass/Migrations/20251202134035_SimplifiedPermissionNode.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class SimplifiedPermissionNode : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "ix_permission_nodes_key_area_actor", - table: "permission_nodes"); - - migrationBuilder.DropColumn( - name: "area", - table: "permission_nodes"); - - migrationBuilder.AddColumn( - name: "type", - table: "permission_nodes", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.CreateIndex( - name: "ix_permission_nodes_key_actor", - table: "permission_nodes", - columns: new[] { "key", "actor" }); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropIndex( - name: "ix_permission_nodes_key_actor", - table: "permission_nodes"); - - migrationBuilder.DropColumn( - name: "type", - table: "permission_nodes"); - - migrationBuilder.AddColumn( - name: "area", - table: "permission_nodes", - type: "character varying(1024)", - maxLength: 1024, - nullable: false, - defaultValue: ""); - - migrationBuilder.CreateIndex( - name: "ix_permission_nodes_key_area_actor", - table: "permission_nodes", - columns: new[] { "key", "area", "actor" }); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251202160759_SimplifiedAuthSession.Designer.cs b/DysonNetwork.Pass/Migrations/20251202160759_SimplifiedAuthSession.Designer.cs deleted file mode 100644 index 0c1217c..0000000 --- a/DysonNetwork.Pass/Migrations/20251202160759_SimplifiedAuthSession.Designer.cs +++ /dev/null @@ -1,2882 +0,0 @@ -// -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("20251202160759_SimplifiedAuthSession")] - partial class SimplifiedAuthSession - { - /// - 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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Resolution") - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resolution"); - - b.Property("ResolvedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("resolved_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("resource_identifier"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_abuse_reports"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_abuse_reports_account_id"); - - b.ToTable("abuse_reports", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("AutomatedId") - .HasColumnType("uuid") - .HasColumnName("automated_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsSuperuser") - .HasColumnType("boolean") - .HasColumnName("is_superuser"); - - b.Property("Language") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("language"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("name"); - - b.Property("Nick") - .IsRequired() - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("nick"); - - b.Property("Region") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("character varying(32)") - .HasColumnName("region"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_accounts"); - - b.HasIndex("Name") - .IsUnique() - .HasDatabaseName("ix_accounts_name"); - - b.ToTable("accounts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountAuthFactor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Config") - .HasColumnType("jsonb") - .HasColumnName("config"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EnabledAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("enabled_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Secret") - .HasMaxLength(8196) - .HasColumnType("character varying(8196)") - .HasColumnName("secret"); - - b.Property("Trustworthy") - .HasColumnType("integer") - .HasColumnName("trustworthy"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_auth_factors"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_auth_factors_account_id"); - - b.ToTable("account_auth_factors", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountBadge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActivatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("activated_at"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_badges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_badges_account_id"); - - b.ToTable("badges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountConnection", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccessToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("access_token"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LastUsedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_used_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("ProvidedIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("provided_identifier"); - - b.Property("Provider") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("provider"); - - b.Property("RefreshToken") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("refresh_token"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_connections"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_connections_account_id"); - - b.ToTable("account_connections", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountContact", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Content") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("content"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsPrimary") - .HasColumnType("boolean") - .HasColumnName("is_primary"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("VerifiedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("verified_at"); - - b.HasKey("Id") - .HasName("pk_account_contacts"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_contacts_account_id"); - - b.ToTable("account_contacts", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountProfile", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("ActiveBadge") - .HasColumnType("jsonb") - .HasColumnName("active_badge"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("Bio") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("bio"); - - b.Property("Birthday") - .HasColumnType("timestamp with time zone") - .HasColumnName("birthday"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Experience") - .HasColumnType("integer") - .HasColumnName("experience"); - - b.Property("FirstName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("first_name"); - - b.Property("Gender") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("gender"); - - b.Property("LastName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("last_name"); - - b.Property("LastSeenAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_seen_at"); - - b.Property>("Links") - .HasColumnType("jsonb") - .HasColumnName("links"); - - b.Property("Location") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("location"); - - b.Property("MiddleName") - .HasMaxLength(256) - .HasColumnType("character varying(256)") - .HasColumnName("middle_name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Pronouns") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("pronouns"); - - b.Property("SocialCredits") - .HasColumnType("double precision") - .HasColumnName("social_credits"); - - b.Property("TimeZone") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("time_zone"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UsernameColor") - .HasColumnType("jsonb") - .HasColumnName("username_color"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_account_profiles"); - - b.HasIndex("AccountId") - .IsUnique() - .HasDatabaseName("ix_account_profiles_account_id"); - - b.ToTable("account_profiles", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountPunishment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("BlockedPermissions") - .HasColumnType("jsonb") - .HasColumnName("blocked_permissions"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("reason"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_punishments"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_punishments_account_id"); - - b.ToTable("punishments", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountRelationship", b => - { - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("RelatedId") - .HasColumnType("uuid") - .HasColumnName("related_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Status") - .HasColumnType("smallint") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("AccountId", "RelatedId") - .HasName("pk_account_relationships"); - - b.HasIndex("RelatedId") - .HasDatabaseName("ix_account_relationships_related_id"); - - b.ToTable("account_relationships", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAccountStatus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("Attitude") - .HasColumnType("integer") - .HasColumnName("attitude"); - - b.Property("ClearedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("cleared_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IsAutomated") - .HasColumnType("boolean") - .HasColumnName("is_automated"); - - b.Property("IsInvisible") - .HasColumnType("boolean") - .HasColumnName("is_invisible"); - - b.Property("IsNotDisturb") - .HasColumnType("boolean") - .HasColumnName("is_not_disturb"); - - b.Property("Label") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_statuses"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_statuses_account_id"); - - b.ToTable("account_statuses", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnActionLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Action") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("action"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_action_logs"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_action_logs_account_id"); - - b.ToTable("action_logs", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAffiliationResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ResourceIdentifier") - .IsRequired() - .HasMaxLength(8192) - .HasColumnType("character varying(8192)") - .HasColumnName("resource_identifier"); - - b.Property("SpellId") - .HasColumnType("uuid") - .HasColumnName("spell_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Label") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("label"); - - b.Property("SessionId") - .HasColumnType("uuid") - .HasColumnName("session_id"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_api_keys"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_api_keys_account_id"); - - b.HasIndex("SessionId") - .HasDatabaseName("ix_api_keys_session_id"); - - b.ToTable("api_keys", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthChallenge", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property>("BlacklistFactors") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("blacklist_factors"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("device_id"); - - b.Property("DeviceName") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("FailedAttempts") - .HasColumnType("integer") - .HasColumnName("failed_attempts"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("Location") - .HasColumnType("jsonb") - .HasColumnName("location"); - - b.Property("Nonce") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("nonce"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("StepRemain") - .HasColumnType("integer") - .HasColumnName("step_remain"); - - b.Property("StepTotal") - .HasColumnType("integer") - .HasColumnName("step_total"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_challenges"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_challenges_account_id"); - - b.ToTable("auth_challenges", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthClient", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_id"); - - b.Property("DeviceLabel") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_label"); - - b.Property("DeviceName") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("device_name"); - - b.Property("Platform") - .HasColumnType("integer") - .HasColumnName("platform"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_auth_clients"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_auth_clients_account_id"); - - b.ToTable("auth_clients", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnAuthSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AppId") - .HasColumnType("uuid") - .HasColumnName("app_id"); - - b.Property>("Audiences") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("audiences"); - - b.Property("ChallengeId") - .HasColumnType("uuid") - .HasColumnName("challenge_id"); - - b.Property("ClientId") - .HasColumnType("uuid") - .HasColumnName("client_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IpAddress") - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("ip_address"); - - b.Property("LastGrantedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("last_granted_at"); - - b.Property("ParentSessionId") - .HasColumnType("uuid") - .HasColumnName("parent_session_id"); - - b.Property>("Scopes") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("scopes"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("UserAgent") - .HasMaxLength(512) - .HasColumnType("character varying(512)") - .HasColumnName("user_agent"); - - b.HasKey("Id") - .HasName("pk_auth_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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BackdatedFrom") - .HasColumnType("timestamp with time zone") - .HasColumnName("backdated_from"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Level") - .HasColumnType("integer") - .HasColumnName("level"); - - b.Property("RewardExperience") - .HasColumnType("integer") - .HasColumnName("reward_experience"); - - b.Property("RewardPoints") - .HasColumnType("numeric") - .HasColumnName("reward_points"); - - b.Property>("Tips") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("tips"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_account_check_in_results"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_account_check_in_results_account_id"); - - b.ToTable("account_check_in_results", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnExperienceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BonusMultiplier") - .HasColumnType("double precision") - .HasColumnName("bonus_multiplier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("bigint") - .HasColumnName("delta"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_experience_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_experience_records_account_id"); - - b.ToTable("experience_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnLottery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("DrawStatus") - .HasColumnType("integer") - .HasColumnName("draw_status"); - - b.Property>("MatchedRegionOneNumbers") - .HasColumnType("jsonb") - .HasColumnName("matched_region_one_numbers"); - - b.Property("MatchedRegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("matched_region_two_number"); - - b.Property("Multiplier") - .HasColumnType("integer") - .HasColumnName("multiplier"); - - b.Property>("RegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("region_one_numbers"); - - b.Property("RegionTwoNumber") - .HasColumnType("integer") - .HasColumnName("region_two_number"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DrawDate") - .HasColumnType("timestamp with time zone") - .HasColumnName("draw_date"); - - b.Property("TotalPrizeAmount") - .HasColumnType("bigint") - .HasColumnName("total_prize_amount"); - - b.Property("TotalPrizesAwarded") - .HasColumnType("integer") - .HasColumnName("total_prizes_awarded"); - - b.Property("TotalTickets") - .HasColumnType("integer") - .HasColumnName("total_tickets"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property>("WinningRegionOneNumbers") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("winning_region_one_numbers"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property>("Meta") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("Spell") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("spell"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_magic_spells"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_magic_spells_account_id"); - - b.HasIndex("Spell") - .IsUnique() - .HasDatabaseName("ix_magic_spells_spell"); - - b.ToTable("magic_spells", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_permission_groups"); - - b.ToTable("permission_groups", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionGroupMember", b => - { - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Actor") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("GroupId", "Actor") - .HasName("pk_permission_group_members"); - - b.ToTable("permission_group_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPermissionNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Actor") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("actor"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("GroupId") - .HasColumnType("uuid") - .HasColumnName("group_id"); - - b.Property("Key") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("key"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Value") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("value"); - - b.HasKey("Id") - .HasName("pk_permission_nodes"); - - b.HasIndex("GroupId") - .HasDatabaseName("ix_permission_nodes_group_id"); - - b.HasIndex("Key", "Actor") - .HasDatabaseName("ix_permission_nodes_key_actor"); - - b.ToTable("permission_nodes", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnPresenceActivity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Caption") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("caption"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("LargeImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("large_image"); - - b.Property("LeaseExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("lease_expires_at"); - - b.Property("LeaseMinutes") - .HasColumnType("integer") - .HasColumnName("lease_minutes"); - - b.Property("ManualId") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("manual_id"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("SmallImage") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("small_image"); - - b.Property("Subtitle") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle"); - - b.Property("SubtitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subtitle_url"); - - b.Property("Title") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title"); - - b.Property("TitleUrl") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("title_url"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("Background") - .HasColumnType("jsonb") - .HasColumnName("background"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("description"); - - b.Property("IsCommunity") - .HasColumnType("boolean") - .HasColumnName("is_community"); - - b.Property("IsPublic") - .HasColumnType("boolean") - .HasColumnName("is_public"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("name"); - - b.Property("Picture") - .HasColumnType("jsonb") - .HasColumnName("picture"); - - b.Property("Slug") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("slug"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("Verification") - .HasColumnType("jsonb") - .HasColumnName("verification"); - - b.HasKey("Id") - .HasName("pk_realms"); - - b.HasIndex("Slug") - .IsUnique() - .HasDatabaseName("ix_realms_slug"); - - b.ToTable("realms", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnRealmMember", b => - { - b.Property("RealmId") - .HasColumnType("uuid") - .HasColumnName("realm_id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("JoinedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("joined_at"); - - b.Property("LeaveAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("leave_at"); - - b.Property("Role") - .HasColumnType("integer") - .HasColumnName("role"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("RealmId", "AccountId") - .HasName("pk_realm_members"); - - b.ToTable("realm_members", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnSocialCreditRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("Delta") - .HasColumnType("double precision") - .HasColumnName("delta"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Reason") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason"); - - b.Property("ReasonType") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("reason_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.HasKey("Id") - .HasName("pk_social_credit_records"); - - b.HasIndex("AccountId") - .HasDatabaseName("ix_social_credit_records_account_id"); - - b.ToTable("social_credit_records", (string)null); - }); - - modelBuilder.Entity("DysonNetwork.Shared.Models.SnWallet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AffectedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("affected_at"); - - b.Property("Code") - .HasMaxLength(1024) - .HasColumnType("character varying(1024)") - .HasColumnName("code"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("DiscountAmount") - .HasColumnType("numeric") - .HasColumnName("discount_amount"); - - b.Property("DiscountRate") - .HasColumnType("double precision") - .HasColumnName("discount_rate"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("Identifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("MaxUsage") - .HasColumnType("integer") - .HasColumnName("max_usage"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AmountOfSplits") - .HasColumnType("integer") - .HasColumnName("amount_of_splits"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("CreatorAccountId") - .HasColumnType("uuid") - .HasColumnName("creator_account_id"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property("IsOpen") - .HasColumnType("boolean") - .HasColumnName("is_open"); - - b.Property("Message") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("message"); - - b.Property("RemainingAmount") - .HasColumnType("numeric") - .HasColumnName("remaining_amount"); - - b.Property("SplitType") - .HasColumnType("integer") - .HasColumnName("split_type"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TotalAmount") - .HasColumnType("numeric") - .HasColumnName("total_amount"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("FundId") - .HasColumnType("uuid") - .HasColumnName("fund_id"); - - b.Property("IsReceived") - .HasColumnType("boolean") - .HasColumnName("is_received"); - - b.Property("ReceivedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("received_at"); - - b.Property("RecipientAccountId") - .HasColumnType("uuid") - .HasColumnName("recipient_account_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expires_at"); - - b.Property("FinalPrice") - .HasColumnType("numeric") - .HasColumnName("final_price"); - - b.Property("GiftCode") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("gift_code"); - - b.Property("GifterId") - .HasColumnType("uuid") - .HasColumnName("gifter_id"); - - b.Property("IsOpenGift") - .HasColumnType("boolean") - .HasColumnName("is_open_gift"); - - b.Property("Message") - .HasMaxLength(1000) - .HasColumnType("character varying(1000)") - .HasColumnName("message"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RecipientId") - .HasColumnType("uuid") - .HasColumnName("recipient_id"); - - b.Property("RedeemedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("redeemed_at"); - - b.Property("RedeemerId") - .HasColumnType("uuid") - .HasColumnName("redeemer_id"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("SubscriptionId") - .HasColumnType("uuid") - .HasColumnName("subscription_id"); - - b.Property("SubscriptionIdentifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("subscription_identifier"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("AppIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("app_identifier"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("ExpiredAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("expired_at"); - - b.Property>("Meta") - .HasColumnType("jsonb") - .HasColumnName("meta"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("ProductIdentifier") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("product_identifier"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("TransactionId") - .HasColumnType("uuid") - .HasColumnName("transaction_id"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("updated_at"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("AccountId") - .HasColumnType("uuid") - .HasColumnName("account_id"); - - b.Property("BasePrice") - .HasColumnType("numeric") - .HasColumnName("base_price"); - - b.Property("BegunAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("begun_at"); - - b.Property("CouponId") - .HasColumnType("uuid") - .HasColumnName("coupon_id"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("EndedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("ended_at"); - - b.Property("Identifier") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("identifier"); - - b.Property("IsActive") - .HasColumnType("boolean") - .HasColumnName("is_active"); - - b.Property("IsFreeTrial") - .HasColumnType("boolean") - .HasColumnName("is_free_trial"); - - b.Property("PaymentDetails") - .IsRequired() - .HasColumnType("jsonb") - .HasColumnName("payment_details"); - - b.Property("PaymentMethod") - .IsRequired() - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("payment_method"); - - b.Property("RenewalAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("renewal_at"); - - b.Property("Status") - .HasColumnType("integer") - .HasColumnName("status"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uuid") - .HasColumnName("id"); - - b.Property("Amount") - .HasColumnType("numeric") - .HasColumnName("amount"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("created_at"); - - b.Property("Currency") - .IsRequired() - .HasMaxLength(128) - .HasColumnType("character varying(128)") - .HasColumnName("currency"); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone") - .HasColumnName("deleted_at"); - - b.Property("PayeeWalletId") - .HasColumnType("uuid") - .HasColumnName("payee_wallet_id"); - - b.Property("PayerWalletId") - .HasColumnType("uuid") - .HasColumnName("payer_wallet_id"); - - b.Property("Remarks") - .HasMaxLength(4096) - .HasColumnType("character varying(4096)") - .HasColumnName("remarks"); - - b.Property("Type") - .HasColumnType("integer") - .HasColumnName("type"); - - b.Property("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.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 - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251202160759_SimplifiedAuthSession.cs b/DysonNetwork.Pass/Migrations/20251202160759_SimplifiedAuthSession.cs deleted file mode 100644 index dc75a81..0000000 --- a/DysonNetwork.Pass/Migrations/20251202160759_SimplifiedAuthSession.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class SimplifiedAuthSession : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - table: "auth_sessions"); - - migrationBuilder.DropIndex( - name: "ix_auth_sessions_challenge_id", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "type", - table: "auth_challenges"); - - migrationBuilder.AddColumn>( - name: "audiences", - table: "auth_sessions", - type: "jsonb", - nullable: false, - defaultValue: new List()); - - migrationBuilder.AddColumn( - name: "ip_address", - table: "auth_sessions", - type: "character varying(128)", - maxLength: 128, - nullable: true); - - migrationBuilder.AddColumn>( - name: "scopes", - table: "auth_sessions", - type: "jsonb", - nullable: false, - defaultValue: new List()); - - migrationBuilder.AddColumn( - name: "type", - table: "auth_sessions", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.AddColumn( - name: "user_agent", - table: "auth_sessions", - type: "character varying(512)", - maxLength: 512, - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "audiences", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "ip_address", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "scopes", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "type", - table: "auth_sessions"); - - migrationBuilder.DropColumn( - name: "user_agent", - table: "auth_sessions"); - - migrationBuilder.AddColumn( - name: "type", - table: "auth_challenges", - type: "integer", - nullable: false, - defaultValue: 0); - - migrationBuilder.CreateIndex( - name: "ix_auth_sessions_challenge_id", - table: "auth_sessions", - column: "challenge_id"); - - migrationBuilder.AddForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - table: "auth_sessions", - column: "challenge_id", - principalTable: "auth_challenges", - principalColumn: "id"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251203163459_AddLocationToSession.cs b/DysonNetwork.Pass/Migrations/20251203163459_AddLocationToSession.cs deleted file mode 100644 index ff64456..0000000 --- a/DysonNetwork.Pass/Migrations/20251203163459_AddLocationToSession.cs +++ /dev/null @@ -1,29 +0,0 @@ -using DysonNetwork.Shared.Geometry; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace DysonNetwork.Pass.Migrations -{ - /// - public partial class AddLocationToSession : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "location", - table: "auth_sessions", - type: "jsonb", - nullable: true); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "location", - table: "auth_sessions"); - } - } -} diff --git a/DysonNetwork.Pass/Migrations/20251203163459_AddLocationToSession.Designer.cs b/DysonNetwork.Pass/Migrations/20251214092550_InitialMigration.Designer.cs similarity index 99% rename from DysonNetwork.Pass/Migrations/20251203163459_AddLocationToSession.Designer.cs rename to DysonNetwork.Pass/Migrations/20251214092550_InitialMigration.Designer.cs index 459b946..6c5afbc 100644 --- a/DysonNetwork.Pass/Migrations/20251203163459_AddLocationToSession.Designer.cs +++ b/DysonNetwork.Pass/Migrations/20251214092550_InitialMigration.Designer.cs @@ -17,8 +17,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace DysonNetwork.Pass.Migrations { [DbContext(typeof(AppDatabase))] - [Migration("20251203163459_AddLocationToSession")] - partial class AddLocationToSession + [Migration("20251214092550_InitialMigration")] + partial class InitialMigration { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/DysonNetwork.Pass/Migrations/20250713121237_InitialMigration.cs b/DysonNetwork.Pass/Migrations/20251214092550_InitialMigration.cs similarity index 62% rename from DysonNetwork.Pass/Migrations/20250713121237_InitialMigration.cs rename to DysonNetwork.Pass/Migrations/20251214092550_InitialMigration.cs index 8ca5268..f49a35e 100644 --- a/DysonNetwork.Pass/Migrations/20250713121237_InitialMigration.cs +++ b/DysonNetwork.Pass/Migrations/20251214092550_InitialMigration.cs @@ -1,7 +1,9 @@ -using System.Text.Json; +using System; +using System.Collections.Generic; +using System.Text.Json; +using DysonNetwork.Shared.Geometry; using DysonNetwork.Shared.Models; using Microsoft.EntityFrameworkCore.Migrations; -using NetTopologySuite.Geometries; using NodaTime; #nullable disable @@ -14,9 +16,6 @@ namespace DysonNetwork.Pass.Migrations /// protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.AlterDatabase() - .Annotation("Npgsql:PostgresExtension:postgis", ",,"); - migrationBuilder.CreateTable( name: "accounts", columns: table => new @@ -25,8 +24,10 @@ namespace DysonNetwork.Pass.Migrations name = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), nick = table.Column(type: "character varying(256)", maxLength: 256, nullable: false), language = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), + region = table.Column(type: "character varying(32)", maxLength: 32, nullable: false), activated_at = table.Column(type: "timestamp with time zone", nullable: true), is_superuser = table.Column(type: "boolean", nullable: false), + automated_id = table.Column(type: "uuid", nullable: true), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), deleted_at = table.Column(type: "timestamp with time zone", nullable: true) @@ -37,24 +38,23 @@ namespace DysonNetwork.Pass.Migrations }); migrationBuilder.CreateTable( - name: "custom_apps", + name: "lottery_records", columns: table => new { id = table.Column(type: "uuid", nullable: false), - slug = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - status = table.Column(type: "integer", nullable: false), - picture = table.Column(type: "jsonb", nullable: true), - background = table.Column(type: "jsonb", nullable: true), - verification = table.Column(type: "jsonb", nullable: true), + draw_date = table.Column(type: "timestamp with time zone", nullable: false), + winning_region_one_numbers = table.Column>(type: "jsonb", nullable: false), + winning_region_two_number = table.Column(type: "integer", nullable: false), + total_tickets = table.Column(type: "integer", nullable: false), + total_prizes_awarded = table.Column(type: "integer", nullable: false), + total_prize_amount = table.Column(type: "bigint", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), deleted_at = table.Column(type: "timestamp with time zone", nullable: true) }, constraints: table => { - table.PrimaryKey("pk_custom_apps", x => x.id); + table.PrimaryKey("pk_lottery_records", x => x.id); }); migrationBuilder.CreateTable( @@ -72,6 +72,29 @@ namespace DysonNetwork.Pass.Migrations table.PrimaryKey("pk_permission_groups", x => x.id); }); + migrationBuilder.CreateTable( + name: "realms", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + slug = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), + is_community = table.Column(type: "boolean", nullable: false), + is_public = table.Column(type: "boolean", nullable: false), + picture = table.Column(type: "jsonb", nullable: true), + background = table.Column(type: "jsonb", nullable: true), + verification = table.Column(type: "jsonb", nullable: true), + account_id = table.Column(type: "uuid", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_realms", x => x.id); + }); + migrationBuilder.CreateTable( name: "wallet_coupons", columns: table => new @@ -156,6 +179,7 @@ namespace DysonNetwork.Pass.Migrations reward_experience = table.Column(type: "integer", nullable: true), tips = table.Column>(type: "jsonb", nullable: false), account_id = table.Column(type: "uuid", nullable: false), + backdated_from = table.Column(type: "timestamp with time zone", nullable: true), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), deleted_at = table.Column(type: "timestamp with time zone", nullable: true) @@ -206,6 +230,7 @@ namespace DysonNetwork.Pass.Migrations type = table.Column(type: "integer", nullable: false), verified_at = table.Column(type: "timestamp with time zone", nullable: true), is_primary = table.Column(type: "boolean", nullable: false), + is_public = table.Column(type: "boolean", nullable: false), content = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -236,13 +261,14 @@ namespace DysonNetwork.Pass.Migrations pronouns = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), time_zone = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), location = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + links = table.Column>(type: "jsonb", nullable: true), + username_color = table.Column(type: "jsonb", nullable: true), birthday = table.Column(type: "timestamp with time zone", nullable: true), last_seen_at = table.Column(type: "timestamp with time zone", nullable: true), verification = table.Column(type: "jsonb", nullable: true), - active_badge = table.Column(type: "jsonb", nullable: true), + active_badge = table.Column(type: "jsonb", nullable: true), experience = table.Column(type: "integer", nullable: false), - picture_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), - background_id = table.Column(type: "character varying(32)", maxLength: 32, nullable: true), + social_credits = table.Column(type: "double precision", nullable: false), picture = table.Column(type: "jsonb", nullable: true), background = table.Column(type: "jsonb", nullable: true), account_id = table.Column(type: "uuid", nullable: false), @@ -299,7 +325,10 @@ namespace DysonNetwork.Pass.Migrations is_invisible = table.Column(type: "boolean", nullable: false), is_not_disturb = table.Column(type: "boolean", nullable: false), label = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + meta = table.Column>(type: "jsonb", nullable: true), cleared_at = table.Column(type: "timestamp with time zone", nullable: true), + app_identifier = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + is_automated = table.Column(type: "boolean", nullable: false), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -325,7 +354,7 @@ namespace DysonNetwork.Pass.Migrations meta = table.Column>(type: "jsonb", nullable: false), user_agent = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), ip_address = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), - location = table.Column(type: "geometry", nullable: true), + location = table.Column(type: "jsonb", nullable: true), account_id = table.Column(type: "uuid", nullable: false), session_id = table.Column(type: "uuid", nullable: true), created_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -343,6 +372,31 @@ namespace DysonNetwork.Pass.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "affiliation_spells", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + spell = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + type = table.Column(type: "integer", nullable: false), + expires_at = table.Column(type: "timestamp with time zone", nullable: true), + affected_at = table.Column(type: "timestamp with time zone", nullable: true), + meta = table.Column>(type: "jsonb", nullable: false), + account_id = table.Column(type: "uuid", nullable: true), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_affiliation_spells", x => x.id); + table.ForeignKey( + name: "fk_affiliation_spells_accounts_account_id", + column: x => x.account_id, + principalTable: "accounts", + principalColumn: "id"); + }); + migrationBuilder.CreateTable( name: "auth_challenges", columns: table => new @@ -352,16 +406,16 @@ namespace DysonNetwork.Pass.Migrations step_remain = table.Column(type: "integer", nullable: false), step_total = table.Column(type: "integer", nullable: false), failed_attempts = table.Column(type: "integer", nullable: false), - platform = table.Column(type: "integer", nullable: false), - type = table.Column(type: "integer", nullable: false), blacklist_factors = table.Column>(type: "jsonb", nullable: false), audiences = table.Column>(type: "jsonb", nullable: false), scopes = table.Column>(type: "jsonb", nullable: false), ip_address = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), user_agent = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), - device_id = table.Column(type: "character varying(256)", maxLength: 256, nullable: true), + device_id = table.Column(type: "character varying(512)", maxLength: 512, nullable: false), + device_name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + platform = table.Column(type: "integer", nullable: false), nonce = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - location = table.Column(type: "geometry", nullable: true), + location = table.Column(type: "jsonb", nullable: true), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -378,6 +432,31 @@ namespace DysonNetwork.Pass.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "auth_clients", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + platform = table.Column(type: "integer", nullable: false), + device_name = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + device_label = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + device_id = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + account_id = table.Column(type: "uuid", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_auth_clients", x => x.id); + table.ForeignKey( + name: "fk_auth_clients_accounts_account_id", + column: x => x.account_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "badges", columns: table => new @@ -405,6 +484,59 @@ namespace DysonNetwork.Pass.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "experience_records", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + reason_type = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + reason = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + delta = table.Column(type: "bigint", nullable: false), + bonus_multiplier = table.Column(type: "double precision", nullable: false), + account_id = table.Column(type: "uuid", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_experience_records", x => x.id); + table.ForeignKey( + name: "fk_experience_records_accounts_account_id", + column: x => x.account_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "lotteries", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + account_id = table.Column(type: "uuid", nullable: false), + region_one_numbers = table.Column>(type: "jsonb", nullable: false), + region_two_number = table.Column(type: "integer", nullable: false), + multiplier = table.Column(type: "integer", nullable: false), + draw_status = table.Column(type: "integer", nullable: false), + draw_date = table.Column(type: "timestamp with time zone", nullable: true), + matched_region_one_numbers = table.Column>(type: "jsonb", nullable: true), + matched_region_two_number = table.Column(type: "integer", nullable: true), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_lotteries", x => x.id); + table.ForeignKey( + name: "fk_lotteries_accounts_account_id", + column: x => x.account_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "magic_spells", columns: table => new @@ -431,14 +563,22 @@ namespace DysonNetwork.Pass.Migrations }); migrationBuilder.CreateTable( - name: "notification_push_subscriptions", + name: "presence_activities", columns: table => new { id = table.Column(type: "uuid", nullable: false), - device_id = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - device_token = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), - provider = table.Column(type: "integer", nullable: false), - last_used_at = table.Column(type: "timestamp with time zone", nullable: true), + type = table.Column(type: "integer", nullable: false), + manual_id = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + title = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + subtitle = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + caption = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + large_image = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + small_image = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + title_url = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + subtitle_url = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + meta = table.Column>(type: "jsonb", nullable: true), + lease_minutes = table.Column(type: "integer", nullable: false), + lease_expires_at = table.Column(type: "timestamp with time zone", nullable: false), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -446,9 +586,9 @@ namespace DysonNetwork.Pass.Migrations }, constraints: table => { - table.PrimaryKey("pk_notification_push_subscriptions", x => x.id); + table.PrimaryKey("pk_presence_activities", x => x.id); table.ForeignKey( - name: "fk_notification_push_subscriptions_accounts_account_id", + name: "fk_presence_activities_accounts_account_id", column: x => x.account_id, principalTable: "accounts", principalColumn: "id", @@ -456,17 +596,14 @@ namespace DysonNetwork.Pass.Migrations }); migrationBuilder.CreateTable( - name: "notifications", + name: "punishments", columns: table => new { id = table.Column(type: "uuid", nullable: false), - topic = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - title = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), - subtitle = table.Column(type: "character varying(2048)", maxLength: 2048, nullable: true), - content = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - meta = table.Column>(type: "jsonb", nullable: true), - priority = table.Column(type: "integer", nullable: false), - viewed_at = table.Column(type: "timestamp with time zone", nullable: true), + reason = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false), + expired_at = table.Column(type: "timestamp with time zone", nullable: true), + type = table.Column(type: "integer", nullable: false), + blocked_permissions = table.Column>(type: "jsonb", nullable: true), account_id = table.Column(type: "uuid", nullable: false), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -474,15 +611,71 @@ namespace DysonNetwork.Pass.Migrations }, constraints: table => { - table.PrimaryKey("pk_notifications", x => x.id); + table.PrimaryKey("pk_punishments", x => x.id); table.ForeignKey( - name: "fk_notifications_accounts_account_id", + name: "fk_punishments_accounts_account_id", column: x => x.account_id, principalTable: "accounts", principalColumn: "id", onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "social_credit_records", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + reason_type = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + reason = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + delta = table.Column(type: "double precision", nullable: false), + status = table.Column(type: "integer", nullable: false), + expired_at = table.Column(type: "timestamp with time zone", nullable: true), + account_id = table.Column(type: "uuid", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_social_credit_records", x => x.id); + table.ForeignKey( + name: "fk_social_credit_records_accounts_account_id", + column: x => x.account_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "wallet_funds", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + currency = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + total_amount = table.Column(type: "numeric", nullable: false), + remaining_amount = table.Column(type: "numeric", nullable: false), + amount_of_splits = table.Column(type: "integer", nullable: false), + split_type = table.Column(type: "integer", nullable: false), + status = table.Column(type: "integer", nullable: false), + message = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + is_open = table.Column(type: "boolean", nullable: false), + creator_account_id = table.Column(type: "uuid", nullable: false), + expired_at = table.Column(type: "timestamp with time zone", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_wallet_funds", x => x.id); + table.ForeignKey( + name: "fk_wallet_funds_accounts_creator_account_id", + column: x => x.creator_account_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "wallets", columns: table => new @@ -504,31 +697,6 @@ namespace DysonNetwork.Pass.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "custom_app_secrets", - columns: table => new - { - id = table.Column(type: "uuid", nullable: false), - secret = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - description = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), - expired_at = table.Column(type: "timestamp with time zone", nullable: true), - is_oidc = table.Column(type: "boolean", nullable: false), - app_id = table.Column(type: "uuid", nullable: false), - created_at = table.Column(type: "timestamp with time zone", nullable: false), - updated_at = table.Column(type: "timestamp with time zone", nullable: false), - deleted_at = table.Column(type: "timestamp with time zone", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("pk_custom_app_secrets", x => x.id); - table.ForeignKey( - name: "fk_custom_app_secrets_custom_apps_app_id", - column: x => x.app_id, - principalTable: "custom_apps", - principalColumn: "id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "permission_group_members", columns: table => new @@ -557,8 +725,8 @@ namespace DysonNetwork.Pass.Migrations columns: table => new { id = table.Column(type: "uuid", nullable: false), + type = table.Column(type: "integer", nullable: false), actor = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), - area = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), key = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), value = table.Column(type: "jsonb", nullable: false), expired_at = table.Column(type: "timestamp with time zone", nullable: true), @@ -578,6 +746,30 @@ namespace DysonNetwork.Pass.Migrations principalColumn: "id"); }); + migrationBuilder.CreateTable( + name: "realm_members", + columns: table => new + { + realm_id = table.Column(type: "uuid", nullable: false), + account_id = table.Column(type: "uuid", nullable: false), + role = table.Column(type: "integer", nullable: false), + joined_at = table.Column(type: "timestamp with time zone", nullable: true), + leave_at = table.Column(type: "timestamp with time zone", nullable: true), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_realm_members", x => new { x.realm_id, x.account_id }); + table.ForeignKey( + name: "fk_realm_members_realms_realm_id", + column: x => x.realm_id, + principalTable: "realms", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "wallet_subscriptions", columns: table => new @@ -615,16 +807,45 @@ namespace DysonNetwork.Pass.Migrations principalColumn: "id"); }); + migrationBuilder.CreateTable( + name: "affiliation_results", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + resource_identifier = table.Column(type: "character varying(8192)", maxLength: 8192, nullable: false), + spell_id = table.Column(type: "uuid", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_affiliation_results", x => x.id); + table.ForeignKey( + name: "fk_affiliation_results_affiliation_spells_spell_id", + column: x => x.spell_id, + principalTable: "affiliation_spells", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "auth_sessions", columns: table => new { id = table.Column(type: "uuid", nullable: false), - label = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: true), + type = table.Column(type: "integer", nullable: false), last_granted_at = table.Column(type: "timestamp with time zone", nullable: true), expired_at = table.Column(type: "timestamp with time zone", nullable: true), + audiences = table.Column>(type: "jsonb", nullable: false), + scopes = table.Column>(type: "jsonb", nullable: false), + ip_address = table.Column(type: "character varying(128)", maxLength: 128, nullable: true), + user_agent = table.Column(type: "character varying(512)", maxLength: 512, nullable: true), + location = table.Column(type: "jsonb", nullable: true), account_id = table.Column(type: "uuid", nullable: false), - challenge_id = table.Column(type: "uuid", nullable: false), + client_id = table.Column(type: "uuid", nullable: true), + parent_session_id = table.Column(type: "uuid", nullable: true), + challenge_id = table.Column(type: "uuid", nullable: true), app_id = table.Column(type: "uuid", nullable: true), created_at = table.Column(type: "timestamp with time zone", nullable: false), updated_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -640,16 +861,46 @@ namespace DysonNetwork.Pass.Migrations principalColumn: "id", onDelete: ReferentialAction.Cascade); table.ForeignKey( - name: "fk_auth_sessions_auth_challenges_challenge_id", - column: x => x.challenge_id, - principalTable: "auth_challenges", + name: "fk_auth_sessions_auth_clients_client_id", + column: x => x.client_id, + principalTable: "auth_clients", + principalColumn: "id"); + table.ForeignKey( + name: "fk_auth_sessions_auth_sessions_parent_session_id", + column: x => x.parent_session_id, + principalTable: "auth_sessions", + principalColumn: "id"); + }); + + migrationBuilder.CreateTable( + name: "wallet_fund_recipients", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + fund_id = table.Column(type: "uuid", nullable: false), + recipient_account_id = table.Column(type: "uuid", nullable: false), + amount = table.Column(type: "numeric", nullable: false), + is_received = table.Column(type: "boolean", nullable: false), + received_at = table.Column(type: "timestamp with time zone", nullable: true), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_wallet_fund_recipients", x => x.id); + table.ForeignKey( + name: "fk_wallet_fund_recipients_accounts_recipient_account_id", + column: x => x.recipient_account_id, + principalTable: "accounts", principalColumn: "id", onDelete: ReferentialAction.Cascade); table.ForeignKey( - name: "fk_auth_sessions_custom_apps_app_id", - column: x => x.app_id, - principalTable: "custom_apps", - principalColumn: "id"); + name: "fk_wallet_fund_recipients_wallet_funds_fund_id", + column: x => x.fund_id, + principalTable: "wallet_funds", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( @@ -705,6 +956,91 @@ namespace DysonNetwork.Pass.Migrations onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "wallet_gifts", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + gifter_id = table.Column(type: "uuid", nullable: false), + recipient_id = table.Column(type: "uuid", nullable: true), + gift_code = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), + message = table.Column(type: "character varying(1000)", maxLength: 1000, nullable: true), + subscription_identifier = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), + base_price = table.Column(type: "numeric", nullable: false), + final_price = table.Column(type: "numeric", nullable: false), + status = table.Column(type: "integer", nullable: false), + redeemed_at = table.Column(type: "timestamp with time zone", nullable: true), + redeemer_id = table.Column(type: "uuid", nullable: true), + subscription_id = table.Column(type: "uuid", nullable: true), + expires_at = table.Column(type: "timestamp with time zone", nullable: false), + is_open_gift = table.Column(type: "boolean", nullable: false), + payment_method = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: false), + payment_details = table.Column(type: "jsonb", nullable: false), + coupon_id = table.Column(type: "uuid", nullable: true), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_wallet_gifts", x => x.id); + table.ForeignKey( + name: "fk_wallet_gifts_accounts_gifter_id", + column: x => x.gifter_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "fk_wallet_gifts_accounts_recipient_id", + column: x => x.recipient_id, + principalTable: "accounts", + principalColumn: "id"); + table.ForeignKey( + name: "fk_wallet_gifts_accounts_redeemer_id", + column: x => x.redeemer_id, + principalTable: "accounts", + principalColumn: "id"); + table.ForeignKey( + name: "fk_wallet_gifts_wallet_coupons_coupon_id", + column: x => x.coupon_id, + principalTable: "wallet_coupons", + principalColumn: "id"); + table.ForeignKey( + name: "fk_wallet_gifts_wallet_subscriptions_subscription_id", + column: x => x.subscription_id, + principalTable: "wallet_subscriptions", + principalColumn: "id"); + }); + + migrationBuilder.CreateTable( + name: "api_keys", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + label = table.Column(type: "character varying(1024)", maxLength: 1024, nullable: false), + account_id = table.Column(type: "uuid", nullable: false), + session_id = table.Column(type: "uuid", nullable: false), + created_at = table.Column(type: "timestamp with time zone", nullable: false), + updated_at = table.Column(type: "timestamp with time zone", nullable: false), + deleted_at = table.Column(type: "timestamp with time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("pk_api_keys", x => x.id); + table.ForeignKey( + name: "fk_api_keys_accounts_account_id", + column: x => x.account_id, + principalTable: "accounts", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "fk_api_keys_auth_sessions_session_id", + column: x => x.session_id, + principalTable: "auth_sessions", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "payment_orders", columns: table => new @@ -714,6 +1050,7 @@ namespace DysonNetwork.Pass.Migrations currency = table.Column(type: "character varying(128)", maxLength: 128, nullable: false), remarks = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), app_identifier = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), + product_identifier = table.Column(type: "character varying(4096)", maxLength: 4096, nullable: true), meta = table.Column>(type: "jsonb", nullable: true), amount = table.Column(type: "numeric", nullable: false), expired_at = table.Column(type: "timestamp with time zone", nullable: false), @@ -790,25 +1127,56 @@ namespace DysonNetwork.Pass.Migrations table: "action_logs", column: "account_id"); + migrationBuilder.CreateIndex( + name: "ix_affiliation_results_spell_id", + table: "affiliation_results", + column: "spell_id"); + + migrationBuilder.CreateIndex( + name: "ix_affiliation_spells_account_id", + table: "affiliation_spells", + column: "account_id"); + + migrationBuilder.CreateIndex( + name: "ix_affiliation_spells_spell", + table: "affiliation_spells", + column: "spell", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_api_keys_account_id", + table: "api_keys", + column: "account_id"); + + migrationBuilder.CreateIndex( + name: "ix_api_keys_session_id", + table: "api_keys", + column: "session_id"); + migrationBuilder.CreateIndex( name: "ix_auth_challenges_account_id", table: "auth_challenges", column: "account_id"); + migrationBuilder.CreateIndex( + name: "ix_auth_clients_account_id", + table: "auth_clients", + column: "account_id"); + migrationBuilder.CreateIndex( name: "ix_auth_sessions_account_id", table: "auth_sessions", column: "account_id"); migrationBuilder.CreateIndex( - name: "ix_auth_sessions_app_id", + name: "ix_auth_sessions_client_id", table: "auth_sessions", - column: "app_id"); + column: "client_id"); migrationBuilder.CreateIndex( - name: "ix_auth_sessions_challenge_id", + name: "ix_auth_sessions_parent_session_id", table: "auth_sessions", - column: "challenge_id"); + column: "parent_session_id"); migrationBuilder.CreateIndex( name: "ix_badges_account_id", @@ -816,9 +1184,14 @@ namespace DysonNetwork.Pass.Migrations column: "account_id"); migrationBuilder.CreateIndex( - name: "ix_custom_app_secrets_app_id", - table: "custom_app_secrets", - column: "app_id"); + name: "ix_experience_records_account_id", + table: "experience_records", + column: "account_id"); + + migrationBuilder.CreateIndex( + name: "ix_lotteries_account_id", + table: "lotteries", + column: "account_id"); migrationBuilder.CreateIndex( name: "ix_magic_spells_account_id", @@ -831,22 +1204,6 @@ namespace DysonNetwork.Pass.Migrations column: "spell", unique: true); - migrationBuilder.CreateIndex( - name: "ix_notification_push_subscriptions_account_id", - table: "notification_push_subscriptions", - column: "account_id"); - - migrationBuilder.CreateIndex( - name: "ix_notification_push_subscriptions_device_token_device_id_acco", - table: "notification_push_subscriptions", - columns: new[] { "device_token", "device_id", "account_id" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "ix_notifications_account_id", - table: "notifications", - column: "account_id"); - migrationBuilder.CreateIndex( name: "ix_payment_orders_payee_wallet_id", table: "payment_orders", @@ -873,9 +1230,76 @@ namespace DysonNetwork.Pass.Migrations column: "group_id"); migrationBuilder.CreateIndex( - name: "ix_permission_nodes_key_area_actor", + name: "ix_permission_nodes_key_actor", table: "permission_nodes", - columns: new[] { "key", "area", "actor" }); + columns: new[] { "key", "actor" }); + + migrationBuilder.CreateIndex( + name: "ix_presence_activities_account_id", + table: "presence_activities", + column: "account_id"); + + migrationBuilder.CreateIndex( + name: "ix_punishments_account_id", + table: "punishments", + column: "account_id"); + + migrationBuilder.CreateIndex( + name: "ix_realms_slug", + table: "realms", + column: "slug", + unique: true); + + migrationBuilder.CreateIndex( + name: "ix_social_credit_records_account_id", + table: "social_credit_records", + column: "account_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_fund_recipients_fund_id", + table: "wallet_fund_recipients", + column: "fund_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_fund_recipients_recipient_account_id", + table: "wallet_fund_recipients", + column: "recipient_account_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_funds_creator_account_id", + table: "wallet_funds", + column: "creator_account_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_gifts_coupon_id", + table: "wallet_gifts", + column: "coupon_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_gifts_gift_code", + table: "wallet_gifts", + column: "gift_code"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_gifts_gifter_id", + table: "wallet_gifts", + column: "gifter_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_gifts_recipient_id", + table: "wallet_gifts", + column: "recipient_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_gifts_redeemer_id", + table: "wallet_gifts", + column: "redeemer_id"); + + migrationBuilder.CreateIndex( + name: "ix_wallet_gifts_subscription_id", + table: "wallet_gifts", + column: "subscription_id", + unique: true); migrationBuilder.CreateIndex( name: "ix_wallet_pockets_wallet_id", @@ -887,6 +1311,16 @@ namespace DysonNetwork.Pass.Migrations table: "wallet_subscriptions", column: "account_id"); + migrationBuilder.CreateIndex( + name: "ix_wallet_subscriptions_account_id_identifier", + table: "wallet_subscriptions", + columns: new[] { "account_id", "identifier" }); + + migrationBuilder.CreateIndex( + name: "ix_wallet_subscriptions_account_id_is_active", + table: "wallet_subscriptions", + columns: new[] { "account_id", "is_active" }); + migrationBuilder.CreateIndex( name: "ix_wallet_subscriptions_coupon_id", table: "wallet_subscriptions", @@ -897,6 +1331,11 @@ namespace DysonNetwork.Pass.Migrations table: "wallet_subscriptions", column: "identifier"); + migrationBuilder.CreateIndex( + name: "ix_wallet_subscriptions_status", + table: "wallet_subscriptions", + column: "status"); + migrationBuilder.CreateIndex( name: "ix_wallets_account_id", table: "wallets", @@ -934,23 +1373,29 @@ namespace DysonNetwork.Pass.Migrations name: "action_logs"); migrationBuilder.DropTable( - name: "auth_sessions"); + name: "affiliation_results"); + + migrationBuilder.DropTable( + name: "api_keys"); + + migrationBuilder.DropTable( + name: "auth_challenges"); migrationBuilder.DropTable( name: "badges"); migrationBuilder.DropTable( - name: "custom_app_secrets"); + name: "experience_records"); + + migrationBuilder.DropTable( + name: "lotteries"); + + migrationBuilder.DropTable( + name: "lottery_records"); migrationBuilder.DropTable( name: "magic_spells"); - migrationBuilder.DropTable( - name: "notification_push_subscriptions"); - - migrationBuilder.DropTable( - name: "notifications"); - migrationBuilder.DropTable( name: "payment_orders"); @@ -960,17 +1405,32 @@ namespace DysonNetwork.Pass.Migrations migrationBuilder.DropTable( name: "permission_nodes"); + migrationBuilder.DropTable( + name: "presence_activities"); + + migrationBuilder.DropTable( + name: "punishments"); + + migrationBuilder.DropTable( + name: "realm_members"); + + migrationBuilder.DropTable( + name: "social_credit_records"); + + migrationBuilder.DropTable( + name: "wallet_fund_recipients"); + + migrationBuilder.DropTable( + name: "wallet_gifts"); + migrationBuilder.DropTable( name: "wallet_pockets"); migrationBuilder.DropTable( - name: "wallet_subscriptions"); + name: "affiliation_spells"); migrationBuilder.DropTable( - name: "auth_challenges"); - - migrationBuilder.DropTable( - name: "custom_apps"); + name: "auth_sessions"); migrationBuilder.DropTable( name: "payment_transactions"); @@ -979,11 +1439,23 @@ namespace DysonNetwork.Pass.Migrations name: "permission_groups"); migrationBuilder.DropTable( - name: "wallet_coupons"); + name: "realms"); + + migrationBuilder.DropTable( + name: "wallet_funds"); + + migrationBuilder.DropTable( + name: "wallet_subscriptions"); + + migrationBuilder.DropTable( + name: "auth_clients"); migrationBuilder.DropTable( name: "wallets"); + migrationBuilder.DropTable( + name: "wallet_coupons"); + migrationBuilder.DropTable( name: "accounts"); }