diff --git a/SW.Bitween.PgSql/Migrations/20260901121718_PromotedPropertiesTrigramIndex.Designer.cs b/SW.Bitween.PgSql/Migrations/20260901121718_PromotedPropertiesTrigramIndex.Designer.cs
new file mode 100644
index 00000000..7bc67e71
--- /dev/null
+++ b/SW.Bitween.PgSql/Migrations/20260901121718_PromotedPropertiesTrigramIndex.Designer.cs
@@ -0,0 +1,2455 @@
+//
+using System;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+using SW.Bitween.Model;
+using SW.Bitween.PgSql;
+
+#nullable disable
+
+namespace SW.Bitween.PgSql.Migrations
+{
+ [DbContext(typeof(BitweenDbContext))]
+ [Migration("20260901121718_PromotedPropertiesTrigramIndex")]
+ partial class PromotedPropertiesTrigramIndex
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasDefaultSchema("infolink")
+ .HasAnnotation("ProductVersion", "9.0.19")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("SW.Bitween.Domain.Accounts.Account", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("Deleted")
+ .HasColumnType("boolean")
+ .HasColumnName("deleted");
+
+ b.Property("Disabled")
+ .HasColumnType("boolean")
+ .HasColumnName("disabled");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("display_name");
+
+ b.Property("Email")
+ .HasMaxLength(200)
+ .IsUnicode(false)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("email");
+
+ b.Property("EmailProvider")
+ .HasColumnType("smallint")
+ .HasColumnName("email_provider");
+
+ b.Property("FailedLoginCount")
+ .HasColumnType("integer")
+ .HasColumnName("failed_login_count");
+
+ b.Property("LockoutEnd")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("lockout_end");
+
+ b.Property("LoginMethods")
+ .HasColumnType("smallint")
+ .HasColumnName("login_methods");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("Password")
+ .HasMaxLength(500)
+ .IsUnicode(false)
+ .HasColumnType("character varying(500)")
+ .HasColumnName("password");
+
+ b.Property("Role")
+ .HasColumnType("integer")
+ .HasColumnName("role");
+
+ b.HasKey("Id")
+ .HasName("pk_accounts");
+
+ b.HasIndex("Email")
+ .IsUnique()
+ .HasDatabaseName("ix_accounts_email");
+
+ b.ToTable("Accounts", "infolink");
+
+ b.HasData(
+ new
+ {
+ Id = 9999,
+ CreatedOn = new DateTime(2022, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
+ Deleted = false,
+ Disabled = false,
+ DisplayName = "Admin",
+ Email = "admin@Bitween.systems",
+ EmailProvider = (byte)0,
+ FailedLoginCount = 0,
+ LoginMethods = (byte)2,
+ Password = "$SWHASH$V1$10000$VQCi48eitH4Ml5juvBMOFZrMdQwBbhuIQVXe6RR7qJdDF2bJ",
+ Role = 0
+ });
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Accounts.AccountRoleLink", b =>
+ {
+ b.Property("AccountId")
+ .HasColumnType("integer")
+ .HasColumnName("account_id");
+
+ b.Property("RoleId")
+ .HasColumnType("integer")
+ .HasColumnName("role_id");
+
+ b.HasKey("AccountId", "RoleId")
+ .HasName("pk_account_roles");
+
+ b.HasIndex("RoleId")
+ .HasDatabaseName("ix_account_roles_role_id");
+
+ b.ToTable("AccountRoles", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Accounts.RefreshToken", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .IsUnicode(false)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("AccountId")
+ .HasColumnType("integer")
+ .HasColumnName("account_id");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("LoginMethod")
+ .HasColumnType("smallint")
+ .HasColumnName("login_method");
+
+ b.HasKey("Id")
+ .HasName("pk_refresh_tokens");
+
+ b.HasIndex("AccountId")
+ .HasDatabaseName("ix_refresh_tokens_account_id");
+
+ b.ToTable("RefreshTokens", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Accounts.Role", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasColumnName("description");
+
+ b.Property("IsSystem")
+ .HasColumnType("boolean")
+ .HasColumnName("is_system");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("name");
+
+ b.Property("Permissions")
+ .HasColumnType("text")
+ .HasColumnName("permissions");
+
+ b.HasKey("Id")
+ .HasName("pk_roles");
+
+ b.HasIndex("Name")
+ .IsUnique()
+ .HasDatabaseName("ix_roles_name");
+
+ b.ToTable("Roles", "infolink");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ CreatedOn = new DateTime(2022, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
+ Description = "Full access to everything, including members, roles and settings.",
+ IsSystem = true,
+ Name = "Administrator",
+ Permissions = "[]"
+ },
+ new
+ {
+ Id = 2,
+ CreatedOn = new DateTime(2022, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
+ Description = "Runs and configures integrations. Can't manage members, roles or settings.",
+ IsSystem = true,
+ Name = "Member",
+ Permissions = "[]"
+ },
+ new
+ {
+ Id = 3,
+ CreatedOn = new DateTime(2022, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc),
+ Description = "Read-only access to integrations, exchanges and configuration.",
+ IsSystem = true,
+ Name = "Viewer",
+ Permissions = "[]"
+ });
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.DelayedRetry", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("On")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("on");
+
+ b.HasKey("Id")
+ .HasName("pk_delayed_retry");
+
+ b.HasIndex("On")
+ .HasDatabaseName("ix_delayed_retry_on");
+
+ b.ToTable("delayed_retry", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Document", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BusEnabled")
+ .HasColumnType("boolean")
+ .HasColumnName("bus_enabled");
+
+ b.Property("BusMessageTypeName")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasColumnName("bus_message_type_name");
+
+ b.Property("Code")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("code");
+
+ b.Property("DisregardsUnfilteredMessages")
+ .HasColumnType("boolean")
+ .HasColumnName("disregards_unfiltered_messages");
+
+ b.Property("DocumentFormat")
+ .HasColumnType("integer")
+ .HasColumnName("document_format");
+
+ b.Property("DuplicateInterval")
+ .HasColumnType("integer")
+ .HasColumnName("duplicate_interval");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("name");
+
+ b.Property("PromotedProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("promoted_properties");
+
+ b.HasKey("Id")
+ .HasName("pk_document");
+
+ b.HasIndex("BusMessageTypeName")
+ .IsUnique()
+ .HasDatabaseName("ix_document_bus_message_type_name");
+
+ b.HasIndex("Code")
+ .IsUnique()
+ .HasDatabaseName("ix_document_code");
+
+ b.HasIndex("Name")
+ .IsUnique()
+ .HasDatabaseName("ix_document_name");
+
+ b.ToTable("document", "infolink");
+
+ b.HasData(
+ new
+ {
+ Id = 10001,
+ BusEnabled = false,
+ DocumentFormat = 0,
+ DuplicateInterval = 0,
+ Name = "Aggregation Document",
+ PromotedProperties = "{}"
+ });
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.DocumentTrail", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasColumnName("id");
+
+ b.Property("Code")
+ .HasColumnType("integer")
+ .HasColumnName("code");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("DocumentId")
+ .HasColumnType("integer")
+ .HasColumnName("document_id");
+
+ b.Property("StateAfter")
+ .HasColumnType("text")
+ .HasColumnName("state_after");
+
+ b.Property("StateBefore")
+ .HasColumnType("text")
+ .HasColumnName("state_before");
+
+ b.HasKey("Id")
+ .HasName("pk_document_trail");
+
+ b.HasIndex("CreatedOn")
+ .HasDatabaseName("ix_document_trail_created_on");
+
+ b.HasIndex("DocumentId")
+ .HasDatabaseName("ix_document_trail_document_id");
+
+ b.ToTable("document_trail", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Gateway.ApiGateway", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("Inactive")
+ .HasColumnType("boolean")
+ .HasColumnName("inactive");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("name");
+
+ b.Property("UrlName")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("url_name");
+
+ b.HasKey("Id")
+ .HasName("pk_api_gateway");
+
+ b.HasIndex("UrlName")
+ .IsUnique()
+ .HasDatabaseName("ix_api_gateway_url_name");
+
+ b.ToTable("api_gateway", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Gateway.ApiGatewayPartner", b =>
+ {
+ b.Property("ApiGatewayId")
+ .HasColumnType("integer")
+ .HasColumnName("api_gateway_id");
+
+ b.Property("PartnerId")
+ .HasColumnType("integer")
+ .HasColumnName("partner_id");
+
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.HasKey("ApiGatewayId", "PartnerId", "SubscriptionId")
+ .HasName("pk_api_gateway_partner");
+
+ b.HasIndex("PartnerId")
+ .HasDatabaseName("ix_api_gateway_partner_partner_id");
+
+ b.HasIndex("SubscriptionId")
+ .HasDatabaseName("ix_api_gateway_partner_subscription_id");
+
+ b.ToTable("api_gateway_partner", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Gateway.BusGateway", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("DocumentId")
+ .HasColumnType("integer")
+ .HasColumnName("document_id");
+
+ b.Property("Inactive")
+ .HasColumnType("boolean")
+ .HasColumnName("inactive");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("pk_bus_gateway");
+
+ b.HasIndex("DocumentId")
+ .HasDatabaseName("ix_bus_gateway_document_id");
+
+ b.ToTable("bus_gateway", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Gateway.BusGatewayRoute", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BusGatewayId")
+ .HasColumnType("integer")
+ .HasColumnName("bus_gateway_id");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("MatchExpression")
+ .HasColumnType("text")
+ .HasColumnName("match_expression");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("PartnerId")
+ .HasColumnType("integer")
+ .HasColumnName("partner_id");
+
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.HasKey("Id")
+ .HasName("pk_bus_gateway_route");
+
+ b.HasIndex("BusGatewayId")
+ .HasDatabaseName("ix_bus_gateway_route_bus_gateway_id");
+
+ b.HasIndex("PartnerId")
+ .HasDatabaseName("ix_bus_gateway_route_partner_id");
+
+ b.HasIndex("SubscriptionId")
+ .HasDatabaseName("ix_bus_gateway_route_subscription_id");
+
+ b.ToTable("bus_gateway_route", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.GlobalAdapterValuesSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("text")
+ .HasColumnName("id");
+
+ b.Property("Name")
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.Property>("Values")
+ .HasColumnType("jsonb")
+ .HasColumnName("values");
+
+ b.HasKey("Id")
+ .HasName("pk_global_adapter_values_set");
+
+ b.ToTable("global_adapter_values_set", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Notifier", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("HandlerId")
+ .HasMaxLength(200)
+ .IsUnicode(false)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("handler_id");
+
+ b.Property("HandlerProperties")
+ .HasColumnType("text")
+ .HasColumnName("handler_properties");
+
+ b.Property("Inactive")
+ .HasColumnType("boolean")
+ .HasColumnName("inactive");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("name");
+
+ b.Property("RunOnBadResult")
+ .HasColumnType("boolean")
+ .HasColumnName("run_on_bad_result");
+
+ b.Property("RunOnFailedResult")
+ .HasColumnType("boolean")
+ .HasColumnName("run_on_failed_result");
+
+ b.PrimitiveCollection("RunOnSubscriptions")
+ .HasColumnType("integer[]")
+ .HasColumnName("run_on_subscriptions");
+
+ b.Property("RunOnSuccessfulResult")
+ .HasColumnType("boolean")
+ .HasColumnName("run_on_successful_result");
+
+ b.HasKey("Id")
+ .HasName("pk_notifier");
+
+ b.ToTable("notifier", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.OnHoldXchange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BadData")
+ .HasColumnType("boolean")
+ .HasColumnName("bad_data");
+
+ b.Property("Data")
+ .HasColumnType("text")
+ .HasColumnName("data");
+
+ b.Property("FileName")
+ .HasColumnType("text")
+ .HasColumnName("file_name");
+
+ b.PrimitiveCollection("References")
+ .HasColumnType("text[]")
+ .HasColumnName("references");
+
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.HasKey("Id")
+ .HasName("pk_on_hold_xchange");
+
+ b.HasIndex("SubscriptionId")
+ .HasDatabaseName("ix_on_hold_xchange_subscription_id");
+
+ b.ToTable("on_hold_xchange", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Partner", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property>("AdapterProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("adapter_properties");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("pk_partner");
+
+ b.ToTable("partner", "infolink");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Name = "SYSTEM"
+ });
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.ReceiveAttempt", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("ErrorMessage")
+ .HasColumnType("text")
+ .HasColumnName("error_message");
+
+ b.PrimitiveCollection("ExchangeIds")
+ .HasColumnType("text[]")
+ .HasColumnName("exchange_ids");
+
+ b.Property("FinishedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("finished_on");
+
+ b.Property("Outcome")
+ .HasColumnType("integer")
+ .HasColumnName("outcome");
+
+ b.Property("StartedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("started_on");
+
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.HasKey("Id")
+ .HasName("pk_receive_attempt");
+
+ b.HasIndex("SubscriptionId", "StartedOn")
+ .HasDatabaseName("ix_receive_attempt_subscription_id_started_on");
+
+ b.ToTable("receive_attempt", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.RetryAlertOverride", b =>
+ {
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.Property("GroupId")
+ .HasColumnType("uuid")
+ .HasColumnName("group_id");
+
+ b.Property("AlertHandlerId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("alert_handler_id");
+
+ b.Property("AlertHandlerProperties")
+ .HasColumnType("text")
+ .HasColumnName("alert_handler_properties");
+
+ b.Property("AlertMode")
+ .HasColumnType("smallint")
+ .HasColumnName("alert_mode");
+
+ b.HasKey("SubscriptionId", "GroupId")
+ .HasName("pk_retry_alert_override");
+
+ b.ToTable("retry_alert_override", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.RetryGroupUsage", b =>
+ {
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.Property("GroupId")
+ .HasColumnType("uuid")
+ .HasColumnName("group_id");
+
+ b.Property("AttemptsUsed")
+ .HasColumnType("integer")
+ .HasColumnName("attempts_used");
+
+ b.Property("ExhaustedNotifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("exhausted_notified_on");
+
+ b.Property("LastAttemptOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("last_attempt_on");
+
+ b.HasKey("SubscriptionId", "GroupId")
+ .HasName("pk_retry_group_usage");
+
+ b.ToTable("retry_group_usage", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.RetryPolicy", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AlertHandlerId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("alert_handler_id");
+
+ b.Property("AlertHandlerProperties")
+ .HasColumnType("text")
+ .HasColumnName("alert_handler_properties");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("Groups")
+ .HasColumnType("text")
+ .HasColumnName("groups");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("name");
+
+ b.HasKey("Id")
+ .HasName("pk_retry_policy");
+
+ b.ToTable("retry_policy", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Setting", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(200)
+ .IsUnicode(false)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("id");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.Property("Value")
+ .HasColumnType("text")
+ .HasColumnName("value");
+
+ b.HasKey("Id")
+ .HasName("pk_settings");
+
+ b.ToTable("Settings", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Subscription", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("AggregateOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("aggregate_on");
+
+ b.Property("AggregationForId")
+ .HasColumnType("integer")
+ .HasColumnName("aggregation_for_id");
+
+ b.Property("AggregationTarget")
+ .HasColumnType("smallint")
+ .HasColumnName("aggregation_target");
+
+ b.Property("CategoryId")
+ .HasColumnType("integer")
+ .HasColumnName("category_id");
+
+ b.Property("ConsecutiveFailures")
+ .HasColumnType("integer")
+ .HasColumnName("consecutive_failures");
+
+ b.Property("CustomRetryPolicy")
+ .HasColumnType("text")
+ .HasColumnName("custom_retry_policy");
+
+ b.Property>("DocumentFilter")
+ .HasColumnType("jsonb")
+ .HasColumnName("document_filter");
+
+ b.Property("DocumentId")
+ .HasColumnType("integer")
+ .HasColumnName("document_id");
+
+ b.Property("HandlerId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("handler_id");
+
+ b.Property>("HandlerProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("handler_properties");
+
+ b.Property("Inactive")
+ .HasColumnType("boolean")
+ .HasColumnName("inactive");
+
+ b.Property("IsRunning")
+ .HasColumnType("boolean")
+ .HasColumnName("is_running");
+
+ b.Property("LastException")
+ .HasColumnType("text")
+ .HasColumnName("last_exception");
+
+ b.Property("MapperId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("mapper_id");
+
+ b.Property>("MapperProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("mapper_properties");
+
+ b.Property("MatchExpression")
+ .HasColumnType("text")
+ .HasColumnName("match_expression");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(100)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("name");
+
+ b.Property("PartnerId")
+ .HasColumnType("integer")
+ .HasColumnName("partner_id");
+
+ b.Property("PausedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("paused_on");
+
+ b.Property("ReceiveOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("receive_on");
+
+ b.Property("ReceiverId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("receiver_id");
+
+ b.Property>("ReceiverProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("receiver_properties");
+
+ b.Property("ResponseMessageTypeName")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasColumnName("response_message_type_name");
+
+ b.Property("ResponseSubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("response_subscription_id");
+
+ b.Property("RetryPolicyId")
+ .HasColumnType("integer")
+ .HasColumnName("retry_policy_id");
+
+ b.Property("Temporary")
+ .HasColumnType("boolean")
+ .HasColumnName("temporary");
+
+ b.Property("Type")
+ .HasColumnType("smallint")
+ .HasColumnName("type");
+
+ b.Property("ValidatorId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("validator_id");
+
+ b.Property>("ValidatorProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("validator_properties");
+
+ b.Property("WorkGroupId")
+ .HasColumnType("integer")
+ .HasColumnName("work_group_id");
+
+ b.HasKey("Id")
+ .HasName("pk_subscription");
+
+ b.HasIndex("AggregationForId")
+ .HasDatabaseName("ix_subscription_aggregation_for_id");
+
+ b.HasIndex("CategoryId")
+ .HasDatabaseName("ix_subscription_category_id");
+
+ b.HasIndex("DocumentId")
+ .HasDatabaseName("ix_subscription_document_id");
+
+ b.HasIndex("PartnerId")
+ .HasDatabaseName("ix_subscription_partner_id");
+
+ b.HasIndex("ResponseSubscriptionId")
+ .HasDatabaseName("ix_subscription_response_subscription_id");
+
+ b.HasIndex("RetryPolicyId")
+ .HasDatabaseName("ix_subscription_retry_policy_id");
+
+ b.HasIndex("WorkGroupId")
+ .HasDatabaseName("ix_subscription_work_group_id");
+
+ b.ToTable("subscription", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.SubscriptionCategory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Code")
+ .HasColumnType("text")
+ .HasColumnName("code");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("Description")
+ .HasColumnType("text")
+ .HasColumnName("description");
+
+ b.Property("ModifiedBy")
+ .HasColumnType("text")
+ .HasColumnName("modified_by");
+
+ b.Property("ModifiedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("modified_on");
+
+ b.HasKey("Id")
+ .HasName("pk_subscription_category");
+
+ b.HasIndex("Code")
+ .IsUnique()
+ .HasDatabaseName("ix_subscription_category_code");
+
+ b.ToTable("subscription_category", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.SubscriptionTrail", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("Code")
+ .HasColumnType("integer")
+ .HasColumnName("code");
+
+ b.Property("CreatedBy")
+ .HasColumnType("text")
+ .HasColumnName("created_by");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("created_on");
+
+ b.Property("StateAfter")
+ .HasColumnType("text")
+ .HasColumnName("state_after");
+
+ b.Property("StateBefore")
+ .HasColumnType("text")
+ .HasColumnName("state_before");
+
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.HasKey("Id")
+ .HasName("pk_subscription_trail");
+
+ b.HasIndex("CreatedOn")
+ .HasDatabaseName("ix_subscription_trail_created_on");
+
+ b.HasIndex("SubscriptionId")
+ .HasDatabaseName("ix_subscription_trail_subscription_id");
+
+ b.ToTable("subscription_trail", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.WorkGroup", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("BusMessageName")
+ .IsRequired()
+ .HasMaxLength(100)
+ .IsUnicode(false)
+ .HasColumnType("character varying(100)")
+ .HasColumnName("bus_message_name");
+
+ b.Property("Name")
+ .HasColumnType("text")
+ .HasColumnName("name");
+
+ b.Property("Options")
+ .HasColumnType("jsonb")
+ .HasColumnName("options");
+
+ b.HasKey("Id")
+ .HasName("pk_work_group");
+
+ b.ToTable("work_group", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.Xchange", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("CorrelationId")
+ .HasColumnType("text")
+ .HasColumnName("correlation_id");
+
+ b.Property("DocumentId")
+ .HasColumnType("integer")
+ .HasColumnName("document_id");
+
+ b.Property("HandlerId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("handler_id");
+
+ b.Property>("HandlerProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("handler_properties");
+
+ b.Property("InputContentType")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("input_content_type");
+
+ b.Property("InputHash")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("input_hash");
+
+ b.Property("InputName")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("input_name");
+
+ b.Property("InputSize")
+ .HasColumnType("integer")
+ .HasColumnName("input_size");
+
+ b.Property("ManualRetry")
+ .HasColumnType("boolean")
+ .HasColumnName("manual_retry");
+
+ b.Property("MapperId")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("mapper_id");
+
+ b.Property>("MapperProperties")
+ .HasColumnType("jsonb")
+ .HasColumnName("mapper_properties");
+
+ b.Property("PartnerId")
+ .HasColumnType("integer")
+ .HasColumnName("partner_id");
+
+ b.PrimitiveCollection("References")
+ .HasColumnType("text[]")
+ .HasColumnName("references");
+
+ b.Property("ResponseMessageTypeName")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasColumnName("response_message_type_name");
+
+ b.Property("ResponseSubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("response_subscription_id");
+
+ b.Property("RetryFor")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("retry_for");
+
+ b.Property("StartedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("started_on");
+
+ b.Property("SubscriptionId")
+ .HasColumnType("integer")
+ .HasColumnName("subscription_id");
+
+ b.HasKey("Id")
+ .HasName("pk_xchange");
+
+ b.HasIndex("DocumentId")
+ .HasDatabaseName("ix_xchange_document_id");
+
+ b.HasIndex("InputHash")
+ .HasDatabaseName("ix_xchange_input_hash");
+
+ b.HasIndex("RetryFor")
+ .HasDatabaseName("ix_xchange_retry_for");
+
+ b.HasIndex("StartedOn")
+ .HasDatabaseName("ix_xchange_started_on");
+
+ b.HasIndex("SubscriptionId")
+ .HasDatabaseName("ix_xchange_subscription_id");
+
+ b.ToTable("xchange", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.XchangeAggregation", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("AggregatedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("aggregated_on");
+
+ b.Property("AggregationXchangeId")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("aggregation_xchange_id");
+
+ b.HasKey("Id")
+ .HasName("pk_xchange_aggregation");
+
+ b.HasIndex("AggregationXchangeId")
+ .HasDatabaseName("ix_xchange_aggregation_aggregation_xchange_id");
+
+ b.ToTable("xchange_aggregation", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.XchangeDelivery", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("DeliveredOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("delivered_on");
+
+ b.HasKey("Id")
+ .HasName("pk_xchange_delivery");
+
+ b.HasIndex("DeliveredOn")
+ .HasDatabaseName("ix_xchange_delivery_delivered_on");
+
+ b.ToTable("xchange_delivery", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.XchangeNotification", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Exception")
+ .HasColumnType("text")
+ .HasColumnName("exception");
+
+ b.Property("FinishedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("finished_on");
+
+ b.Property("NotifierId")
+ .HasColumnType("integer")
+ .HasColumnName("notifier_id");
+
+ b.Property("NotifierName")
+ .HasColumnType("text")
+ .HasColumnName("notifier_name");
+
+ b.Property("Success")
+ .HasColumnType("boolean")
+ .HasColumnName("success");
+
+ b.Property("XchangeId")
+ .HasMaxLength(50)
+ .IsUnicode(false)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("xchange_id");
+
+ b.HasKey("Id")
+ .HasName("pk_xchange_notification");
+
+ b.ToTable("xchange_notification", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.XchangePromotedProperties", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.PrimitiveCollection("Hits")
+ .HasColumnType("integer[]")
+ .HasColumnName("hits");
+
+ b.Property>("Properties")
+ .HasColumnType("jsonb")
+ .HasColumnName("properties");
+
+ b.Property("PropertiesRaw")
+ .HasColumnType("text")
+ .HasColumnName("properties_raw");
+
+ b.HasKey("Id")
+ .HasName("pk_xchange_promoted_properties");
+
+ b.HasIndex("PropertiesRaw")
+ .HasDatabaseName("ix_xchange_promoted_properties_properties_raw");
+
+ b.ToTable("xchange_promoted_properties", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.Domain.XchangeResult", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("id");
+
+ b.Property("AttemptNumber")
+ .HasColumnType("integer")
+ .HasColumnName("attempt_number");
+
+ b.Property("Exception")
+ .HasColumnType("text")
+ .HasColumnName("exception");
+
+ b.Property("FinishedOn")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("finished_on");
+
+ b.Property("OutputBad")
+ .HasColumnType("boolean")
+ .HasColumnName("output_bad");
+
+ b.Property("OutputContentType")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("output_content_type");
+
+ b.Property("OutputHash")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("output_hash");
+
+ b.Property("OutputName")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("output_name");
+
+ b.Property("OutputSize")
+ .HasColumnType("integer")
+ .HasColumnName("output_size");
+
+ b.Property("ResponseBad")
+ .HasColumnType("boolean")
+ .HasColumnName("response_bad");
+
+ b.Property("ResponseContentType")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("response_content_type");
+
+ b.Property("ResponseHash")
+ .HasMaxLength(50)
+ .HasColumnType("character varying(50)")
+ .HasColumnName("response_hash");
+
+ b.Property("ResponseName")
+ .HasMaxLength(200)
+ .HasColumnType("character varying(200)")
+ .HasColumnName("response_name");
+
+ b.Property("ResponseSize")
+ .HasColumnType("integer")
+ .HasColumnName("response_size");
+
+ b.Property("ResponseXchangeId")
+ .HasColumnType("text")
+ .HasColumnName("response_xchange_id");
+
+ b.Property("RetryBlockedReason")
+ .HasMaxLength(500)
+ .HasColumnType("character varying(500)")
+ .HasColumnName("retry_blocked_reason");
+
+ b.Property("RetryGroupId")
+ .HasColumnType("uuid")
+ .HasColumnName("retry_group_id");
+
+ b.Property("Success")
+ .HasColumnType("boolean")
+ .HasColumnName("success");
+
+ b.HasKey("Id")
+ .HasName("pk_xchange_result");
+
+ b.HasIndex("RetryGroupId")
+ .HasDatabaseName("ix_xchange_result_retry_group_id");
+
+ b.ToTable("xchange_result", "infolink");
+ });
+
+ modelBuilder.Entity("SW.Bitween.RunFlagUpdater+RunningResult", b =>
+ {
+ b.Property("IsRunning")
+ .HasColumnType("boolean")
+ .HasColumnName("is_running");
+
+ b.ToTable("running_result", "infolink");
+
+ b.ToView(null, (string)null);
+ });
+
+ modelBuilder.Entity("SW.Scheduler.JobExecution", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint")
+ .HasColumnName("id");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Context")
+ .HasColumnType("text")
+ .HasColumnName("context");
+
+ b.Property