From 8f0192b4814c68d47f2e6f90db72340e65a78fa8 Mon Sep 17 00:00:00 2001 From: Daniel Almeida <115644988+daniel-almeida-konkconsulting@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:33:36 +0000 Subject: [PATCH 1/7] Performance Improvements with Database Indexes (#577) * feat: add missing database indexes for relationship changes, metric statuses and identities * feat: add migrations for database indexes for both providers * chore: disable warning since indexes may include nullable properties * fix: change migration order due to alter column statement on TierId * chore: align postgres migration order with sql server order --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- ...40327091638_AddIdentityIndexes.Designer.cs | 897 +++++++++ .../20240327091638_AddIdentityIndexes.cs | 36 + .../DevicesDbContextModelSnapshot.cs | 1780 ++++++++-------- ...40326162207_AddIdentityIndexes.Designer.cs | 892 ++++++++ .../20240326162207_AddIdentityIndexes.cs | 36 + .../ApplicationDbContextModelSnapshot.cs | 1792 +++++++++-------- .../IdentityEntityTypeConfiguration.cs | 4 + ...321141543_AddMetricStatusIndex.Designer.cs | 355 ++++ .../20240321141543_AddMetricStatusIndex.cs | 28 + .../QuotasDbContextModelSnapshot.cs | 9 +- ...321141522_AddMetricStatusIndex.Designer.cs | 355 ++++ .../20240321141522_AddMetricStatusIndex.cs | 28 + .../QuotasDbContextModelSnapshot.cs | 9 +- .../MetricStatusEntityTypeConfiguration.cs | 6 + ...259_AddRelationshipChangeIndex.Designer.cs | 385 ++++ ...240321141259_AddRelationshipChangeIndex.cs | 28 + .../RelationshipsDbContextModelSnapshot.cs | 5 + ...151_AddRelationshipChangeIndex.Designer.cs | 385 ++++ ...240321141151_AddRelationshipChangeIndex.cs | 28 + .../ApplicationDbContextModelSnapshot.cs | 5 + ...ipChangeResponseEntityTypeConfiguration.cs | 4 + 21 files changed, 5281 insertions(+), 1786 deletions(-) create mode 100644 Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.Designer.cs create mode 100644 Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.cs create mode 100644 Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.Designer.cs create mode 100644 Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.cs create mode 100644 Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.Designer.cs create mode 100644 Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.cs create mode 100644 Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.Designer.cs create mode 100644 Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.Designer.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.Designer.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.cs diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.Designer.cs b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.Designer.cs new file mode 100644 index 0000000000..edcec133ef --- /dev/null +++ b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.Designer.cs @@ -0,0 +1,897 @@ +// +using System; +using Backbone.Modules.Devices.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Devices.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(DevicesDbContext))] + [Migration("20240327091638_AddIdentityIndexes")] + partial class AddIdentityIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.PushNotifications.PnsRegistration", b => + { + b.Property("DeviceId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("AppId") + .IsRequired() + .HasColumnType("text"); + + b.Property("DevicePushIdentifier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Environment") + .HasColumnType("integer"); + + b.Property("Handle") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(true) + .HasColumnType("character varying(200)") + .IsFixedLength(false); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("DeviceId"); + + b.ToTable("PnsRegistrations"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CanBeManuallyAssigned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true); + + b.Property("CanBeUsedAsDefaultForClient") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(true) + .HasColumnType("character varying(30)") + .IsFixedLength(false); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Tiers"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Challenge", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.ToTable("Challenges", "Challenges", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("AccessFailedCount") + .HasColumnType("integer"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("LastLoginAt") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .HasColumnType("boolean"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PasswordHash") + .HasColumnType("text"); + + b.Property("SecurityStamp") + .HasColumnType("text"); + + b.Property("UserName") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Property("Address") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("ClientId") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletionGracePeriodEndsAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IdentityVersion") + .HasColumnType("smallint"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("TierId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("TierIdBeforeDeletion") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Address"); + + b.HasIndex("ClientId"); + + b.HasIndex("TierId"); + + b.ToTable("Identities"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ApprovalReminder1SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovalReminder2SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovalReminder3SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CancelledAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CancelledByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodEndsAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodReminder1SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodReminder2SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodReminder3SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IdentityAddress") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("RejectedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("IdentityDeletionProcesses", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceIdHash") + .HasColumnType("bytea"); + + b.Property("IdentityAddressHash") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("IdentityDeletionProcessId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Message") + .IsRequired() + .HasColumnType("text"); + + b.Property("NewStatus") + .HasColumnType("integer"); + + b.Property("OldStatus") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("IdentityDeletionProcessId"); + + b.ToTable("IdentityDeletionProcessAuditLog", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DefaultTier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("JsonWebKeySet") + .HasColumnType("text"); + + b.Property("MaxIdentities") + .HasColumnType("integer"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Settings") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.HasIndex("DefaultTier"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationId") + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationId") + .HasColumnType("text"); + + b.Property("AuthorizationId") + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique(); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("ProviderKey") + .HasColumnType("text"); + + b.Property("ProviderDisplayName") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("RoleId") + .HasColumnType("text"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Device", "Device") + .WithOne("User") + .HasForeignKey("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", "DeviceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", "Identity") + .WithMany("Devices") + .HasForeignKey("IdentityAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Identity"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", null) + .WithMany("DeletionProcesses") + .HasForeignKey("IdentityAddress"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", null) + .WithMany("AuditLog") + .HasForeignKey("IdentityDeletionProcessId"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", null) + .WithMany() + .HasForeignKey("DefaultTier") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Authorizations") + .HasForeignKey("ApplicationId"); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Tokens") + .HasForeignKey("ApplicationId"); + + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Application"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Navigation("DeletionProcesses"); + + b.Navigation("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Navigation("AuditLog"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Navigation("Authorizations"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.cs b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.cs new file mode 100644 index 0000000000..13cdf76ccb --- /dev/null +++ b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/20240327091638_AddIdentityIndexes.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Devices.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class AddIdentityIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_Identities_ClientId", + table: "Identities", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_Identities_TierId", + table: "Identities", + column: "TierId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Identities_ClientId", + table: "Identities"); + + migrationBuilder.DropIndex( + name: "IX_Identities_TierId", + table: "Identities"); + } + } +} diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/DevicesDbContextModelSnapshot.cs b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/DevicesDbContextModelSnapshot.cs index 7cfc541b20..01234522a8 100644 --- a/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/DevicesDbContextModelSnapshot.cs +++ b/Modules/Devices/src/Devices.Infrastructure.Database.Postgres/Migrations/DevicesDbContextModelSnapshot.cs @@ -1,890 +1,894 @@ -// -using System; -using Backbone.Modules.Devices.Infrastructure.Persistence.Database; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace Devices.Infrastructure.Database.Postgres.Migrations -{ - [DbContext(typeof(DevicesDbContext))] - partial class DevicesDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder +// +using System; +using Backbone.Modules.Devices.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Devices.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(DevicesDbContext))] + partial class DevicesDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder .HasAnnotation("ProductVersion", "8.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.PushNotifications.PnsRegistration", b => - { - b.Property("DeviceId") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("AppId") - .IsRequired() - .HasColumnType("text"); - - b.Property("DevicePushIdentifier") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("Environment") - .HasColumnType("integer"); - - b.Property("Handle") - .IsRequired() - .HasMaxLength(200) - .IsUnicode(true) - .HasColumnType("character varying(200)") - .IsFixedLength(false); - - b.Property("IdentityAddress") - .IsRequired() - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("character(36)") - .IsFixedLength(); - - b.Property("UpdatedAt") - .HasColumnType("timestamp with time zone"); - - b.HasKey("DeviceId"); - - b.ToTable("PnsRegistrations"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("CanBeManuallyAssigned") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true); - - b.Property("CanBeUsedAsDefaultForClient") - .ValueGeneratedOnAdd() - .HasColumnType("boolean") - .HasDefaultValue(true); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .IsUnicode(true) - .HasColumnType("character varying(30)") - .IsFixedLength(false); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Tiers"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Challenge", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("ExpiresAt") - .HasColumnType("timestamp with time zone"); - - b.HasKey("Id"); - - b.ToTable("Challenges", "Challenges", t => - { - t.ExcludeFromMigrations(); - }); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("text"); - - b.Property("AccessFailedCount") - .HasColumnType("integer"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("LastLoginAt") - .HasColumnType("timestamp with time zone"); - - b.Property("LockoutEnabled") - .HasColumnType("boolean"); - - b.Property("LockoutEnd") - .HasColumnType("timestamp with time zone"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("PasswordHash") - .HasColumnType("text"); - - b.Property("SecurityStamp") - .HasColumnType("text"); - - b.Property("UserName") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.HasKey("Id"); - - b.HasIndex("DeviceId") - .IsUnique(); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CreatedByDevice") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("DeletedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("DeletedByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("IdentityAddress") - .IsRequired() - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("character(36)") - .IsFixedLength(); - - b.HasKey("Id"); - - b.HasIndex("IdentityAddress"); - - b.ToTable("Devices"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => - { - b.Property("Address") - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("character(36)") - .IsFixedLength(); - - b.Property("ClientId") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("DeletionGracePeriodEndsAt") - .HasColumnType("timestamp with time zone"); - - b.Property("IdentityVersion") - .HasColumnType("smallint"); - - b.Property("PublicKey") - .IsRequired() - .HasColumnType("bytea"); - - b.Property("Status") - .HasColumnType("integer"); - - b.Property("TierId") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.PushNotifications.PnsRegistration", b => + { + b.Property("DeviceId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("AppId") .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("TierIdBeforeDeletion") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.HasKey("Address"); - - b.ToTable("Identities"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("ApprovalReminder1SentAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ApprovalReminder2SentAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ApprovalReminder3SentAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ApprovedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("ApprovedByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("CancelledAt") - .HasColumnType("timestamp with time zone"); - - b.Property("CancelledByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("GracePeriodEndsAt") - .HasColumnType("timestamp with time zone"); - - b.Property("GracePeriodReminder1SentAt") - .HasColumnType("timestamp with time zone"); - - b.Property("GracePeriodReminder2SentAt") - .HasColumnType("timestamp with time zone"); - - b.Property("GracePeriodReminder3SentAt") - .HasColumnType("timestamp with time zone"); - - b.Property("IdentityAddress") - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("character(36)") - .IsFixedLength(); - - b.Property("RejectedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("RejectedByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("Status") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("IdentityAddress"); - - b.ToTable("IdentityDeletionProcesses", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("DeviceIdHash") - .HasColumnType("bytea"); - - b.Property("IdentityAddressHash") - .IsRequired() - .HasColumnType("bytea"); - - b.Property("IdentityDeletionProcessId") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("Message") - .IsRequired() - .HasColumnType("text"); - - b.Property("NewStatus") - .HasColumnType("integer"); - - b.Property("OldStatus") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("IdentityDeletionProcessId"); - - b.ToTable("IdentityDeletionProcessAuditLog", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("text"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("ClientSecret") - .HasColumnType("text"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("CreatedAt") - .HasColumnType("timestamp with time zone"); - - b.Property("DefaultTier") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("character(20)") - .IsFixedLength(); - - b.Property("DisplayName") - .HasColumnType("text"); - - b.Property("DisplayNames") - .HasColumnType("text"); - - b.Property("JsonWebKeySet") - .HasColumnType("text"); - - b.Property("MaxIdentities") - .HasColumnType("integer"); - - b.Property("Permissions") - .HasColumnType("text"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("text"); - - b.Property("Properties") - .HasColumnType("text"); - - b.Property("RedirectUris") - .HasColumnType("text"); - - b.Property("Requirements") - .HasColumnType("text"); - - b.Property("Settings") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("ClientId") - .IsUnique(); - - b.HasIndex("DefaultTier"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("text"); - - b.Property("ApplicationId") - .HasColumnType("text"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("CreationDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Properties") - .HasColumnType("text"); - - b.Property("Scopes") - .HasColumnType("text"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("character varying(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("text"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("Description") - .HasColumnType("text"); - - b.Property("Descriptions") - .HasColumnType("text"); - - b.Property("DisplayName") - .HasColumnType("text"); - - b.Property("DisplayNames") - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("character varying(200)"); - - b.Property("Properties") - .HasColumnType("text"); - - b.Property("Resources") - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("text"); - - b.Property("ApplicationId") - .HasColumnType("text"); - - b.Property("AuthorizationId") - .HasColumnType("text"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("CreationDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ExpirationDate") - .HasColumnType("timestamp with time zone"); - - b.Property("Payload") - .HasColumnType("text"); - - b.Property("Properties") - .HasColumnType("text"); - - b.Property("RedemptionDate") - .HasColumnType("timestamp with time zone"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("character varying(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("character varying(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("character varying(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId") - .IsUnique(); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("text"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("text"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("character varying(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("text"); - - b.Property("ClaimValue") - .HasColumnType("text"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("ProviderKey") - .HasColumnType("text"); - - b.Property("ProviderDisplayName") - .HasColumnType("text"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("text"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("text"); - - b.Property("RoleId") - .HasColumnType("text"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("text"); - - b.Property("LoginProvider") - .HasColumnType("text"); - - b.Property("Name") - .HasColumnType("text"); - - b.Property("Value") - .HasColumnType("text"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Device", "Device") - .WithOne("User") - .HasForeignKey("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", "DeviceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Device"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", "Identity") - .WithMany("Devices") - .HasForeignKey("IdentityAddress") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Identity"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", null) - .WithMany("DeletionProcesses") - .HasForeignKey("IdentityAddress"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", null) - .WithMany("AuditLog") - .HasForeignKey("IdentityDeletionProcessId"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", null) - .WithMany() - .HasForeignKey("DefaultTier") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => - { - b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") - .WithMany("Authorizations") - .HasForeignKey("ApplicationId"); - - b.Navigation("Application"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => - { - b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") - .WithMany("Tokens") - .HasForeignKey("ApplicationId"); - - b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", "Authorization") - .WithMany("Tokens") - .HasForeignKey("AuthorizationId"); - - b.Navigation("Application"); - - b.Navigation("Authorization"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => - { - b.Navigation("User") - .IsRequired(); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => - { - b.Navigation("DeletionProcesses"); - - b.Navigation("Devices"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => - { - b.Navigation("AuditLog"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => - { - b.Navigation("Authorizations"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => - { - b.Navigation("Tokens"); - }); -#pragma warning restore 612, 618 - } - } -} + .HasColumnType("text"); + + b.Property("DevicePushIdentifier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Environment") + .HasColumnType("integer"); + + b.Property("Handle") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(true) + .HasColumnType("character varying(200)") + .IsFixedLength(false); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("UpdatedAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("DeviceId"); + + b.ToTable("PnsRegistrations"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CanBeManuallyAssigned") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true); + + b.Property("CanBeUsedAsDefaultForClient") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(true); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(true) + .HasColumnType("character varying(30)") + .IsFixedLength(false); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Tiers"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Challenge", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.ToTable("Challenges", "Challenges", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("AccessFailedCount") + .HasColumnType("integer"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("LastLoginAt") + .HasColumnType("timestamp with time zone"); + + b.Property("LockoutEnabled") + .HasColumnType("boolean"); + + b.Property("LockoutEnd") + .HasColumnType("timestamp with time zone"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("PasswordHash") + .HasColumnType("text"); + + b.Property("SecurityStamp") + .HasColumnType("text"); + + b.Property("UserName") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Property("Address") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("ClientId") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletionGracePeriodEndsAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IdentityVersion") + .HasColumnType("smallint"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("TierId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("TierIdBeforeDeletion") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Address"); + + b.HasIndex("ClientId"); + + b.HasIndex("TierId"); + + b.ToTable("Identities"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ApprovalReminder1SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovalReminder2SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovalReminder3SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ApprovedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CancelledAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CancelledByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodEndsAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodReminder1SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodReminder2SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("GracePeriodReminder3SentAt") + .HasColumnType("timestamp with time zone"); + + b.Property("IdentityAddress") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("RejectedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("RejectedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("IdentityDeletionProcesses", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeviceIdHash") + .HasColumnType("bytea"); + + b.Property("IdentityAddressHash") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("IdentityDeletionProcessId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Message") + .IsRequired() + .HasColumnType("text"); + + b.Property("NewStatus") + .HasColumnType("integer"); + + b.Property("OldStatus") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("IdentityDeletionProcessId"); + + b.ToTable("IdentityDeletionProcessAuditLog", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("ClientSecret") + .HasColumnType("text"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DefaultTier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("JsonWebKeySet") + .HasColumnType("text"); + + b.Property("MaxIdentities") + .HasColumnType("integer"); + + b.Property("Permissions") + .HasColumnType("text"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedirectUris") + .HasColumnType("text"); + + b.Property("Requirements") + .HasColumnType("text"); + + b.Property("Settings") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique(); + + b.HasIndex("DefaultTier"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationId") + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Scopes") + .HasColumnType("text"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Descriptions") + .HasColumnType("text"); + + b.Property("DisplayName") + .HasColumnType("text"); + + b.Property("DisplayNames") + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("Resources") + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("text"); + + b.Property("ApplicationId") + .HasColumnType("text"); + + b.Property("AuthorizationId") + .HasColumnType("text"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ExpirationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("Payload") + .HasColumnType("text"); + + b.Property("Properties") + .HasColumnType("text"); + + b.Property("RedemptionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("character varying(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique(); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("text"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("character varying(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("text"); + + b.Property("ClaimValue") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("ProviderKey") + .HasColumnType("text"); + + b.Property("ProviderDisplayName") + .HasColumnType("text"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("RoleId") + .HasColumnType("text"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("text"); + + b.Property("LoginProvider") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Value") + .HasColumnType("text"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Device", "Device") + .WithOne("User") + .HasForeignKey("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", "DeviceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", "Identity") + .WithMany("Devices") + .HasForeignKey("IdentityAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Identity"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", null) + .WithMany("DeletionProcesses") + .HasForeignKey("IdentityAddress"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", null) + .WithMany("AuditLog") + .HasForeignKey("IdentityDeletionProcessId"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", null) + .WithMany() + .HasForeignKey("DefaultTier") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Authorizations") + .HasForeignKey("ApplicationId"); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Tokens") + .HasForeignKey("ApplicationId"); + + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Application"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Navigation("DeletionProcesses"); + + b.Navigation("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Navigation("AuditLog"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Navigation("Authorizations"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.Designer.cs b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.Designer.cs new file mode 100644 index 0000000000..7028b3b344 --- /dev/null +++ b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.Designer.cs @@ -0,0 +1,892 @@ +// +using System; +using Backbone.Modules.Devices.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Devices.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(DevicesDbContext))] + [Migration("20240326162207_AddIdentityIndexes")] + partial class AddIdentityIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.PushNotifications.PnsRegistration", b => + { + b.Property("DeviceId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("AppId") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("DevicePushIdentifier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Environment") + .HasColumnType("int"); + + b.Property("Handle") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(true) + .HasColumnType("nvarchar(200)") + .IsFixedLength(false); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("DeviceId"); + + b.ToTable("PnsRegistrations"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(true) + .HasColumnType("nvarchar(30)") + .IsFixedLength(false); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Tiers"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Challenge", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Challenges", "Challenges", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("LastLoginAt") + .HasColumnType("datetime2"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("datetime2"); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Property("Address") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("ClientId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DeletionGracePeriodEndsAt") + .HasColumnType("datetime2"); + + b.Property("IdentityVersion") + .HasColumnType("tinyint"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TierId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("TierIdBeforeDeletion") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Address"); + + b.HasIndex("ClientId"); + + b.HasIndex("TierId"); + + b.ToTable("Identities"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ApprovalReminder1SentAt") + .HasColumnType("datetime2"); + + b.Property("ApprovalReminder2SentAt") + .HasColumnType("datetime2"); + + b.Property("ApprovalReminder3SentAt") + .HasColumnType("datetime2"); + + b.Property("ApprovedAt") + .HasColumnType("datetime2"); + + b.Property("ApprovedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CancelledAt") + .HasColumnType("datetime2"); + + b.Property("CancelledByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodEndsAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodReminder1SentAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodReminder2SentAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodReminder3SentAt") + .HasColumnType("datetime2"); + + b.Property("IdentityAddress") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("RejectedAt") + .HasColumnType("datetime2"); + + b.Property("RejectedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("IdentityDeletionProcesses", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DeviceIdHash") + .HasColumnType("varbinary(max)"); + + b.Property("IdentityAddressHash") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("IdentityDeletionProcessId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Message") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NewStatus") + .HasColumnType("int"); + + b.Property("OldStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("IdentityDeletionProcessId"); + + b.ToTable("IdentityDeletionProcessAuditLog", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DefaultTier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + + b.Property("MaxIdentities") + .HasColumnType("int"); + + b.Property("Permissions") + .HasColumnType("nvarchar(max)"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Requirements") + .HasColumnType("nvarchar(max)"); + + b.Property("Settings") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique() + .HasFilter("[ClientId] IS NOT NULL"); + + b.HasIndex("DefaultTier"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationId") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Resources") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique() + .HasFilter("[Name] IS NOT NULL"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationId") + .HasColumnType("nvarchar(450)"); + + b.Property("AuthorizationId") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique() + .HasFilter("[ReferenceId] IS NOT NULL"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Device", "Device") + .WithOne("User") + .HasForeignKey("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", "DeviceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", "Identity") + .WithMany("Devices") + .HasForeignKey("IdentityAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Identity"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", null) + .WithMany("DeletionProcesses") + .HasForeignKey("IdentityAddress"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", null) + .WithMany("AuditLog") + .HasForeignKey("IdentityDeletionProcessId"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", null) + .WithMany() + .HasForeignKey("DefaultTier") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Authorizations") + .HasForeignKey("ApplicationId"); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Tokens") + .HasForeignKey("ApplicationId"); + + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Application"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Navigation("DeletionProcesses"); + + b.Navigation("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Navigation("AuditLog"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Navigation("Authorizations"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.cs b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.cs new file mode 100644 index 0000000000..ff96032f63 --- /dev/null +++ b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/20240326162207_AddIdentityIndexes.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Devices.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class AddIdentityIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_Identities_ClientId", + table: "Identities", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_Identities_TierId", + table: "Identities", + column: "TierId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Identities_ClientId", + table: "Identities"); + + migrationBuilder.DropIndex( + name: "IX_Identities_TierId", + table: "Identities"); + } + } +} diff --git a/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index 16163fa89d..301bbcf73b 100644 --- a/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Devices/src/Devices.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,895 +1,899 @@ -// -using System; -using Backbone.Modules.Devices.Infrastructure.Persistence.Database; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; - -#nullable disable - -namespace Backbone.Modules.Devices.Infrastructure.Database.SqlServer.Migrations -{ - [DbContext(typeof(DevicesDbContext))] - partial class ApplicationDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "8.0.3") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.PushNotifications.PnsRegistration", b => - { - b.Property("DeviceId") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("AppId") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("DevicePushIdentifier") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("Environment") - .HasColumnType("int"); - - b.Property("Handle") - .IsRequired() - .HasMaxLength(200) - .IsUnicode(true) - .HasColumnType("nvarchar(200)") - .IsFixedLength(false); - - b.Property("IdentityAddress") - .IsRequired() - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("char(36)") - .IsFixedLength(); - - b.Property("UpdatedAt") - .HasColumnType("datetime2"); - - b.HasKey("DeviceId"); - - b.ToTable("PnsRegistrations"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("CanBeManuallyAssigned") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("CanBeUsedAsDefaultForClient") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("Name") - .IsRequired() - .HasMaxLength(30) - .IsUnicode(true) - .HasColumnType("nvarchar(30)") - .IsFixedLength(false); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique(); - - b.ToTable("Tiers"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Challenge", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("ExpiresAt") - .HasColumnType("datetime2"); - - b.HasKey("Id"); - - b.ToTable("Challenges", "Challenges", t => - { - t.ExcludeFromMigrations(); - }); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("AccessFailedCount") - .HasColumnType("int"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("DeviceId") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("LastLoginAt") - .HasColumnType("datetime2"); - - b.Property("LockoutEnabled") - .HasColumnType("bit"); - - b.Property("LockoutEnd") - .HasColumnType("datetimeoffset"); - - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("PasswordHash") - .HasColumnType("nvarchar(max)"); - - b.Property("SecurityStamp") - .HasColumnType("nvarchar(max)"); - - b.Property("UserName") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.HasKey("Id"); - - b.HasIndex("DeviceId") - .IsUnique(); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex") - .HasFilter("[NormalizedUserName] IS NOT NULL"); - - b.ToTable("AspNetUsers", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("CreatedByDevice") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("DeletedAt") - .HasColumnType("datetime2"); - - b.Property("DeletedByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("IdentityAddress") - .IsRequired() - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("char(36)") - .IsFixedLength(); - - b.HasKey("Id"); - - b.HasIndex("IdentityAddress"); - - b.ToTable("Devices"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => - { - b.Property("Address") - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("char(36)") - .IsFixedLength(); - - b.Property("ClientId") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("DeletionGracePeriodEndsAt") - .HasColumnType("datetime2"); - - b.Property("IdentityVersion") - .HasColumnType("tinyint"); - - b.Property("PublicKey") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("Status") - .HasColumnType("int"); - - b.Property("TierId") +// +using System; +using Backbone.Modules.Devices.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Devices.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(DevicesDbContext))] + partial class ApplicationDbContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.PushNotifications.PnsRegistration", b => + { + b.Property("DeviceId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("AppId") .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("TierIdBeforeDeletion") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.HasKey("Address"); - - b.ToTable("Identities"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("ApprovalReminder1SentAt") - .HasColumnType("datetime2"); - - b.Property("ApprovalReminder2SentAt") - .HasColumnType("datetime2"); - - b.Property("ApprovalReminder3SentAt") - .HasColumnType("datetime2"); - - b.Property("ApprovedAt") - .HasColumnType("datetime2"); - - b.Property("ApprovedByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("CancelledAt") - .HasColumnType("datetime2"); - - b.Property("CancelledByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("GracePeriodEndsAt") - .HasColumnType("datetime2"); - - b.Property("GracePeriodReminder1SentAt") - .HasColumnType("datetime2"); - - b.Property("GracePeriodReminder2SentAt") - .HasColumnType("datetime2"); - - b.Property("GracePeriodReminder3SentAt") - .HasColumnType("datetime2"); - - b.Property("IdentityAddress") - .HasMaxLength(36) - .IsUnicode(false) - .HasColumnType("char(36)") - .IsFixedLength(); - - b.Property("RejectedAt") - .HasColumnType("datetime2"); - - b.Property("RejectedByDevice") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("Status") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("IdentityAddress"); - - b.ToTable("IdentityDeletionProcesses", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => - { - b.Property("Id") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("DeviceIdHash") - .HasColumnType("varbinary(max)"); - - b.Property("IdentityAddressHash") - .IsRequired() - .HasColumnType("varbinary(max)"); - - b.Property("IdentityDeletionProcessId") - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("Message") - .IsRequired() - .HasColumnType("nvarchar(max)"); - - b.Property("NewStatus") - .HasColumnType("int"); - - b.Property("OldStatus") - .HasColumnType("int"); - - b.HasKey("Id"); - - b.HasIndex("IdentityDeletionProcessId"); - - b.ToTable("IdentityDeletionProcessAuditLog", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(450)"); - - b.Property("ApplicationType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("ClientId") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("ClientSecret") - .HasColumnType("nvarchar(max)"); - - b.Property("ClientType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("ConsentType") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("CreatedAt") - .HasColumnType("datetime2"); - - b.Property("DefaultTier") - .IsRequired() - .HasMaxLength(20) - .IsUnicode(false) - .HasColumnType("char(20)") - .IsFixedLength(); - - b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayNames") - .HasColumnType("nvarchar(max)"); - - b.Property("JsonWebKeySet") - .HasColumnType("nvarchar(max)"); - - b.Property("MaxIdentities") - .HasColumnType("int"); - - b.Property("Permissions") - .HasColumnType("nvarchar(max)"); - - b.Property("PostLogoutRedirectUris") - .HasColumnType("nvarchar(max)"); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.Property("RedirectUris") - .HasColumnType("nvarchar(max)"); - - b.Property("Requirements") - .HasColumnType("nvarchar(max)"); - - b.Property("Settings") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("ClientId") - .IsUnique() - .HasFilter("[ClientId] IS NOT NULL"); - - b.HasIndex("DefaultTier"); - - b.ToTable("OpenIddictApplications", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(450)"); - - b.Property("ApplicationId") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.Property("Scopes") - .HasColumnType("nvarchar(max)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictAuthorizations", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreScope", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Description") - .HasColumnType("nvarchar(max)"); - - b.Property("Descriptions") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("DisplayNames") - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(200) - .HasColumnType("nvarchar(200)"); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.Property("Resources") - .HasColumnType("nvarchar(max)"); - - b.HasKey("Id"); - - b.HasIndex("Name") - .IsUnique() - .HasFilter("[Name] IS NOT NULL"); - - b.ToTable("OpenIddictScopes", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(450)"); - - b.Property("ApplicationId") - .HasColumnType("nvarchar(450)"); - - b.Property("AuthorizationId") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyToken") - .IsConcurrencyToken() - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("CreationDate") - .HasColumnType("datetime2"); - - b.Property("ExpirationDate") - .HasColumnType("datetime2"); - - b.Property("Payload") - .HasColumnType("nvarchar(max)"); - - b.Property("Properties") - .HasColumnType("nvarchar(max)"); - - b.Property("RedemptionDate") - .HasColumnType("datetime2"); - - b.Property("ReferenceId") - .HasMaxLength(100) - .HasColumnType("nvarchar(100)"); - - b.Property("Status") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.Property("Subject") - .HasMaxLength(400) - .HasColumnType("nvarchar(400)"); - - b.Property("Type") - .HasMaxLength(50) - .HasColumnType("nvarchar(50)"); - - b.HasKey("Id"); - - b.HasIndex("AuthorizationId"); - - b.HasIndex("ReferenceId") - .IsUnique() - .HasFilter("[ReferenceId] IS NOT NULL"); - - b.HasIndex("ApplicationId", "Status", "Subject", "Type"); - - b.ToTable("OpenIddictTokens", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => - { - b.Property("Id") - .HasColumnType("nvarchar(450)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("nvarchar(max)"); - - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex") - .HasFilter("[NormalizedName] IS NOT NULL"); - - b.ToTable("AspNetRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("RoleId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); - - SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); - - b.Property("ClaimType") - .HasColumnType("nvarchar(max)"); - - b.Property("ClaimValue") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderKey") - .HasColumnType("nvarchar(450)"); - - b.Property("ProviderDisplayName") - .HasColumnType("nvarchar(max)"); - - b.Property("UserId") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("RoleId") - .HasColumnType("nvarchar(450)"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetUserRoles", (string)null); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("nvarchar(450)"); - - b.Property("LoginProvider") - .HasColumnType("nvarchar(450)"); - - b.Property("Name") - .HasColumnType("nvarchar(450)"); - - b.Property("Value") - .HasColumnType("nvarchar(max)"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens", (string)null); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Device", "Device") - .WithOne("User") - .HasForeignKey("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", "DeviceId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Device"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", "Identity") - .WithMany("Devices") - .HasForeignKey("IdentityAddress") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Identity"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", null) - .WithMany("DeletionProcesses") - .HasForeignKey("IdentityAddress"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", null) - .WithMany("AuditLog") - .HasForeignKey("IdentityDeletionProcessId"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", null) - .WithMany() - .HasForeignKey("DefaultTier") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => - { - b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") - .WithMany("Authorizations") - .HasForeignKey("ApplicationId"); - - b.Navigation("Application"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => - { - b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") - .WithMany("Tokens") - .HasForeignKey("ApplicationId"); - - b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", "Authorization") - .WithMany("Tokens") - .HasForeignKey("AuthorizationId"); - - b.Navigation("Application"); - - b.Navigation("Authorization"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => - { - b.Navigation("User") - .IsRequired(); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => - { - b.Navigation("DeletionProcesses"); - - b.Navigation("Devices"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => - { - b.Navigation("AuditLog"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => - { - b.Navigation("Authorizations"); - - b.Navigation("Tokens"); - }); - - modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => - { - b.Navigation("Tokens"); - }); -#pragma warning restore 612, 618 - } - } -} + .HasColumnType("nvarchar(max)"); + + b.Property("DevicePushIdentifier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Environment") + .HasColumnType("int"); + + b.Property("Handle") + .IsRequired() + .HasMaxLength(200) + .IsUnicode(true) + .HasColumnType("nvarchar(200)") + .IsFixedLength(false); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("UpdatedAt") + .HasColumnType("datetime2"); + + b.HasKey("DeviceId"); + + b.ToTable("PnsRegistrations"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CanBeManuallyAssigned") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("CanBeUsedAsDefaultForClient") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(true); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(true) + .HasColumnType("nvarchar(30)") + .IsFixedLength(false); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Tiers"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Challenge", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Challenges", "Challenges", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("LastLoginAt") + .HasColumnType("datetime2"); + + b.Property("LockoutEnabled") + .HasColumnType("bit"); + + b.Property("LockoutEnd") + .HasColumnType("datetimeoffset"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("nvarchar(max)"); + + b.Property("SecurityStamp") + .HasColumnType("nvarchar(max)"); + + b.Property("UserName") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("DeviceId") + .IsUnique(); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("datetime2"); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("IdentityAddress") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Property("Address") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("ClientId") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DeletionGracePeriodEndsAt") + .HasColumnType("datetime2"); + + b.Property("IdentityVersion") + .HasColumnType("tinyint"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TierId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("TierIdBeforeDeletion") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Address"); + + b.HasIndex("ClientId"); + + b.HasIndex("TierId"); + + b.ToTable("Identities"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ApprovalReminder1SentAt") + .HasColumnType("datetime2"); + + b.Property("ApprovalReminder2SentAt") + .HasColumnType("datetime2"); + + b.Property("ApprovalReminder3SentAt") + .HasColumnType("datetime2"); + + b.Property("ApprovedAt") + .HasColumnType("datetime2"); + + b.Property("ApprovedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CancelledAt") + .HasColumnType("datetime2"); + + b.Property("CancelledByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodEndsAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodReminder1SentAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodReminder2SentAt") + .HasColumnType("datetime2"); + + b.Property("GracePeriodReminder3SentAt") + .HasColumnType("datetime2"); + + b.Property("IdentityAddress") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("RejectedAt") + .HasColumnType("datetime2"); + + b.Property("RejectedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("IdentityAddress"); + + b.ToTable("IdentityDeletionProcesses", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DeviceIdHash") + .HasColumnType("varbinary(max)"); + + b.Property("IdentityAddressHash") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("IdentityDeletionProcessId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Message") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("NewStatus") + .HasColumnType("int"); + + b.Property("OldStatus") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("IdentityDeletionProcessId"); + + b.ToTable("IdentityDeletionProcessAuditLog", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ClientId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("ClientType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ConsentType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("DefaultTier") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("JsonWebKeySet") + .HasColumnType("nvarchar(max)"); + + b.Property("MaxIdentities") + .HasColumnType("int"); + + b.Property("Permissions") + .HasColumnType("nvarchar(max)"); + + b.Property("PostLogoutRedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedirectUris") + .HasColumnType("nvarchar(max)"); + + b.Property("Requirements") + .HasColumnType("nvarchar(max)"); + + b.Property("Settings") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("ClientId") + .IsUnique() + .HasFilter("[ClientId] IS NOT NULL"); + + b.HasIndex("DefaultTier"); + + b.ToTable("OpenIddictApplications", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationId") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Scopes") + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictAuthorizations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreScope", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Descriptions") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("DisplayNames") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("Resources") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("Name") + .IsUnique() + .HasFilter("[Name] IS NOT NULL"); + + b.ToTable("OpenIddictScopes", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("nvarchar(450)"); + + b.Property("ApplicationId") + .HasColumnType("nvarchar(450)"); + + b.Property("AuthorizationId") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyToken") + .IsConcurrencyToken() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("ExpirationDate") + .HasColumnType("datetime2"); + + b.Property("Payload") + .HasColumnType("nvarchar(max)"); + + b.Property("Properties") + .HasColumnType("nvarchar(max)"); + + b.Property("RedemptionDate") + .HasColumnType("datetime2"); + + b.Property("ReferenceId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Status") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Subject") + .HasMaxLength(400) + .HasColumnType("nvarchar(400)"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorizationId"); + + b.HasIndex("ReferenceId") + .IsUnique() + .HasFilter("[ReferenceId] IS NOT NULL"); + + b.HasIndex("ApplicationId", "Status", "Subject", "Type"); + + b.ToTable("OpenIddictTokens", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("nvarchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); + + b.ToTable("AspNetRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("RoleId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ClaimType") + .HasColumnType("nvarchar(max)"); + + b.Property("ClaimValue") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderKey") + .HasColumnType("nvarchar(450)"); + + b.Property("ProviderDisplayName") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("RoleId") + .HasColumnType("nvarchar(450)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles", (string)null); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("nvarchar(450)"); + + b.Property("LoginProvider") + .HasColumnType("nvarchar(450)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Value") + .HasColumnType("nvarchar(max)"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Device", "Device") + .WithOne("User") + .HasForeignKey("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", "DeviceId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Device"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", "Identity") + .WithMany("Devices") + .HasForeignKey("IdentityAddress") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Identity"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", null) + .WithMany("DeletionProcesses") + .HasForeignKey("IdentityAddress"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcessAuditLogEntry", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", null) + .WithMany("AuditLog") + .HasForeignKey("IdentityDeletionProcessId"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Aggregates.Tier.Tier", null) + .WithMany() + .HasForeignKey("DefaultTier") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Authorizations") + .HasForeignKey("ApplicationId"); + + b.Navigation("Application"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreToken", b => + { + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", "Application") + .WithMany("Tokens") + .HasForeignKey("ApplicationId"); + + b.HasOne("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", "Authorization") + .WithMany("Tokens") + .HasForeignKey("AuthorizationId"); + + b.Navigation("Application"); + + b.Navigation("Authorization"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Backbone.Modules.Devices.Domain.Entities.Identities.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Device", b => + { + b.Navigation("User") + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.Identity", b => + { + b.Navigation("DeletionProcesses"); + + b.Navigation("Devices"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Domain.Entities.Identities.IdentityDeletionProcess", b => + { + b.Navigation("AuditLog"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreApplication", b => + { + b.Navigation("Authorizations"); + + b.Navigation("Tokens"); + }); + + modelBuilder.Entity("Backbone.Modules.Devices.Infrastructure.OpenIddict.CustomOpenIddictEntityFrameworkCoreAuthorization", b => + { + b.Navigation("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Devices/src/Devices.Infrastructure/Persistence/Database/EntityConfigurations/IdentityEntityTypeConfiguration.cs b/Modules/Devices/src/Devices.Infrastructure/Persistence/Database/EntityConfigurations/IdentityEntityTypeConfiguration.cs index 474b4d48e9..e193875505 100644 --- a/Modules/Devices/src/Devices.Infrastructure/Persistence/Database/EntityConfigurations/IdentityEntityTypeConfiguration.cs +++ b/Modules/Devices/src/Devices.Infrastructure/Persistence/Database/EntityConfigurations/IdentityEntityTypeConfiguration.cs @@ -9,8 +9,12 @@ public class IdentityEntityTypeConfiguration : IEntityTypeConfiguration builder) { builder.HasKey(x => x.Address); + builder.Property(x => x.ClientId).HasMaxLength(200); builder.Property(x => x.CreatedAt); builder.Property(x => x.PublicKey); + + builder.HasIndex(x => x.ClientId); + builder.HasIndex(x => x.TierId); } } diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.Designer.cs b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.Designer.cs new file mode 100644 index 0000000000..32b9e602dd --- /dev/null +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.Designer.cs @@ -0,0 +1,355 @@ +// +using System; +using Backbone.Modules.Quotas.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Quotas.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(QuotasDbContext))] + [Migration("20240321141543_AddMetricStatusIndex")] + partial class AddMetricStatusIndex + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.FileMetadata.FileMetadata", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("CipherSize") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("FileMetadata", "Files", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", b => + { + b.Property("Address") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("TierId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Address"); + + b.HasIndex("TierId"); + + b.ToTable("Identities"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.IndividualQuota", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ApplyTo") + .IsRequired() + .HasColumnType("character(36)"); + + b.Property("Max") + .HasColumnType("integer"); + + b.Property("MetricKey") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("character varying(50)") + .IsFixedLength(false); + + b.Property("Period") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("ApplyTo"); + + b.ToTable("IndividualQuotas", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.MetricStatus", b => + { + b.Property("Owner") + .HasColumnType("character(36)"); + + b.Property("MetricKey") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("character varying(50)") + .IsFixedLength(false); + + b.Property("IsExhaustedUntil") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Owner", "MetricKey"); + + b.HasIndex("MetricKey") + .HasAnnotation("SqlServer:Include", new[] { "IsExhaustedUntil" }); + + NpgsqlIndexBuilderExtensions.IncludeProperties(b.HasIndex("MetricKey"), new[] { "IsExhaustedUntil" }); + + b.ToTable("MetricStatuses", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.TierQuota", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ApplyTo") + .IsRequired() + .HasColumnType("character(36)"); + + b.Property("_definitionId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .HasColumnName("DefinitionId") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ApplyTo"); + + b.HasIndex("_definitionId"); + + b.ToTable("TierQuotas", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Messages.Message", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Messages", "Messages", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Relationships.Relationship", b => + { + b.Property("Id") + .HasColumnType("text"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("From") + .IsRequired() + .HasColumnType("text"); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("To") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Relationships", "Relationships", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Relationships.RelationshipTemplate", b => + { + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.ToTable("RelationshipTemplates", "Relationships", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(true) + .HasColumnType("character varying(30)") + .IsFixedLength(false); + + b.HasKey("Id"); + + b.ToTable("Tiers"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.TierQuotaDefinition", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Max") + .HasColumnType("integer"); + + b.Property("MetricKey") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("character varying(50)") + .IsFixedLength(false); + + b.Property("Period") + .HasColumnType("integer"); + + b.Property("TierId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("TierId"); + + b.ToTable("TierQuotaDefinitions", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tokens.Token", b => + { + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("text"); + + b.ToTable("Tokens", "Tokens", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", null) + .WithMany() + .HasForeignKey("TierId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.IndividualQuota", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", null) + .WithMany("IndividualQuotas") + .HasForeignKey("ApplyTo") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.MetricStatus", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", null) + .WithMany("MetricStatuses") + .HasForeignKey("Owner") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.TierQuota", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", null) + .WithMany("TierQuotas") + .HasForeignKey("ApplyTo") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.TierQuotaDefinition", "_definition") + .WithMany() + .HasForeignKey("_definitionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("_definition"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.TierQuotaDefinition", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", null) + .WithMany("Quotas") + .HasForeignKey("TierId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", b => + { + b.Navigation("IndividualQuotas"); + + b.Navigation("MetricStatuses"); + + b.Navigation("TierQuotas"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", b => + { + b.Navigation("Quotas"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.cs b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.cs new file mode 100644 index 0000000000..94f96fef63 --- /dev/null +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/20240321141543_AddMetricStatusIndex.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Quotas.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class AddMetricStatusIndex : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_MetricStatuses_MetricKey", + table: "MetricStatuses", + column: "MetricKey") + .Annotation("Npgsql:IndexInclude", new[] { "IsExhaustedUntil" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_MetricStatuses_MetricKey", + table: "MetricStatuses"); + } + } +} diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/QuotasDbContextModelSnapshot.cs b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/QuotasDbContextModelSnapshot.cs index 19161bd03d..1804bd57be 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/QuotasDbContextModelSnapshot.cs +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.Postgres/Migrations/QuotasDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Quotas.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.11") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -115,6 +115,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Owner", "MetricKey"); + b.HasIndex("MetricKey") + .HasAnnotation("SqlServer:Include", new[] { "IsExhaustedUntil" }); + + NpgsqlIndexBuilderExtensions.IncludeProperties(b.HasIndex("MetricKey"), new[] { "IsExhaustedUntil" }); + b.ToTable("MetricStatuses", (string)null); }); diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.Designer.cs b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.Designer.cs new file mode 100644 index 0000000000..cd0f603e16 --- /dev/null +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.Designer.cs @@ -0,0 +1,355 @@ +// +using System; +using Backbone.Modules.Quotas.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Quotas.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(QuotasDbContext))] + [Migration("20240321141522_AddMetricStatusIndex")] + partial class AddMetricStatusIndex + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.FileMetadata.FileMetadata", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("CipherSize") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("FileMetadata", "Files", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", b => + { + b.Property("Address") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("TierId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Address"); + + b.HasIndex("TierId"); + + b.ToTable("Identities"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.IndividualQuota", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ApplyTo") + .IsRequired() + .HasColumnType("char(36)"); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("MetricKey") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)") + .IsFixedLength(false); + + b.Property("Period") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ApplyTo"); + + b.ToTable("IndividualQuotas", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.MetricStatus", b => + { + b.Property("Owner") + .HasColumnType("char(36)"); + + b.Property("MetricKey") + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)") + .IsFixedLength(false); + + b.Property("IsExhaustedUntil") + .HasColumnType("datetime2"); + + b.HasKey("Owner", "MetricKey"); + + b.HasIndex("MetricKey") + .HasAnnotation("Npgsql:IndexInclude", new[] { "IsExhaustedUntil" }); + + SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("MetricKey"), new[] { "IsExhaustedUntil" }); + + b.ToTable("MetricStatuses", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.TierQuota", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ApplyTo") + .IsRequired() + .HasColumnType("char(36)"); + + b.Property("_definitionId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .HasColumnName("DefinitionId") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ApplyTo"); + + b.HasIndex("_definitionId"); + + b.ToTable("TierQuotas", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Messages.Message", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Messages", "Messages", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Relationships.Relationship", b => + { + b.Property("Id") + .HasColumnType("nvarchar(450)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("From") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("To") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Relationships", "Relationships", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Relationships.RelationshipTemplate", b => + { + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.ToTable("RelationshipTemplates", "Relationships", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Name") + .IsRequired() + .HasMaxLength(30) + .IsUnicode(true) + .HasColumnType("nvarchar(30)") + .IsFixedLength(false); + + b.HasKey("Id"); + + b.ToTable("Tiers"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.TierQuotaDefinition", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Max") + .HasColumnType("int"); + + b.Property("MetricKey") + .IsRequired() + .HasMaxLength(50) + .IsUnicode(true) + .HasColumnType("nvarchar(50)") + .IsFixedLength(false); + + b.Property("Period") + .HasColumnType("int"); + + b.Property("TierId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("TierId"); + + b.ToTable("TierQuotaDefinitions", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tokens.Token", b => + { + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.ToTable("Tokens", "Tokens", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", null) + .WithMany() + .HasForeignKey("TierId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.IndividualQuota", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", null) + .WithMany("IndividualQuotas") + .HasForeignKey("ApplyTo") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.MetricStatus", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", null) + .WithMany("MetricStatuses") + .HasForeignKey("Owner") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.TierQuota", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", null) + .WithMany("TierQuotas") + .HasForeignKey("ApplyTo") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.TierQuotaDefinition", "_definition") + .WithMany() + .HasForeignKey("_definitionId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("_definition"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.TierQuotaDefinition", b => + { + b.HasOne("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", null) + .WithMany("Quotas") + .HasForeignKey("TierId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Identities.Identity", b => + { + b.Navigation("IndividualQuotas"); + + b.Navigation("MetricStatuses"); + + b.Navigation("TierQuotas"); + }); + + modelBuilder.Entity("Backbone.Modules.Quotas.Domain.Aggregates.Tiers.Tier", b => + { + b.Navigation("Quotas"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.cs b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.cs new file mode 100644 index 0000000000..15b5fe11e9 --- /dev/null +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/20240321141522_AddMetricStatusIndex.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Quotas.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class AddMetricStatusIndex : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_MetricStatuses_MetricKey", + table: "MetricStatuses", + column: "MetricKey") + .Annotation("SqlServer:Include", new[] { "IsExhaustedUntil" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_MetricStatuses_MetricKey", + table: "MetricStatuses"); + } + } +} diff --git a/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/QuotasDbContextModelSnapshot.cs b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/QuotasDbContextModelSnapshot.cs index 80bb3879cd..9a9c73f457 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/QuotasDbContextModelSnapshot.cs +++ b/Modules/Quotas/src/Quotas.Infrastructure.Database.SqlServer/Migrations/QuotasDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Quotas.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.11") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -115,6 +115,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Owner", "MetricKey"); + b.HasIndex("MetricKey") + .HasAnnotation("Npgsql:IndexInclude", new[] { "IsExhaustedUntil" }); + + SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("MetricKey"), new[] { "IsExhaustedUntil" }); + b.ToTable("MetricStatuses", (string)null); }); diff --git a/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/MetricStatusEntityTypeConfiguration.cs b/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/MetricStatusEntityTypeConfiguration.cs index 266d90bccb..ecf2e48332 100644 --- a/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/MetricStatusEntityTypeConfiguration.cs +++ b/Modules/Quotas/src/Quotas.Infrastructure/Persistence/Database/EntityConfigurations/MetricStatusEntityTypeConfiguration.cs @@ -3,12 +3,18 @@ using Microsoft.EntityFrameworkCore.Metadata.Builders; namespace Backbone.Modules.Quotas.Infrastructure.Persistence.Database.EntityConfigurations; + public class MetricStatusEntityTypeConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable("MetricStatuses"); builder.HasKey(x => new { x.Owner, x.MetricKey }); + + var indexBuilder = builder.HasIndex(x => x.MetricKey); + NpgsqlIndexBuilderExtensions.IncludeProperties(indexBuilder, x => x.IsExhaustedUntil); + SqlServerIndexBuilderExtensions.IncludeProperties(indexBuilder, x => x.IsExhaustedUntil); + builder.HasOne().WithMany(x => x.MetricStatuses).HasForeignKey(x => x.Owner); } } diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.Designer.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.Designer.cs new file mode 100644 index 0000000000..b6b87026e0 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.Designer.cs @@ -0,0 +1,385 @@ +// +using System; +using Backbone.Modules.Relationships.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(RelationshipsDbContext))] + [Migration("20240321141259_AddRelationshipChangeIndex")] + partial class AddRelationshipChangeIndex + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("From") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("To") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("From"); + + b.HasIndex("RelationshipTemplateId"); + + b.HasIndex("Status"); + + b.HasIndex("To"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("character varying(20)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Discriminator") + .IsRequired() + .HasMaxLength(34) + .HasColumnType("character varying(34)"); + + b.Property("RelationshipId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("Status"); + + b.HasIndex("Type"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("RelationshipChange"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("character varying(20)"); + + b.Property("Content") + .HasColumnType("bytea") + .HasColumnName("Req_Content"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("Req_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .HasColumnName("Req_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .HasColumnName("Req_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("CreatedBy"); + + b.HasIndex("CreatedByDevice"); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("character varying(20)"); + + b.Property("Content") + .HasColumnType("bytea") + .HasColumnName("Res_Content"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("Res_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .HasColumnName("Res_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .HasColumnName("Res_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("CreatedBy"); + + b.HasIndex("CreatedByDevice"); + + b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") + .HasAnnotation("SqlServer:Include", new[] { "Content" }); + + NpgsqlIndexBuilderExtensions.IncludeProperties(b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice"), new[] { "Content" }); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Content") + .HasColumnType("bytea"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.Property("MaxNumberOfAllocations") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.HasIndex("DeletedAt"); + + b.HasIndex("ExpiresAt"); + + b.ToTable("RelationshipTemplates"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AllocatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("AllocatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("AllocatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("RelationshipTemplateId", "AllocatedBy"); + + b.ToTable("RelationshipTemplateAllocations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipCreationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipCreationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTerminationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipTerminationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", "RelationshipTemplate") + .WithMany("Relationships") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("RelationshipTemplate"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.Relationship", "Relationship") + .WithMany("Changes") + .HasForeignKey("RelationshipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Relationship"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Request") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Response") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", null) + .WithMany("Allocations") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Navigation("Changes"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Navigation("Request") + .IsRequired(); + + b.Navigation("Response"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Navigation("Allocations"); + + b.Navigation("Relationships"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.cs new file mode 100644 index 0000000000..ce7c496d29 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240321141259_AddRelationshipChangeIndex.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class AddRelationshipChangeIndex : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedAt_Res_CreatedBy_Res_Created~", + table: "RelationshipChanges", + columns: new[] { "Res_CreatedAt", "Res_CreatedBy", "Res_CreatedByDevice" }) + .Annotation("Npgsql:IndexInclude", new[] { "Res_Content" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedAt_Res_CreatedBy_Res_Created~", + table: "RelationshipChanges"); + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs index 426dd89a7a..226f59f363 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs @@ -195,6 +195,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedByDevice"); + b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") + .HasAnnotation("SqlServer:Include", new[] { "Content" }); + + NpgsqlIndexBuilderExtensions.IncludeProperties(b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice"), new[] { "Content" }); + b.ToTable("RelationshipChanges", (string)null); }); diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.Designer.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.Designer.cs new file mode 100644 index 0000000000..79f0438cfc --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.Designer.cs @@ -0,0 +1,385 @@ +// +using System; +using Backbone.Modules.Relationships.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(RelationshipsDbContext))] + [Migration("20240321141151_AddRelationshipChangeIndex")] + partial class AddRelationshipChangeIndex + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("From") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("To") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("From"); + + b.HasIndex("RelationshipTemplateId"); + + b.HasIndex("Status"); + + b.HasIndex("To"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Discriminator") + .IsRequired() + .HasMaxLength(34) + .HasColumnType("nvarchar(34)"); + + b.Property("RelationshipId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("Status"); + + b.HasIndex("Type"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("RelationshipChange"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Content") + .HasColumnType("varbinary(max)") + .HasColumnName("Req_Content"); + + b.Property("CreatedAt") + .HasColumnType("datetime2") + .HasColumnName("Req_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .HasColumnName("Req_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .HasColumnName("Req_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("CreatedBy"); + + b.HasIndex("CreatedByDevice"); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Content") + .HasColumnType("varbinary(max)") + .HasColumnName("Res_Content"); + + b.Property("CreatedAt") + .HasColumnType("datetime2") + .HasColumnName("Res_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .HasColumnName("Res_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .HasColumnName("Res_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("CreatedBy"); + + b.HasIndex("CreatedByDevice"); + + b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") + .HasAnnotation("Npgsql:IndexInclude", new[] { "Content" }); + + SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice"), new[] { "Content" }); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Content") + .HasColumnType("varbinary(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("MaxNumberOfAllocations") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.HasIndex("DeletedAt"); + + b.HasIndex("ExpiresAt"); + + b.ToTable("RelationshipTemplates"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AllocatedAt") + .HasColumnType("datetime2"); + + b.Property("AllocatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("AllocatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("RelationshipTemplateId", "AllocatedBy"); + + b.ToTable("RelationshipTemplateAllocations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipCreationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipCreationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTerminationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipTerminationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", "RelationshipTemplate") + .WithMany("Relationships") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("RelationshipTemplate"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.Relationship", "Relationship") + .WithMany("Changes") + .HasForeignKey("RelationshipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Relationship"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Request") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Response") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", null) + .WithMany("Allocations") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Navigation("Changes"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Navigation("Request") + .IsRequired(); + + b.Navigation("Response"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Navigation("Allocations"); + + b.Navigation("Relationships"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.cs new file mode 100644 index 0000000000..6dc8cc0203 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240321141151_AddRelationshipChangeIndex.cs @@ -0,0 +1,28 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class AddRelationshipChangeIndex : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedAt_Res_CreatedBy_Res_CreatedByDevice", + table: "RelationshipChanges", + columns: new[] { "Res_CreatedAt", "Res_CreatedBy", "Res_CreatedByDevice" }) + .Annotation("SqlServer:Include", new[] { "Res_Content" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedAt_Res_CreatedBy_Res_CreatedByDevice", + table: "RelationshipChanges"); + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index fe7155acc9..d3b17c2345 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -195,6 +195,11 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("CreatedByDevice"); + b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") + .HasAnnotation("Npgsql:IndexInclude", new[] { "Content" }); + + SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice"), new[] { "Content" }); + b.ToTable("RelationshipChanges", (string)null); }); diff --git a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs index 1d7ffd9c03..472f2363cc 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs @@ -14,6 +14,10 @@ public void Configure(EntityTypeBuilder builder) builder.HasIndex(x => x.CreatedBy); builder.HasIndex(x => x.CreatedByDevice); + var indexBuilder = builder.HasIndex(x => new { x.CreatedAt, x.CreatedBy, x.CreatedByDevice }); + NpgsqlIndexBuilderExtensions.IncludeProperties(indexBuilder, x => x.Content!); + SqlServerIndexBuilderExtensions.IncludeProperties(indexBuilder, x => x.Content); + builder.Property(x => x.CreatedBy) .HasColumnName("Res_CreatedBy"); From 5acb86dc64920314c661e348b9191d50241cfeb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 07:41:26 +0200 Subject: [PATCH 2/7] Update GitHub actions (#583) Bumps the update-github-actions-dependencies group with 1 update: [subosito/flutter-action](https://github.com/subosito/flutter-action). Updates `subosito/flutter-action` from 2.14.0 to 2.15.0 - [Release notes](https://github.com/subosito/flutter-action/releases) - [Commits](https://github.com/subosito/flutter-action/compare/v2.14.0...v2.15.0) --- updated-dependencies: - dependency-name: subosito/flutter-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: update-github-actions-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 036bb75dc0..44cdaef4ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Flutter - uses: subosito/flutter-action@v2.14.0 + uses: subosito/flutter-action@v2.15.0 - name: Run checks run: ./.ci/aui/runFlutterChecks.sh From 58052c8e3fcb423281a2a34ebb0952f1f7252a99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:26:23 +0200 Subject: [PATCH 3/7] Admin UI: Update npm packages (#582) Bumps the update-npm-dependencies group in /AdminApi/src/AdminApi/ClientApp with 13 updates: | Package | From | To | | --- | --- | --- | | [@angular/animations](https://github.com/angular/angular/tree/HEAD/packages/animations) | `17.3.1` | `17.3.2` | | [@angular/cdk](https://github.com/angular/components) | `17.3.1` | `17.3.2` | | [@angular/common](https://github.com/angular/angular/tree/HEAD/packages/common) | `17.3.1` | `17.3.2` | | [@angular/compiler](https://github.com/angular/angular/tree/HEAD/packages/compiler) | `17.3.1` | `17.3.2` | | [@angular/core](https://github.com/angular/angular/tree/HEAD/packages/core) | `17.3.1` | `17.3.2` | | [@angular/forms](https://github.com/angular/angular/tree/HEAD/packages/forms) | `17.3.1` | `17.3.2` | | [@angular/material](https://github.com/angular/components) | `17.3.1` | `17.3.2` | | [@angular/platform-browser](https://github.com/angular/angular/tree/HEAD/packages/platform-browser) | `17.3.1` | `17.3.2` | | [@angular/platform-browser-dynamic](https://github.com/angular/angular/tree/HEAD/packages/platform-browser-dynamic) | `17.3.1` | `17.3.2` | | [@angular/platform-server](https://github.com/angular/angular/tree/HEAD/packages/platform-server) | `17.3.1` | `17.3.2` | | [@angular/router](https://github.com/angular/angular/tree/HEAD/packages/router) | `17.3.1` | `17.3.2` | | [@angular/compiler-cli](https://github.com/angular/angular/tree/HEAD/packages/compiler-cli) | `17.3.1` | `17.3.2` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.11.30` | `20.12.2` | Updates `@angular/animations` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/animations) Updates `@angular/cdk` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/components/releases) - [Changelog](https://github.com/angular/components/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/components/compare/17.3.1...17.3.2) Updates `@angular/common` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/common) Updates `@angular/compiler` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/compiler) Updates `@angular/core` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/core) Updates `@angular/forms` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/forms) Updates `@angular/material` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/components/releases) - [Changelog](https://github.com/angular/components/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/components/compare/17.3.1...17.3.2) Updates `@angular/platform-browser` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/platform-browser) Updates `@angular/platform-browser-dynamic` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/platform-browser-dynamic) Updates `@angular/platform-server` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/platform-server) Updates `@angular/router` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/router) Updates `@angular/compiler-cli` from 17.3.1 to 17.3.2 - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/17.3.2/packages/compiler-cli) Updates `@types/node` from 20.11.30 to 20.12.2 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@angular/animations" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/cdk" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/common" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/compiler" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/core" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/forms" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/material" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/platform-browser" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/platform-browser-dynamic" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/platform-server" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/router" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@angular/compiler-cli" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: update-npm-dependencies - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: update-npm-dependencies ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Timo Notheisen <65653426+tnotheis@users.noreply.github.com> --- .../src/AdminApi/ClientApp/package-lock.json | 150 +++++++++--------- AdminApi/src/AdminApi/ClientApp/package.json | 26 +-- 2 files changed, 88 insertions(+), 88 deletions(-) diff --git a/AdminApi/src/AdminApi/ClientApp/package-lock.json b/AdminApi/src/AdminApi/ClientApp/package-lock.json index 2987398ef1..1514166eca 100644 --- a/AdminApi/src/AdminApi/ClientApp/package-lock.json +++ b/AdminApi/src/AdminApi/ClientApp/package-lock.json @@ -9,17 +9,17 @@ "version": "0.0.0", "license": "MIT", "dependencies": { - "@angular/animations": "^17.3.1", - "@angular/cdk": "^17.3.1", - "@angular/common": "^17.3.1", - "@angular/compiler": "^17.3.1", - "@angular/core": "^17.3.1", - "@angular/forms": "^17.3.1", - "@angular/material": "^17.3.1", - "@angular/platform-browser": "^17.3.1", - "@angular/platform-browser-dynamic": "^17.3.1", - "@angular/platform-server": "^17.3.1", - "@angular/router": "^17.3.1", + "@angular/animations": "^17.3.2", + "@angular/cdk": "^17.3.2", + "@angular/common": "^17.3.2", + "@angular/compiler": "^17.3.2", + "@angular/core": "^17.3.2", + "@angular/forms": "^17.3.2", + "@angular/material": "^17.3.2", + "@angular/platform-browser": "^17.3.2", + "@angular/platform-browser-dynamic": "^17.3.2", + "@angular/platform-server": "^17.3.2", + "@angular/router": "^17.3.2", "@ngx-env/builder": "^17.2.3", "bootstrap": "^5.3.3", "jquery": "^3.7.1", @@ -36,12 +36,12 @@ "devDependencies": { "@angular-devkit/build-angular": "^17.3.2", "@angular/cli": "^17.3.2", - "@angular/compiler-cli": "^17.3.1", + "@angular/compiler-cli": "^17.3.2", "@js-soft/eslint-config-ts": "^1.6.7", "@js-soft/license-check": "^1.0.9", "@types/jasmine": "~5.1.4", "@types/jasminewd2": "~2.0.13", - "@types/node": "^20.11.30", + "@types/node": "^20.12.2", "eslint": "^8.57.0", "jasmine-core": "~5.1.2", "karma": "~6.4.3", @@ -284,9 +284,9 @@ } }, "node_modules/@angular/animations": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.1.tgz", - "integrity": "sha512-2TZ0M5J0IizhHpb404DeqArlv8Ki9BFz5ZUuET2uFROpKW8IMDCht8fSrn/DKHpjB9lvzPUhNFaRxNWEY6klnA==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-17.3.2.tgz", + "integrity": "sha512-9RplCRS3dS7I8UeMmnwVCAxEaixQCj98UkSqjErO+GX5KJwMsFPydh7HKWH0/yclidJe5my41psEiQkyEyGKww==", "dependencies": { "tslib": "^2.3.0" }, @@ -294,13 +294,13 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.3.1" + "@angular/core": "17.3.2" } }, "node_modules/@angular/cdk": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.1.tgz", - "integrity": "sha512-pHSN+KlCmdo2u9jY7Yxsry/ZK+EcjOYGzdwxXxcKragMzm7etY3BJiTl4N+qZRuV6cJlMj2PRkij8ABi/HQdEA==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-17.3.2.tgz", + "integrity": "sha512-mC2U7aoIf7RSpGgIwVyfQEbaPDDX59plQt88KeTz15wjF8vosLt2DG0rZEoV8Mq14YS47J+jI76q/LJfd6/GCw==", "dependencies": { "tslib": "^2.3.0" }, @@ -348,9 +348,9 @@ } }, "node_modules/@angular/common": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.1.tgz", - "integrity": "sha512-HyUTJ4RxhE3bOmFRV6Fv2y01ixbrUb8Hd4MxPm8REbNMGKsWCfXhR3FfxFL18Sc03SAF+o0Md0wwekjFKTNKfQ==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-17.3.2.tgz", + "integrity": "sha512-7fo+hrQEzo+VX0fJAKK+P4YNeiEnpdMOAkyIdwweyAeUZYeFIs6TKtax3CiJAubnkIkhQ/52uxiusDhK3Wg/WQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -358,14 +358,14 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.3.1", + "@angular/core": "17.3.2", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.1.tgz", - "integrity": "sha512-8qqlWPGZEyD2FY5losOW3Aocro+lFysPDzsf0LHgQUM6Ub1b+pq4jUOjH6w0vzaxG3TfxkgzOQ9aNdWtSV67Rg==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-17.3.2.tgz", + "integrity": "sha512-+/l/FQpVsOPbxZzSKyqEra+yxoI/r8LlTRqshVACv10+DKMWJMHnDkVUrNxvWHutfn4RszpGMtbtHp3yM9rxcA==", "dependencies": { "tslib": "^2.3.0" }, @@ -373,7 +373,7 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/core": "17.3.1" + "@angular/core": "17.3.2" }, "peerDependenciesMeta": { "@angular/core": { @@ -382,9 +382,9 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.1.tgz", - "integrity": "sha512-xLV9KU+zOpe57/2rQ59ku21EaStNpLSlR9+qkDYf8JR09fB+W9vY3UYbpi5RjHxAFIZBM5D9SFQjjll8rch26g==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-17.3.2.tgz", + "integrity": "sha512-PG81BrJjeF679tkafjt+t9VEBE1rPq39cdLoBTnPY7Q+E/thVoem5JTRG6hmnLmwEc0xxY6sfYpvx2BB5ywUSA==", "dev": true, "dependencies": { "@babel/core": "7.23.9", @@ -405,7 +405,7 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/compiler": "17.3.1", + "@angular/compiler": "17.3.2", "typescript": ">=5.2 <5.5" } }, @@ -455,9 +455,9 @@ } }, "node_modules/@angular/core": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.1.tgz", - "integrity": "sha512-Qf3/sgkXS1LHwOTtqAVYprySrn0YpPIZqerPc0tK+hyQfwAz5BQlpcBhbH8RWKlfCY8eO0cqo/j0+e8DQOgYfg==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-17.3.2.tgz", + "integrity": "sha512-eylatBGaN8uihKomEcXkaSHmAea5bEqu1OXifEoVOJiJpJA9Dbt/VcLXkIRFnRGH2NWUT5W79vSoU9GRvPMk5w==", "dependencies": { "tslib": "^2.3.0" }, @@ -470,9 +470,9 @@ } }, "node_modules/@angular/forms": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.1.tgz", - "integrity": "sha512-HndsO90k67sFHzd+sII+rhAUksffBvquFuAUCc6QR9WVjILxVg2fY7oBidgS1gKNqu0mptPG0GvuORnaW/0gSg==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-17.3.2.tgz", + "integrity": "sha512-sbHYjAEeEWW+02YDEKuuuTEUukm6AayQuHiAu37vACj/2q/2RWQar49IoRcSJfAwP2ckqRSK4mmLoDX4IG/KSg==", "dependencies": { "tslib": "^2.3.0" }, @@ -480,16 +480,16 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.3.1", - "@angular/core": "17.3.1", - "@angular/platform-browser": "17.3.1", + "@angular/common": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/material": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-17.3.1.tgz", - "integrity": "sha512-Md1OnO0/sQvK5GkTQyE4v1DAaMswXt1TnjjY07KG7cICTrUN8lc0a2P9dMjlSFXIhxC7PTlNH6plSZ1uspbU8Q==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-17.3.2.tgz", + "integrity": "sha512-FuQnzmVZQUqPYxn2AbRNKY/7LTldhazK+PCN+Y9vbTZ6L1INJLANip1r4iXfZnhAUE+dmFAPN6GzfLLh1Dg7vA==", "dependencies": { "@material/animation": "15.0.0-canary.7f224ddd4.0", "@material/auto-init": "15.0.0-canary.7f224ddd4.0", @@ -542,7 +542,7 @@ }, "peerDependencies": { "@angular/animations": "^17.0.0 || ^18.0.0", - "@angular/cdk": "17.3.1", + "@angular/cdk": "17.3.2", "@angular/common": "^17.0.0 || ^18.0.0", "@angular/core": "^17.0.0 || ^18.0.0", "@angular/forms": "^17.0.0 || ^18.0.0", @@ -551,9 +551,9 @@ } }, "node_modules/@angular/platform-browser": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.1.tgz", - "integrity": "sha512-8ABAL8PElSGzkIparVwifsU0NSu0DdqnWYw9YvLhhZQ6lOuWbG+dTUo/DXzmWhA6ezQWJGNakEZPJJytFIIy+A==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-17.3.2.tgz", + "integrity": "sha512-rBVmpJ/uh+CTjYef3Nib1K+31GFbM4mZaw2R2PowKZLgWOT3MWXKy41i44NEyM8qY1dxESmzMzy4NuGfZol42Q==", "dependencies": { "tslib": "^2.3.0" }, @@ -561,9 +561,9 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/animations": "17.3.1", - "@angular/common": "17.3.1", - "@angular/core": "17.3.1" + "@angular/animations": "17.3.2", + "@angular/common": "17.3.2", + "@angular/core": "17.3.2" }, "peerDependenciesMeta": { "@angular/animations": { @@ -572,9 +572,9 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.3.1.tgz", - "integrity": "sha512-ACW/npNaDxUNQtEomjjv/KIBY8jHEinePff5qosnAxLE0IpA4qE9eDp36zG35xoJqrPJPYjXbZCBRqqrzM7U7Q==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-17.3.2.tgz", + "integrity": "sha512-fcGo9yQ+t9VaG9zPgjQW5HIizbYOKj+9kVk9FPru+uJbYyvJUwEDgpD3aI0DUrQy/OvSf4NMzY/Ucgw1AUknQw==", "dependencies": { "tslib": "^2.3.0" }, @@ -582,16 +582,16 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.3.1", - "@angular/compiler": "17.3.1", - "@angular/core": "17.3.1", - "@angular/platform-browser": "17.3.1" + "@angular/common": "17.3.2", + "@angular/compiler": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2" } }, "node_modules/@angular/platform-server": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-17.3.1.tgz", - "integrity": "sha512-yC1WgUquIac8qFCPMLjRio2ViR3XHexlXKlZpFhqpWAFPsWSHjoCHTEW+KTUFZmOPhUEFR2W8fWOChur8mjthw==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/platform-server/-/platform-server-17.3.2.tgz", + "integrity": "sha512-DXd1jT1GY5yaj7+IVj//cUAiLXBcCBiAEBg7TIUipLyuiWC29TzDxh2yok57pHk2cPUwkscnd4dsHe4Ig07i1Q==", "dependencies": { "tslib": "^2.3.0", "xhr2": "^0.2.0" @@ -600,17 +600,17 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/animations": "17.3.1", - "@angular/common": "17.3.1", - "@angular/compiler": "17.3.1", - "@angular/core": "17.3.1", - "@angular/platform-browser": "17.3.1" + "@angular/animations": "17.3.2", + "@angular/common": "17.3.2", + "@angular/compiler": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2" } }, "node_modules/@angular/router": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.3.1.tgz", - "integrity": "sha512-H6H7lY9i5Ppu0SFwwpeWqJbCFw8cILOj8Rd1+AGoCN5m3ivPtjD2Ltz62PI2zZkqx+WhQdk19l61Wm3oRqg70A==", + "version": "17.3.2", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-17.3.2.tgz", + "integrity": "sha512-BJiaG7zldhe8FPsg3Xv1o2xsmWNMIuntubRiSt2NlSceAr/NEgHoARpZfAGKTaFSngl6jc407wHOmBBPPALECw==", "dependencies": { "tslib": "^2.3.0" }, @@ -618,9 +618,9 @@ "node": "^18.13.0 || >=20.9.0" }, "peerDependencies": { - "@angular/common": "17.3.1", - "@angular/core": "17.3.1", - "@angular/platform-browser": "17.3.1", + "@angular/common": "17.3.2", + "@angular/core": "17.3.2", + "@angular/platform-browser": "17.3.2", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -5178,9 +5178,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", - "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", + "version": "20.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", + "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", "dependencies": { "undici-types": "~5.26.4" } diff --git a/AdminApi/src/AdminApi/ClientApp/package.json b/AdminApi/src/AdminApi/ClientApp/package.json index 291798358c..58e86caf50 100644 --- a/AdminApi/src/AdminApi/ClientApp/package.json +++ b/AdminApi/src/AdminApi/ClientApp/package.json @@ -13,17 +13,17 @@ }, "private": true, "dependencies": { - "@angular/animations": "^17.3.1", - "@angular/cdk": "^17.3.1", - "@angular/common": "^17.3.1", - "@angular/compiler": "^17.3.1", - "@angular/core": "^17.3.1", - "@angular/forms": "^17.3.1", - "@angular/material": "^17.3.1", - "@angular/platform-browser": "^17.3.1", - "@angular/platform-browser-dynamic": "^17.3.1", - "@angular/platform-server": "^17.3.1", - "@angular/router": "^17.3.1", + "@angular/animations": "^17.3.2", + "@angular/cdk": "^17.3.2", + "@angular/common": "^17.3.2", + "@angular/compiler": "^17.3.2", + "@angular/core": "^17.3.2", + "@angular/forms": "^17.3.2", + "@angular/material": "^17.3.2", + "@angular/platform-browser": "^17.3.2", + "@angular/platform-browser-dynamic": "^17.3.2", + "@angular/platform-server": "^17.3.2", + "@angular/router": "^17.3.2", "@ngx-env/builder": "^17.2.3", "bootstrap": "^5.3.3", "jquery": "^3.7.1", @@ -40,12 +40,12 @@ "devDependencies": { "@angular-devkit/build-angular": "^17.3.2", "@angular/cli": "^17.3.2", - "@angular/compiler-cli": "^17.3.1", + "@angular/compiler-cli": "^17.3.2", "@js-soft/eslint-config-ts": "^1.6.7", "@js-soft/license-check": "^1.0.9", "@types/jasmine": "~5.1.4", "@types/jasminewd2": "~2.0.13", - "@types/node": "^20.11.30", + "@types/node": "^20.12.2", "eslint": "^8.57.0", "jasmine-core": "~5.1.2", "karma": "~6.4.3", From c4b2d0c4fa6e3f831043de0c021c60b8af8cb3a2 Mon Sep 17 00:00:00 2001 From: Vladimir Vuckovic <37671301+stamenione@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:42:31 +0200 Subject: [PATCH 4/7] Admin UI: Setup enmeshed design (#581) * feat: add themes to the admin ui and add dynamic color package * feat: add provider * chore: change variable name to camel case * ci: trigger pipelines * chore: remove unnecessary libs * refactor: rename a file * chore: remove theme manager * chore: simplify themes in material app * refactor: rename main app * refactor: rename the main app --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- AdminUi/apps/admin_ui/lib/main.dart | 24 +- .../lib/theme/colors/color_schemes.dart | 69 +++++ .../lib/theme/colors/custom_colors.dart | 260 ++++++++++++++++++ 3 files changed, 346 insertions(+), 7 deletions(-) create mode 100644 AdminUi/apps/admin_ui/lib/theme/colors/color_schemes.dart create mode 100644 AdminUi/apps/admin_ui/lib/theme/colors/custom_colors.dart diff --git a/AdminUi/apps/admin_ui/lib/main.dart b/AdminUi/apps/admin_ui/lib/main.dart index 3513a20db9..403185b732 100644 --- a/AdminUi/apps/admin_ui/lib/main.dart +++ b/AdminUi/apps/admin_ui/lib/main.dart @@ -1,3 +1,5 @@ +import 'package:admin_ui/theme/colors/color_schemes.dart'; +import 'package:admin_ui/theme/colors/custom_colors.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; @@ -10,7 +12,9 @@ void main() async { await setup(); - runApp(const MainApp()); + runApp( + const AdminUiApp(), + ); } final _rootNavigatorKey = GlobalKey(); @@ -63,17 +67,23 @@ final _router = GoRouter( ], ); -class MainApp extends StatelessWidget { - const MainApp({super.key}); +class AdminUiApp extends StatelessWidget { + const AdminUiApp({super.key}); @override Widget build(BuildContext context) { - const colorSchemeSeed = Color.fromARGB(255, 23, 66, 141); return MaterialApp.router( + theme: ThemeData( + useMaterial3: true, + colorScheme: lightColorScheme, + extensions: [lightCustomColors], + ), + darkTheme: ThemeData( + useMaterial3: true, + colorScheme: darkColorScheme, + extensions: [darkCustomColors], + ), debugShowCheckedModeBanner: false, - themeMode: ThemeMode.light, - theme: ThemeData(colorSchemeSeed: colorSchemeSeed, useMaterial3: true), - darkTheme: ThemeData(brightness: Brightness.dark, colorSchemeSeed: colorSchemeSeed, useMaterial3: true), routerConfig: _router, ); } diff --git a/AdminUi/apps/admin_ui/lib/theme/colors/color_schemes.dart b/AdminUi/apps/admin_ui/lib/theme/colors/color_schemes.dart new file mode 100644 index 0000000000..da2af5a6ef --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/theme/colors/color_schemes.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; + +const lightColorScheme = ColorScheme( + brightness: Brightness.light, + primary: Color(0xFF365CA8), + onPrimary: Color(0xFFFFFFFF), + primaryContainer: Color(0xFFD9E2FF), + onPrimaryContainer: Color(0xFF001945), + secondary: Color(0xFF0060A9), + onSecondary: Color(0xFFFFFFFF), + secondaryContainer: Color(0xFFD3E4FF), + onSecondaryContainer: Color(0xFF001C38), + tertiary: Color(0xFF9B4500), + onTertiary: Color(0xFFFFFFFF), + tertiaryContainer: Color(0xFFFFDBC9), + onTertiaryContainer: Color(0xFF331200), + error: Color(0xFFBA1A1A), + errorContainer: Color(0xFFFFDAD6), + onError: Color(0xFFFFFFFF), + onErrorContainer: Color(0xFF410002), + background: Color(0xFFF8FDFF), + onBackground: Color(0xFF001F25), + surface: Color(0xFFF8FDFF), + onSurface: Color(0xFF001F25), + surfaceVariant: Color(0xFFE1E2EC), + onSurfaceVariant: Color(0xFF44464F), + outline: Color(0xFF757780), + onInverseSurface: Color(0xFFD6F6FF), + inverseSurface: Color(0xFF00363F), + inversePrimary: Color(0xFFB0C6FF), + shadow: Color(0xFF000000), + surfaceTint: Color(0xFF365CA8), + outlineVariant: Color(0xFFC5C6D0), + scrim: Color(0xFF000000), +); + +const darkColorScheme = ColorScheme( + brightness: Brightness.dark, + primary: Color(0xFFB0C6FF), + onPrimary: Color(0xFF002D6E), + primaryContainer: Color(0xFF18438F), + onPrimaryContainer: Color(0xFFD9E2FF), + secondary: Color(0xFFA2C9FF), + onSecondary: Color(0xFF00315B), + secondaryContainer: Color(0xFF004881), + onSecondaryContainer: Color(0xFFD3E4FF), + tertiary: Color(0xFFFFB68D), + onTertiary: Color(0xFF532200), + tertiaryContainer: Color(0xFF763300), + onTertiaryContainer: Color(0xFFFFDBC9), + error: Color(0xFFFFB4AB), + errorContainer: Color(0xFF93000A), + onError: Color(0xFF690005), + onErrorContainer: Color(0xFFFFDAD6), + background: Color(0xFF001F25), + onBackground: Color(0xFFA6EEFF), + surface: Color(0xFF001F25), + onSurface: Color(0xFFA6EEFF), + surfaceVariant: Color(0xFF44464F), + onSurfaceVariant: Color(0xFFC5C6D0), + outline: Color(0xFF8F9099), + onInverseSurface: Color(0xFF001F25), + inverseSurface: Color(0xFFA6EEFF), + inversePrimary: Color(0xFF365CA8), + shadow: Color(0xFF000000), + surfaceTint: Color(0xFFB0C6FF), + outlineVariant: Color(0xFF44464F), + scrim: Color(0xFF000000), +); diff --git a/AdminUi/apps/admin_ui/lib/theme/colors/custom_colors.dart b/AdminUi/apps/admin_ui/lib/theme/colors/custom_colors.dart new file mode 100644 index 0000000000..47c7977156 --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/theme/colors/custom_colors.dart @@ -0,0 +1,260 @@ +import 'package:flutter/material.dart'; + +const neutralVariant = Color(0xFF333333); +const decorative = Color(0xFF61178C); +const decorative_2 = Color(0xFF8EB0E9); +const error = Color(0xFF8C1742); +const warning = Color(0xFF8C6117); +const success = Color(0xFF428C17); + +CustomColors lightCustomColors = const CustomColors( + sourceNeutralvariant: Color(0xFF333333), + neutralvariant: Color(0xFF006874), + onNeutralvariant: Color(0xFFFFFFFF), + neutralvariantContainer: Color(0xFF97F0FF), + onNeutralvariantContainer: Color(0xFF001F24), + sourceDecorative: Color(0xFF61178C), + decorative: Color(0xFF833DAE), + onDecorative: Color(0xFFFFFFFF), + decorativeContainer: Color(0xFFF4D9FF), + onDecorativeContainer: Color(0xFF30004B), + sourceDecorative2: Color(0xFF8EB0E9), + decorative2: Color(0xFF255EA6), + onDecorative2: Color(0xFFFFFFFF), + decorative2Container: Color(0xFFD5E3FF), + onDecorative2Container: Color(0xFF001B3C), + sourceError: Color(0xFF8C1742), + error: Color(0xFFA93057), + onError: Color(0xFFFFFFFF), + errorContainer: Color(0xFFFFD9DF), + onErrorContainer: Color(0xFF3F0018), + sourceWarning: Color(0xFF8C6117), + warning: Color(0xFF815600), + onWarning: Color(0xFFFFFFFF), + warningContainer: Color(0xFFFFDDB1), + onWarningContainer: Color(0xFF291800), + sourceSuccess: Color(0xFF428C17), + success: Color(0xFF2B6C00), + onSuccess: Color(0xFFFFFFFF), + successContainer: Color(0xFFA6F878), + onSuccessContainer: Color(0xFF082100), +); + +CustomColors darkCustomColors = const CustomColors( + sourceNeutralvariant: Color(0xFF333333), + neutralvariant: Color(0xFF4FD8EB), + onNeutralvariant: Color(0xFF00363D), + neutralvariantContainer: Color(0xFF004F58), + onNeutralvariantContainer: Color(0xFF97F0FF), + sourceDecorative: Color(0xFF61178C), + decorative: Color(0xFFE5B4FF), + onDecorative: Color(0xFF4F0077), + decorativeContainer: Color(0xFF692194), + onDecorativeContainer: Color(0xFFF4D9FF), + sourceDecorative2: Color(0xFF8EB0E9), + decorative2: Color(0xFFA8C8FF), + onDecorative2: Color(0xFF003061), + decorative2Container: Color(0xFF004689), + onDecorative2Container: Color(0xFFD5E3FF), + sourceError: Color(0xFF8C1742), + error: Color(0xFFFFB1C2), + onError: Color(0xFF66002B), + errorContainer: Color(0xFF891440), + onErrorContainer: Color(0xFFFFD9DF), + sourceWarning: Color(0xFF8C6117), + warning: Color(0xFFFFBA4B), + onWarning: Color(0xFF442B00), + warningContainer: Color(0xFF624000), + onWarningContainer: Color(0xFFFFDDB1), + sourceSuccess: Color(0xFF428C17), + success: Color(0xFF8BDA5F), + onSuccess: Color(0xFF133800), + successContainer: Color(0xFF1F5100), + onSuccessContainer: Color(0xFFA6F878), +); + +/// Defines a set of custom colors, each comprised of 4 complementary tones. +/// +/// See also: +/// * +@immutable +class CustomColors extends ThemeExtension { + const CustomColors({ + required this.sourceNeutralvariant, + required this.neutralvariant, + required this.onNeutralvariant, + required this.neutralvariantContainer, + required this.onNeutralvariantContainer, + required this.sourceDecorative, + required this.decorative, + required this.onDecorative, + required this.decorativeContainer, + required this.onDecorativeContainer, + required this.sourceDecorative2, + required this.decorative2, + required this.onDecorative2, + required this.decorative2Container, + required this.onDecorative2Container, + required this.sourceError, + required this.error, + required this.onError, + required this.errorContainer, + required this.onErrorContainer, + required this.sourceWarning, + required this.warning, + required this.onWarning, + required this.warningContainer, + required this.onWarningContainer, + required this.sourceSuccess, + required this.success, + required this.onSuccess, + required this.successContainer, + required this.onSuccessContainer, + }); + + final Color? sourceNeutralvariant; + final Color? neutralvariant; + final Color? onNeutralvariant; + final Color? neutralvariantContainer; + final Color? onNeutralvariantContainer; + final Color? sourceDecorative; + final Color? decorative; + final Color? onDecorative; + final Color? decorativeContainer; + final Color? onDecorativeContainer; + final Color? sourceDecorative2; + final Color? decorative2; + final Color? onDecorative2; + final Color? decorative2Container; + final Color? onDecorative2Container; + final Color? sourceError; + final Color? error; + final Color? onError; + final Color? errorContainer; + final Color? onErrorContainer; + final Color? sourceWarning; + final Color? warning; + final Color? onWarning; + final Color? warningContainer; + final Color? onWarningContainer; + final Color? sourceSuccess; + final Color? success; + final Color? onSuccess; + final Color? successContainer; + final Color? onSuccessContainer; + + @override + CustomColors copyWith({ + Color? sourceNeutralvariant, + Color? neutralvariant, + Color? onNeutralvariant, + Color? neutralvariantContainer, + Color? onNeutralvariantContainer, + Color? sourceDecorative, + Color? decorative, + Color? onDecorative, + Color? decorativeContainer, + Color? onDecorativeContainer, + Color? sourceDecorative2, + Color? decorative2, + Color? onDecorative2, + Color? decorative2Container, + Color? onDecorative2Container, + Color? sourceError, + Color? error, + Color? onError, + Color? errorContainer, + Color? onErrorContainer, + Color? sourceWarning, + Color? warning, + Color? onWarning, + Color? warningContainer, + Color? onWarningContainer, + Color? sourceSuccess, + Color? success, + Color? onSuccess, + Color? successContainer, + Color? onSuccessContainer, + }) { + return CustomColors( + sourceNeutralvariant: sourceNeutralvariant ?? this.sourceNeutralvariant, + neutralvariant: neutralvariant ?? this.neutralvariant, + onNeutralvariant: onNeutralvariant ?? this.onNeutralvariant, + neutralvariantContainer: neutralvariantContainer ?? this.neutralvariantContainer, + onNeutralvariantContainer: onNeutralvariantContainer ?? this.onNeutralvariantContainer, + sourceDecorative: sourceDecorative ?? this.sourceDecorative, + decorative: decorative ?? this.decorative, + onDecorative: onDecorative ?? this.onDecorative, + decorativeContainer: decorativeContainer ?? this.decorativeContainer, + onDecorativeContainer: onDecorativeContainer ?? this.onDecorativeContainer, + sourceDecorative2: sourceDecorative2 ?? this.sourceDecorative2, + decorative2: decorative2 ?? this.decorative2, + onDecorative2: onDecorative2 ?? this.onDecorative2, + decorative2Container: decorative2Container ?? this.decorative2Container, + onDecorative2Container: onDecorative2Container ?? this.onDecorative2Container, + sourceError: sourceError ?? this.sourceError, + error: error ?? this.error, + onError: onError ?? this.onError, + errorContainer: errorContainer ?? this.errorContainer, + onErrorContainer: onErrorContainer ?? this.onErrorContainer, + sourceWarning: sourceWarning ?? this.sourceWarning, + warning: warning ?? this.warning, + onWarning: onWarning ?? this.onWarning, + warningContainer: warningContainer ?? this.warningContainer, + onWarningContainer: onWarningContainer ?? this.onWarningContainer, + sourceSuccess: sourceSuccess ?? this.sourceSuccess, + success: success ?? this.success, + onSuccess: onSuccess ?? this.onSuccess, + successContainer: successContainer ?? this.successContainer, + onSuccessContainer: onSuccessContainer ?? this.onSuccessContainer, + ); + } + + @override + CustomColors lerp(ThemeExtension? other, double t) { + if (other is! CustomColors) { + return this; + } + return CustomColors( + sourceNeutralvariant: Color.lerp(sourceNeutralvariant, other.sourceNeutralvariant, t), + neutralvariant: Color.lerp(neutralvariant, other.neutralvariant, t), + onNeutralvariant: Color.lerp(onNeutralvariant, other.onNeutralvariant, t), + neutralvariantContainer: Color.lerp(neutralvariantContainer, other.neutralvariantContainer, t), + onNeutralvariantContainer: Color.lerp(onNeutralvariantContainer, other.onNeutralvariantContainer, t), + sourceDecorative: Color.lerp(sourceDecorative, other.sourceDecorative, t), + decorative: Color.lerp(decorative, other.decorative, t), + onDecorative: Color.lerp(onDecorative, other.onDecorative, t), + decorativeContainer: Color.lerp(decorativeContainer, other.decorativeContainer, t), + onDecorativeContainer: Color.lerp(onDecorativeContainer, other.onDecorativeContainer, t), + sourceDecorative2: Color.lerp(sourceDecorative2, other.sourceDecorative2, t), + decorative2: Color.lerp(decorative2, other.decorative2, t), + onDecorative2: Color.lerp(onDecorative2, other.onDecorative2, t), + decorative2Container: Color.lerp(decorative2Container, other.decorative2Container, t), + onDecorative2Container: Color.lerp(onDecorative2Container, other.onDecorative2Container, t), + sourceError: Color.lerp(sourceError, other.sourceError, t), + error: Color.lerp(error, other.error, t), + onError: Color.lerp(onError, other.onError, t), + errorContainer: Color.lerp(errorContainer, other.errorContainer, t), + onErrorContainer: Color.lerp(onErrorContainer, other.onErrorContainer, t), + sourceWarning: Color.lerp(sourceWarning, other.sourceWarning, t), + warning: Color.lerp(warning, other.warning, t), + onWarning: Color.lerp(onWarning, other.onWarning, t), + warningContainer: Color.lerp(warningContainer, other.warningContainer, t), + onWarningContainer: Color.lerp(onWarningContainer, other.onWarningContainer, t), + sourceSuccess: Color.lerp(sourceSuccess, other.sourceSuccess, t), + success: Color.lerp(success, other.success, t), + onSuccess: Color.lerp(onSuccess, other.onSuccess, t), + successContainer: Color.lerp(successContainer, other.successContainer, t), + onSuccessContainer: Color.lerp(onSuccessContainer, other.onSuccessContainer, t), + ); + } + + /// Returns an instance of [CustomColors] in which the following custom + /// colors are harmonized with [dynamic]'s [ColorScheme.primary]. + /// + /// See also: + /// * + CustomColors harmonized(ColorScheme dynamic) { + return copyWith(); + } +} From 171dd3485822f9185afb963a58ba415b211bdbdb Mon Sep 17 00:00:00 2001 From: Vladimir Vuckovic <37671301+stamenione@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:26:12 +0200 Subject: [PATCH 5/7] Admin UI: Login page (#584) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: adapt the header appearance * chore: add new design for login box * chore: adapt login position in padding widget via screen size * chore: logic for displaying the error message for attempted login * chore: remove error message * chore: add error message * chore: change the button colors and add a text button * chore: remove Visibility widget * chore: add text style for text button * chore: change todo comment according to the flutter style * refactor: extract the app title to be a separate widget * refactor: extract text field to be reusable * chore: use new app title widget * chore: use custom text field * chore: make the text field fixed height * chore: rename variables and make them private * chore: update imports * chore: use extracted app title widget * chore: remove unnecessary widgets and center the card * chore: add custom colors and move login button to the bottom * chore: remove unused import * refactor: rename folder and files appropriately * refactor: extract sized box into a separate custom widget * refactor: extract elevated button into a separate custom widget * chore: make the variable private * chore: local variable should not start with underscore * chore: add DI for baseUrl * fix: untangle coding * fix: imports * fix: make CustomColors easier accessible * fix: make prettier * feat: add gaps * fix: rename file * refactor: remove CustomX, make whole logic with one variable * fix: bool logic * ci: add jkoenig134 as codeowner * chore: remove accidentally committet code * fix: undo change * refactor: simplify login screen * refactor: simplify app title * refactor: PR comments * chore: inline svg picture * chore: make multi line params last --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Julian König Co-authored-by: Timo Notheisen --- .github/CODEOWNERS | 2 +- .../apps/admin_ui/lib/core/app_config.dart | 5 + AdminUi/apps/admin_ui/lib/core/constants.dart | 19 +++ AdminUi/apps/admin_ui/lib/core/core.dart | 4 + .../apps/admin_ui/lib/core/extensions.dart | 16 +++ .../colors => core/theme}/color_schemes.dart | 0 .../colors => core/theme}/custom_colors.dart | 0 .../apps/admin_ui/lib/core/theme/theme.dart | 2 + .../admin_ui/lib/core/widgets/app_title.dart | 29 +++++ .../admin_ui/lib/core/widgets/widgets.dart | 1 + AdminUi/apps/admin_ui/lib/main.dart | 9 +- .../apps/admin_ui/lib/pages/login_page.dart | 97 --------------- AdminUi/apps/admin_ui/lib/pages/pages.dart | 3 - .../home_screen.dart} | 18 ++- .../admin_ui/lib/screens/login_screen.dart | 111 ++++++++++++++++++ .../apps/admin_ui/lib/screens/screens.dart | 3 + .../splash_screen.dart} | 4 +- .../admin_ui/lib/setup/setup_desktop.dart | 7 ++ .../apps/admin_ui/lib/setup/setup_web.dart | 6 +- 19 files changed, 216 insertions(+), 120 deletions(-) create mode 100644 AdminUi/apps/admin_ui/lib/core/app_config.dart create mode 100644 AdminUi/apps/admin_ui/lib/core/constants.dart create mode 100644 AdminUi/apps/admin_ui/lib/core/core.dart create mode 100644 AdminUi/apps/admin_ui/lib/core/extensions.dart rename AdminUi/apps/admin_ui/lib/{theme/colors => core/theme}/color_schemes.dart (100%) rename AdminUi/apps/admin_ui/lib/{theme/colors => core/theme}/custom_colors.dart (100%) create mode 100644 AdminUi/apps/admin_ui/lib/core/theme/theme.dart create mode 100644 AdminUi/apps/admin_ui/lib/core/widgets/app_title.dart create mode 100644 AdminUi/apps/admin_ui/lib/core/widgets/widgets.dart delete mode 100644 AdminUi/apps/admin_ui/lib/pages/login_page.dart delete mode 100644 AdminUi/apps/admin_ui/lib/pages/pages.dart rename AdminUi/apps/admin_ui/lib/{pages/home_page.dart => screens/home_screen.dart} (86%) create mode 100644 AdminUi/apps/admin_ui/lib/screens/login_screen.dart create mode 100644 AdminUi/apps/admin_ui/lib/screens/screens.dart rename AdminUi/apps/admin_ui/lib/{pages/splash_page.dart => screens/splash_screen.dart} (97%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 932f80a1cf..ce7ac59e98 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @tnotheis +* @tnotheis @jkoenig134 diff --git a/AdminUi/apps/admin_ui/lib/core/app_config.dart b/AdminUi/apps/admin_ui/lib/core/app_config.dart new file mode 100644 index 0000000000..022c9bca6b --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/app_config.dart @@ -0,0 +1,5 @@ +class AppConfig { + final String baseUrl; + + AppConfig({required this.baseUrl}); +} diff --git a/AdminUi/apps/admin_ui/lib/core/constants.dart b/AdminUi/apps/admin_ui/lib/core/constants.dart new file mode 100644 index 0000000000..be707b42cd --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/constants.dart @@ -0,0 +1,19 @@ +import 'package:flutter/widgets.dart'; + +class Gaps { + Gaps._(); + + static const SizedBox h4 = SizedBox(height: 4); + static const SizedBox h8 = SizedBox(height: 8); + static const SizedBox h16 = SizedBox(height: 16); + static const SizedBox h24 = SizedBox(height: 24); + static const SizedBox h32 = SizedBox(height: 32); + static const SizedBox h40 = SizedBox(height: 40); + + static const SizedBox w4 = SizedBox(width: 4); + static const SizedBox w8 = SizedBox(width: 8); + static const SizedBox w16 = SizedBox(width: 16); + static const SizedBox w24 = SizedBox(width: 24); + static const SizedBox w32 = SizedBox(width: 32); + static const SizedBox w40 = SizedBox(width: 40); +} diff --git a/AdminUi/apps/admin_ui/lib/core/core.dart b/AdminUi/apps/admin_ui/lib/core/core.dart new file mode 100644 index 0000000000..2a213e1e45 --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/core.dart @@ -0,0 +1,4 @@ +export 'app_config.dart'; +export 'constants.dart'; +export 'extensions.dart'; +export 'widgets/widgets.dart'; diff --git a/AdminUi/apps/admin_ui/lib/core/extensions.dart b/AdminUi/apps/admin_ui/lib/core/extensions.dart new file mode 100644 index 0000000000..4706e2d4d5 --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/extensions.dart @@ -0,0 +1,16 @@ +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; + +import 'theme/theme.dart'; + +extension UnregisterIfRegistered on GetIt { + Future unregisterIfRegistered() async { + if (!isRegistered()) return; + + await unregister(); + } +} + +extension GetCustomColors on BuildContext { + CustomColors get customColors => Theme.of(this).extension()!; +} diff --git a/AdminUi/apps/admin_ui/lib/theme/colors/color_schemes.dart b/AdminUi/apps/admin_ui/lib/core/theme/color_schemes.dart similarity index 100% rename from AdminUi/apps/admin_ui/lib/theme/colors/color_schemes.dart rename to AdminUi/apps/admin_ui/lib/core/theme/color_schemes.dart diff --git a/AdminUi/apps/admin_ui/lib/theme/colors/custom_colors.dart b/AdminUi/apps/admin_ui/lib/core/theme/custom_colors.dart similarity index 100% rename from AdminUi/apps/admin_ui/lib/theme/colors/custom_colors.dart rename to AdminUi/apps/admin_ui/lib/core/theme/custom_colors.dart diff --git a/AdminUi/apps/admin_ui/lib/core/theme/theme.dart b/AdminUi/apps/admin_ui/lib/core/theme/theme.dart new file mode 100644 index 0000000000..bb6c7a2a0d --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/theme/theme.dart @@ -0,0 +1,2 @@ +export 'color_schemes.dart'; +export 'custom_colors.dart'; diff --git a/AdminUi/apps/admin_ui/lib/core/widgets/app_title.dart b/AdminUi/apps/admin_ui/lib/core/widgets/app_title.dart new file mode 100644 index 0000000000..92bd697b72 --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/widgets/app_title.dart @@ -0,0 +1,29 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../constants.dart'; + +class AppTitle extends StatelessWidget { + const AppTitle({super.key}); + + @override + Widget build(BuildContext context) { + const textStyle = TextStyle(fontSize: 25); + + return Row( + mainAxisSize: MainAxisSize.min, + children: [ + SvgPicture.asset('assets/logo.svg', width: 30, height: 30), + Gaps.w8, + Text.rich( + TextSpan( + children: [ + TextSpan(text: 'enmeshed', style: textStyle.copyWith(fontWeight: FontWeight.bold)), + const TextSpan(text: ' Admin UI', style: textStyle), + ], + ), + ), + ], + ); + } +} diff --git a/AdminUi/apps/admin_ui/lib/core/widgets/widgets.dart b/AdminUi/apps/admin_ui/lib/core/widgets/widgets.dart new file mode 100644 index 0000000000..bdfa30afdc --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/core/widgets/widgets.dart @@ -0,0 +1 @@ +export 'app_title.dart'; diff --git a/AdminUi/apps/admin_ui/lib/main.dart b/AdminUi/apps/admin_ui/lib/main.dart index 403185b732..f207877f93 100644 --- a/AdminUi/apps/admin_ui/lib/main.dart +++ b/AdminUi/apps/admin_ui/lib/main.dart @@ -1,10 +1,9 @@ -import 'package:admin_ui/theme/colors/color_schemes.dart'; -import 'package:admin_ui/theme/colors/custom_colors.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'core/theme/theme.dart'; import 'home/home.dart'; -import 'pages/pages.dart'; +import 'screens/screens.dart'; import 'setup/setup_desktop.dart' if (dart.library.html) 'setup/setup_web.dart'; void main() async { @@ -12,9 +11,7 @@ void main() async { await setup(); - runApp( - const AdminUiApp(), - ); + runApp(const AdminUiApp()); } final _rootNavigatorKey = GlobalKey(); diff --git a/AdminUi/apps/admin_ui/lib/pages/login_page.dart b/AdminUi/apps/admin_ui/lib/pages/login_page.dart deleted file mode 100644 index 29fc7d23ab..0000000000 --- a/AdminUi/apps/admin_ui/lib/pages/login_page.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'package:admin_api_sdk/admin_api_sdk.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; -import 'package:get_it/get_it.dart'; -import 'package:go_router/go_router.dart'; -import 'package:shared_preferences/shared_preferences.dart'; - -class LoginScreen extends StatefulWidget { - const LoginScreen({super.key}); - - @override - State createState() => _LoginScreenState(); -} - -class _LoginScreenState extends State { - final _apiKeyController = TextEditingController(); - final _apiKeyFocusNode = FocusNode(); - - @override - void initState() { - super.initState(); - - _apiKeyFocusNode.requestFocus(); - } - - @override - void dispose() { - _apiKeyController.dispose(); - _apiKeyFocusNode.dispose(); - - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Enmeshed Admin UI - Login'), - ), - body: Center( - child: SizedBox( - width: 300, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - SvgPicture.asset('assets/logo.svg', width: 200, height: 200), - const SizedBox(height: 40), - TextField( - controller: _apiKeyController, - focusNode: _apiKeyFocusNode, - decoration: const InputDecoration( - labelText: 'API Key', - border: OutlineInputBorder(), - ), - onSubmitted: (_) => _login(), - obscureText: true, - ), - const SizedBox(height: 20), - ElevatedButton( - onPressed: _login, - child: const Text('Login'), - ), - ], - ), - ), - ), - ); - } - - Future _login() async { - final apiKey = _apiKeyController.text.trim(); - if (apiKey.isEmpty) return; - - const baseUrl = kIsWeb ? '' : String.fromEnvironment('base_url'); - final apiKeyValid = await AdminApiClient.validateApiKey(baseUrl: baseUrl, apiKey: apiKey); - - if (!mounted) return; - - if (!apiKeyValid) { - ScaffoldMessenger.of(context).showSnackBar( - const SnackBar( - content: Text('Invalid API Key'), - backgroundColor: Colors.red, - ), - ); - return; - } - - final sp = await SharedPreferences.getInstance(); - await sp.setString('api_key', apiKey); - await GetIt.I.reset(); - - GetIt.I.registerSingleton(await AdminApiClient.create(baseUrl: baseUrl, apiKey: apiKey)); - if (mounted) context.go('/dashboard'); - } -} diff --git a/AdminUi/apps/admin_ui/lib/pages/pages.dart b/AdminUi/apps/admin_ui/lib/pages/pages.dart deleted file mode 100644 index bac7e17980..0000000000 --- a/AdminUi/apps/admin_ui/lib/pages/pages.dart +++ /dev/null @@ -1,3 +0,0 @@ -export 'home_page.dart'; -export 'login_page.dart'; -export 'splash_page.dart'; diff --git a/AdminUi/apps/admin_ui/lib/pages/home_page.dart b/AdminUi/apps/admin_ui/lib/screens/home_screen.dart similarity index 86% rename from AdminUi/apps/admin_ui/lib/pages/home_page.dart rename to AdminUi/apps/admin_ui/lib/screens/home_screen.dart index 94efa8693b..3e6499f4c7 100644 --- a/AdminUi/apps/admin_ui/lib/pages/home_page.dart +++ b/AdminUi/apps/admin_ui/lib/screens/home_screen.dart @@ -1,9 +1,11 @@ +import 'package:admin_api_sdk/admin_api_sdk.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/flutter_svg.dart'; import 'package:get_it/get_it.dart'; import 'package:go_router/go_router.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import '/core/core.dart'; + class HomeScreen extends StatefulWidget { final Widget child; final String location; @@ -21,14 +23,7 @@ class _HomeScreenState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Row( - mainAxisSize: MainAxisSize.min, - children: [ - SvgPicture.asset('assets/logo.svg', width: 30, height: 30), - const SizedBox(width: 10), - const Text('Enmeshed Admin UI'), - ], - ), + title: const AppTitle(), leading: IconButton( icon: const Icon(Icons.menu), onPressed: () { @@ -39,7 +34,7 @@ class _HomeScreenState extends State { ), actions: [ IconButton(icon: const Icon(Icons.logout), onPressed: _logout), - const SizedBox(width: 10), + Gaps.w8, ], ), body: Row( @@ -85,7 +80,8 @@ class _HomeScreenState extends State { Future _logout() async { final sp = await SharedPreferences.getInstance(); await sp.remove('api_key'); - await GetIt.I.reset(); + await GetIt.I.unregisterIfRegistered(); + if (mounted) context.go('/login'); } } diff --git a/AdminUi/apps/admin_ui/lib/screens/login_screen.dart b/AdminUi/apps/admin_ui/lib/screens/login_screen.dart new file mode 100644 index 0000000000..6db960862d --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/screens/login_screen.dart @@ -0,0 +1,111 @@ +import 'package:admin_api_sdk/admin_api_sdk.dart'; +import 'package:flutter/material.dart'; +import 'package:get_it/get_it.dart'; +import 'package:go_router/go_router.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +import '/core/core.dart'; + +class LoginScreen extends StatefulWidget { + const LoginScreen({super.key}); + + @override + State createState() => _LoginScreenState(); +} + +class _LoginScreenState extends State { + final _apiKeyController = TextEditingController(); + final _apiKeyFocusNode = FocusNode(); + + bool? _isApiKeyValid; + + @override + void initState() { + super.initState(); + + _apiKeyFocusNode.requestFocus(); + } + + @override + void dispose() { + _apiKeyController.dispose(); + _apiKeyFocusNode.dispose(); + + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + appBar: AppBar( + title: const AppTitle(), + centerTitle: false, + leading: Gaps.w40, + ), + body: Center( + child: SizedBox( + width: 400, + child: Card( + child: Padding( + padding: const EdgeInsets.all(25), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TextField( + controller: _apiKeyController, + focusNode: _apiKeyFocusNode, + obscureText: true, + decoration: InputDecoration( + labelText: 'API Key', + border: const OutlineInputBorder(), + errorText: _isApiKeyValid == false ? 'Invalid API Key' : null, + helperText: '', + ), + onChanged: (_) { + if (_isApiKeyValid == null) return setState(() {}); + + setState(() => _isApiKeyValid = null); + }, + onSubmitted: (_) => _login(), + ), + Gaps.h24, + FilledButton( + style: FilledButton.styleFrom(minimumSize: const Size.fromHeight(45)), + onPressed: _apiKeyController.text.isNotEmpty ? _login : null, + child: const Text('Login'), + ), + ], + ), + ), + ), + ), + ), + ); + } + + Future _login() async { + final apiKey = _apiKeyController.text; + if (apiKey.isEmpty) return; + + final baseUrl = GetIt.I().baseUrl; + final isApiKeyValid = await AdminApiClient.validateApiKey(baseUrl: baseUrl, apiKey: apiKey); + + if (!mounted) return; + + if (!isApiKeyValid) { + setState(() => _isApiKeyValid = false); + + _apiKeyFocusNode.requestFocus(); + + return; + } + + final sp = await SharedPreferences.getInstance(); + await sp.setString('api_key', apiKey); + + await GetIt.I.unregisterIfRegistered(); + GetIt.I.registerSingleton(await AdminApiClient.create(baseUrl: baseUrl, apiKey: apiKey)); + if (mounted) context.go('/dashboard'); + } +} diff --git a/AdminUi/apps/admin_ui/lib/screens/screens.dart b/AdminUi/apps/admin_ui/lib/screens/screens.dart new file mode 100644 index 0000000000..22c5a99985 --- /dev/null +++ b/AdminUi/apps/admin_ui/lib/screens/screens.dart @@ -0,0 +1,3 @@ +export 'home_screen.dart'; +export 'login_screen.dart'; +export 'splash_screen.dart'; diff --git a/AdminUi/apps/admin_ui/lib/pages/splash_page.dart b/AdminUi/apps/admin_ui/lib/screens/splash_screen.dart similarity index 97% rename from AdminUi/apps/admin_ui/lib/pages/splash_page.dart rename to AdminUi/apps/admin_ui/lib/screens/splash_screen.dart index 0fe6ab31ca..ab80f5e864 100644 --- a/AdminUi/apps/admin_ui/lib/pages/splash_page.dart +++ b/AdminUi/apps/admin_ui/lib/screens/splash_screen.dart @@ -6,6 +6,8 @@ import 'package:get_it/get_it.dart'; import 'package:go_router/go_router.dart'; import 'package:shared_preferences/shared_preferences.dart'; +import '/core/core.dart'; + class SplashScreen extends StatefulWidget { const SplashScreen({super.key}); @@ -29,7 +31,7 @@ class _SplashScreenState extends State { mainAxisSize: MainAxisSize.min, children: [ SvgPicture.asset('assets/logo.svg', width: 200, height: 200), - const SizedBox(height: 40), + Gaps.h40, const SizedBox(width: 300, child: LinearProgressIndicator()), ], ), diff --git a/AdminUi/apps/admin_ui/lib/setup/setup_desktop.dart b/AdminUi/apps/admin_ui/lib/setup/setup_desktop.dart index 728426f881..9a341a2403 100644 --- a/AdminUi/apps/admin_ui/lib/setup/setup_desktop.dart +++ b/AdminUi/apps/admin_ui/lib/setup/setup_desktop.dart @@ -1,10 +1,17 @@ import 'dart:io'; import 'dart:ui'; +import 'package:get_it/get_it.dart'; import 'package:window_size/window_size.dart'; +import '/core/core.dart'; + Future setup() async { if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) { setWindowMinSize(const Size(1200, 800)); } + + GetIt.I.registerSingleton( + AppConfig(baseUrl: const String.fromEnvironment('base_url')), + ); } diff --git a/AdminUi/apps/admin_ui/lib/setup/setup_web.dart b/AdminUi/apps/admin_ui/lib/setup/setup_web.dart index a8c68561e1..05f6e02659 100644 --- a/AdminUi/apps/admin_ui/lib/setup/setup_web.dart +++ b/AdminUi/apps/admin_ui/lib/setup/setup_web.dart @@ -1,3 +1,7 @@ +import 'package:get_it/get_it.dart'; + +import '/core/app_config.dart'; + Future setup() async { - // No setup required for web + GetIt.I.registerSingleton(AppConfig(baseUrl: '')); } From a7ffd458bcbb255b4945d99f39f99da844cdea6c Mon Sep 17 00:00:00 2001 From: Mika Aaron Herrmann <65243124+MH321Productions@users.noreply.github.com> Date: Wed, 3 Apr 2024 12:01:51 +0200 Subject: [PATCH 6/7] Admin API: C# SDK (#548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create new project * Set up basic structure * Add ApiKeyValidation Endpoint * Add Clients Endpoint * Add Identities Endpoint * Add Logs Endpoint * Add Metrics Endpoint * Add Relationships Endpoint * Add Endpoints to client * Add Tiers Endpoint * Make Project buildable * Make fields required * Fix Formatting #1 * Fix Formatting #2 * Fix merge conflict (Consumer API SDK was contained twice) * Add new common project * Add common renamed types * Add project file * Remove common types from ConsumerApi * Include common project in ConsumerApi * Update Types, Methods and classes in ConsumerAPI * Move Requests and Responses into own folders * Remove validated request * Add Enumerable Responses * Add AdminAPI SDK project * Rename StartDeletionProcess Method * Remove signed challenge from Create identity request * Make fields required * Reference Tooling project for custom Json Converter * Use Authenticator for Xsrf * Fix Enumerable Response * Fix Create Tier Request * Fix Request * Fix formatting * Delete redundant classes * Reference Common project * chore: Reference common classes * chore: Add patch method, remove unnecessary unauthenticated methods * fix: Make EnumerableResponseBase an ICollection * fix: Fix formatting * Admin UI: Login page (#584) * chore: adapt the header appearance * chore: add new design for login box * chore: adapt login position in padding widget via screen size * chore: logic for displaying the error message for attempted login * chore: remove error message * chore: add error message * chore: change the button colors and add a text button * chore: remove Visibility widget * chore: add text style for text button * chore: change todo comment according to the flutter style * refactor: extract the app title to be a separate widget * refactor: extract text field to be reusable * chore: use new app title widget * chore: use custom text field * chore: make the text field fixed height * chore: rename variables and make them private * chore: update imports * chore: use extracted app title widget * chore: remove unnecessary widgets and center the card * chore: add custom colors and move login button to the bottom * chore: remove unused import * refactor: rename folder and files appropriately * refactor: extract sized box into a separate custom widget * refactor: extract elevated button into a separate custom widget * chore: make the variable private * chore: local variable should not start with underscore * chore: add DI for baseUrl * fix: untangle coding * fix: imports * fix: make CustomColors easier accessible * fix: make prettier * feat: add gaps * fix: rename file * refactor: remove CustomX, make whole logic with one variable * fix: bool logic * ci: add jkoenig134 as codeowner * chore: remove accidentally committet code * fix: undo change * refactor: simplify login screen * refactor: simplify app title * refactor: PR comments * chore: inline svg picture * chore: make multi line params last --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Julian König Co-authored-by: Timo Notheisen --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Vladimir Vuckovic <37671301+stamenione@users.noreply.github.com> Co-authored-by: Julian König Co-authored-by: Timo Notheisen Co-authored-by: Timo Notheisen <65653426+tnotheis@users.noreply.github.com> --- AdminApi.Sdk/AdminApi.Sdk.csproj | 6 + AdminApi.Sdk/Client.cs | 37 + AdminApi.Sdk/Configuration.cs | 16 + .../ApiKeyValidationEndpoint.cs | 12 + .../Types/Requests/ValidateApiKeyRequest.cs | 6 + .../Types/Responses/ValidateApiKeyResponse.cs | 6 + .../Endpoints/Clients/ClientsEndpoint.cs | 25 + .../Endpoints/Clients/Types/ClientInfo.cs | 10 + .../Endpoints/Clients/Types/ClientOverwiew.cs | 17 + .../Requests/ChangeClientSecretRequest.cs | 6 + .../Types/Requests/CreateClientRequest.cs | 10 + .../Types/Requests/UpdateClientRequest.cs | 7 + .../Types/Responses/CreateClientResponse.cs | 11 + .../Types/Responses/ListClientsResponse.cs | 5 + .../Common/XsrfAndApiKeyAuthenticator.cs | 53 + .../Identities/IdentitiesEndpoint.cs | 27 + .../Identities/Types/IndividualQuota.cs | 9 + .../Endpoints/Identities/Types/Metric.cs | 7 + .../Types/Requests/CreateIdentityRequest.cs | 10 + .../Requests/CreateQuotaForIdentityRequest.cs | 8 + .../Requests/UpdateIdentityTierRequest.cs | 6 + .../Types/Responses/CreateIdentityResponse.cs | 15 + .../Types/Responses/GetIdentityResponse.cs | 38 + .../StartDeletionProcessAsSupportResponse.cs | 8 + AdminApi.Sdk/Endpoints/Logs/LogsEndpoint.cs | 10 + .../Logs/Types/Requests/LogRequest.cs | 20 + .../Endpoints/Metrics/MetricsEndpoint.cs | 10 + .../Types/Responses/ListMetricsResponse.cs | 6 + .../Relationships/RelationshipsEndpoint.cs | 18 + .../Relationships/Types/Relationship.cs | 13 + .../Responses/ListRelationshipsResponse.cs | 5 + AdminApi.Sdk/Endpoints/Tiers/TiersEndpoint.cs | 24 + .../Requests/CreateQuotaForTierRequest.cs | 8 + .../Tiers/Types/Requests/CreateTierRequest.cs | 6 + .../Types/Responses/ListTiersResponse.cs | 5 + AdminApi.Sdk/Endpoints/Tiers/Types/Tier.cs | 7 + .../Endpoints/Tiers/Types/TierDetails.cs | 10 + .../Endpoints/Tiers/Types/TierOverview.cs | 8 + .../Tiers/Types/TierQuotaDefinition.cs | 11 + .../Controllers/IdentitiesController.cs | 13 +- Backbone.sln | 1625 +++++++++-------- .../BuildingBlocks.SDK.csproj | 3 + .../Endpoints/Common/Endpoint.cs | 2 +- .../Endpoints/Common/EndpointClient.cs | 244 +++ .../Endpoints/Common/IAuthenticator.cs | 2 +- .../Endpoints/Common/Types/ApiError.cs | 4 +- .../Endpoints/Common/Types/ApiResponse.cs | 6 +- .../Endpoints/Common/Types/EmptyResponse.cs | 3 + .../Common/Types/EnumerableResponseBase.cs | 50 + .../Common/Types/IQueryParameterStorage.cs | 8 + .../Endpoints/Common/Types/PaginationData.cs | 3 +- .../Common/Types/PaginationFilter.cs | 4 +- .../Endpoints/Common/Types/RawApiResponse.cs | 8 +- ConsumerApi.Sdk/Client.cs | 3 +- ConsumerApi.Sdk/ConsumerApi.Sdk.csproj | 3 +- .../Challenges/ChallengesEndpoint.cs | 12 +- .../Endpoints/Common/EndpointClient.cs | 245 --- .../Endpoints/Common/OAuthAuthenticator.cs | 1 + .../Endpoints/Common/Types/EmptyResponse.cs | 5 - .../Common/Types/EnumerableResponseBase.cs | 23 - .../Datawallets/DatawalletEndpoint.cs | 14 +- .../GetDatawalletModificationsResponse.cs | 4 +- .../Endpoints/Devices/DevicesEndpoint.cs | 16 +- .../Types/Responses/ListDevicesResponse.cs | 4 +- .../Endpoints/Files/FilesEndpoint.cs | 16 +- .../Identities/IdentitiesEndpoint.cs | 14 +- .../ListDeletionProcessesResponse.cs | 4 +- .../Endpoints/Messages/MessagesEndpoint.cs | 12 +- .../Types/Responses/ListMessagesResponse.cs | 4 +- .../PushNotificationsEndpoint.cs | 11 +- .../Endpoints/Quotas/QuotasEndpoint.cs | 6 +- .../Responses/ListIndividualQuotasResponse.cs | 4 +- .../RelationshipTemplatesEndpoint.cs | 12 +- .../ListRelationshipTemplatesResponse.cs | 4 +- .../Relationships/RelationshipsEndpoint.cs | 22 +- .../ListRelationshipChangesResponse.cs | 4 +- .../Responses/ListRelationshipsResponse.cs | 4 +- .../Endpoints/SyncRuns/SyncRunsEndpoint.cs | 18 +- .../Responses/ListExternalEventsResponse.cs | 4 +- .../Endpoints/Tokens/TokensEndpoint.cs | 12 +- .../Types/Responses/ListTokensResponse.cs | 4 +- 81 files changed, 1766 insertions(+), 1210 deletions(-) create mode 100644 AdminApi.Sdk/AdminApi.Sdk.csproj create mode 100644 AdminApi.Sdk/Client.cs create mode 100644 AdminApi.Sdk/Configuration.cs create mode 100644 AdminApi.Sdk/Endpoints/ApiKeyValidation/ApiKeyValidationEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Requests/ValidateApiKeyRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Responses/ValidateApiKeyResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/ClientsEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/ClientInfo.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/ClientOverwiew.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/Requests/ChangeClientSecretRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/Requests/CreateClientRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/Requests/UpdateClientRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/Responses/CreateClientResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Clients/Types/Responses/ListClientsResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Common/XsrfAndApiKeyAuthenticator.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/IndividualQuota.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Metric.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateIdentityRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateQuotaForIdentityRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Requests/UpdateIdentityTierRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Responses/CreateIdentityResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Responses/GetIdentityResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Identities/Types/Responses/StartDeletionProcessAsSupportResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Logs/LogsEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/Logs/Types/Requests/LogRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Metrics/MetricsEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/Metrics/Types/Responses/ListMetricsResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/Relationships/Types/Relationship.cs create mode 100644 AdminApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/TiersEndpoint.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateQuotaForTierRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateTierRequest.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/Responses/ListTiersResponse.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/Tier.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/TierDetails.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/TierOverview.cs create mode 100644 AdminApi.Sdk/Endpoints/Tiers/Types/TierQuotaDefinition.cs create mode 100644 BuildingBlocks/src/BuildingBlocks.SDK/BuildingBlocks.SDK.csproj rename {ConsumerApi.Sdk => BuildingBlocks/src/BuildingBlocks.SDK}/Endpoints/Common/Endpoint.cs (66%) create mode 100644 BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/EndpointClient.cs rename {ConsumerApi.Sdk => BuildingBlocks/src/BuildingBlocks.SDK}/Endpoints/Common/IAuthenticator.cs (61%) rename ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiError.cs => BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiError.cs (72%) rename ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiResponse.cs => BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiResponse.cs (79%) create mode 100644 BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EmptyResponse.cs create mode 100644 BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EnumerableResponseBase.cs create mode 100644 BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/IQueryParameterStorage.cs rename {ConsumerApi.Sdk => BuildingBlocks/src/BuildingBlocks.SDK}/Endpoints/Common/Types/PaginationData.cs (77%) rename {ConsumerApi.Sdk => BuildingBlocks/src/BuildingBlocks.SDK}/Endpoints/Common/Types/PaginationFilter.cs (72%) rename ConsumerApi.Sdk/Endpoints/Common/Types/RawConsumerApiResponse.cs => BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/RawApiResponse.cs (68%) delete mode 100644 ConsumerApi.Sdk/Endpoints/Common/EndpointClient.cs delete mode 100644 ConsumerApi.Sdk/Endpoints/Common/Types/EmptyResponse.cs delete mode 100644 ConsumerApi.Sdk/Endpoints/Common/Types/EnumerableResponseBase.cs diff --git a/AdminApi.Sdk/AdminApi.Sdk.csproj b/AdminApi.Sdk/AdminApi.Sdk.csproj new file mode 100644 index 0000000000..3c91a8291f --- /dev/null +++ b/AdminApi.Sdk/AdminApi.Sdk.csproj @@ -0,0 +1,6 @@ + + + + + + diff --git a/AdminApi.Sdk/Client.cs b/AdminApi.Sdk/Client.cs new file mode 100644 index 0000000000..d955d0695a --- /dev/null +++ b/AdminApi.Sdk/Client.cs @@ -0,0 +1,37 @@ +using Backbone.AdminApi.Sdk.Endpoints.ApiKeyValidation; +using Backbone.AdminApi.Sdk.Endpoints.Clients; +using Backbone.AdminApi.Sdk.Endpoints.Common; +using Backbone.AdminApi.Sdk.Endpoints.Identities; +using Backbone.AdminApi.Sdk.Endpoints.Logs; +using Backbone.AdminApi.Sdk.Endpoints.Metrics; +using Backbone.AdminApi.Sdk.Endpoints.Relationships; +using Backbone.AdminApi.Sdk.Endpoints.Tiers; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; + +namespace Backbone.AdminApi.Sdk; + +public class Client +{ + public Client(Configuration config) + { + var httpClient = new HttpClient { BaseAddress = new Uri(config.BaseUrl) }; + var authenticator = new XsrfAndApiKeyAuthenticator(config.ApiKey, httpClient); + var endpointClient = new EndpointClient(httpClient, authenticator, config.JsonSerializerOptions); + + ApiKeyValidation = new ApiKeyValidationEndpoint(endpointClient); + Clients = new ClientsEndpoint(endpointClient); + Identities = new IdentitiesEndpoint(endpointClient); + Logs = new LogsEndpoint(endpointClient); + Metrics = new MetricsEndpoint(endpointClient); + Relationships = new RelationshipsEndpoint(endpointClient); + Tiers = new TiersEndpoint(endpointClient); + } + + public ApiKeyValidationEndpoint ApiKeyValidation { get; } + public ClientsEndpoint Clients { get; } + public IdentitiesEndpoint Identities { get; } + public LogsEndpoint Logs { get; } + public MetricsEndpoint Metrics { get; } + public RelationshipsEndpoint Relationships { get; } + public TiersEndpoint Tiers { get; } +} diff --git a/AdminApi.Sdk/Configuration.cs b/AdminApi.Sdk/Configuration.cs new file mode 100644 index 0000000000..157dfa00cf --- /dev/null +++ b/AdminApi.Sdk/Configuration.cs @@ -0,0 +1,16 @@ +using System.Text.Json; +using Backbone.Tooling.JsonConverters; + +namespace Backbone.AdminApi.Sdk; + +public class Configuration +{ + public Configuration() + { + JsonSerializerOptions.Converters.Add(new UrlSafeBase64ToByteArrayJsonConverter()); + } + + public required string BaseUrl { get; set; } + public required string ApiKey { get; set; } + public JsonSerializerOptions JsonSerializerOptions { get; set; } = new() { PropertyNameCaseInsensitive = true }; +} diff --git a/AdminApi.Sdk/Endpoints/ApiKeyValidation/ApiKeyValidationEndpoint.cs b/AdminApi.Sdk/Endpoints/ApiKeyValidation/ApiKeyValidationEndpoint.cs new file mode 100644 index 0000000000..0aee13d83a --- /dev/null +++ b/AdminApi.Sdk/Endpoints/ApiKeyValidation/ApiKeyValidationEndpoint.cs @@ -0,0 +1,12 @@ +using Backbone.AdminApi.Sdk.Endpoints.ApiKeyValidation.Types.Requests; +using Backbone.AdminApi.Sdk.Endpoints.ApiKeyValidation.Types.Responses; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.ApiKeyValidation; + +public class ApiKeyValidationEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> ValidateApiKeyUnauthenticated(ValidateApiKeyRequest? request) + => await _client.PostUnauthenticated("ValidateApiKey", request); +} diff --git a/AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Requests/ValidateApiKeyRequest.cs b/AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Requests/ValidateApiKeyRequest.cs new file mode 100644 index 0000000000..9a68bdbddf --- /dev/null +++ b/AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Requests/ValidateApiKeyRequest.cs @@ -0,0 +1,6 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.ApiKeyValidation.Types.Requests; + +public class ValidateApiKeyRequest +{ + public string? ApiKey { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Responses/ValidateApiKeyResponse.cs b/AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Responses/ValidateApiKeyResponse.cs new file mode 100644 index 0000000000..237705f1df --- /dev/null +++ b/AdminApi.Sdk/Endpoints/ApiKeyValidation/Types/Responses/ValidateApiKeyResponse.cs @@ -0,0 +1,6 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.ApiKeyValidation.Types.Responses; + +public class ValidateApiKeyResponse +{ + public required bool IsValid { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/ClientsEndpoint.cs b/AdminApi.Sdk/Endpoints/Clients/ClientsEndpoint.cs new file mode 100644 index 0000000000..b8f6f2e0d7 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/ClientsEndpoint.cs @@ -0,0 +1,25 @@ +using Backbone.AdminApi.Sdk.Endpoints.Clients.Types; +using Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Requests; +using Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Responses; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Clients; + +public class ClientsEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> GetAllClients() => await _client.Get("Clients"); + + public async Task> GetClient(string id) => await _client.Get($"Clients/{id}"); + + public async Task> CreateClient(CreateClientRequest request) + => await _client.Post("Clients", request); + + public async Task> ChangeClientSecret(string id, ChangeClientSecretRequest request) + => await _client.Patch($"Clients/{id}/ChangeSecret", request); + + public async Task> UpdateClient(string id, UpdateClientRequest request) + => await _client.Put($"Clients/{id}", request); + + public async Task> DeleteClient(string id) => await _client.Delete($"Clients/{id}"); +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/ClientInfo.cs b/AdminApi.Sdk/Endpoints/Clients/Types/ClientInfo.cs new file mode 100644 index 0000000000..0a11a3be5f --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/ClientInfo.cs @@ -0,0 +1,10 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types; + +public class ClientInfo +{ + public required string ClientId { get; set; } + public required string DisplayName { get; set; } + public required string DefaultTier { get; set; } + public required DateTime CreatedAt { get; set; } + public int? MaxIdentities { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/ClientOverwiew.cs b/AdminApi.Sdk/Endpoints/Clients/Types/ClientOverwiew.cs new file mode 100644 index 0000000000..1113dd7f74 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/ClientOverwiew.cs @@ -0,0 +1,17 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types; + +public class ClientOverwiew +{ + public required string ClientId { get; set; } + public required string DisplayName { get; set; } + public required Tier DefaultTier { get; set; } + public required DateTime CreatedAt { get; set; } + public int? MaxIdentities { get; set; } + public required int NumberOfIdentities { get; set; } +} + +public class Tier +{ + public required string Id { get; set; } + public required string Name { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/Requests/ChangeClientSecretRequest.cs b/AdminApi.Sdk/Endpoints/Clients/Types/Requests/ChangeClientSecretRequest.cs new file mode 100644 index 0000000000..7e8485a357 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/Requests/ChangeClientSecretRequest.cs @@ -0,0 +1,6 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Requests; + +public class ChangeClientSecretRequest +{ + public required string NewSecret { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/Requests/CreateClientRequest.cs b/AdminApi.Sdk/Endpoints/Clients/Types/Requests/CreateClientRequest.cs new file mode 100644 index 0000000000..1b2bf83295 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/Requests/CreateClientRequest.cs @@ -0,0 +1,10 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Requests; + +public class CreateClientRequest +{ + public string? ClientId { get; set; } + public string? DisplayName { get; set; } + public string? ClientSecret { get; set; } + public required string DefaultTier { get; set; } + public int? MaxIdentities { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/Requests/UpdateClientRequest.cs b/AdminApi.Sdk/Endpoints/Clients/Types/Requests/UpdateClientRequest.cs new file mode 100644 index 0000000000..1375641ac0 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/Requests/UpdateClientRequest.cs @@ -0,0 +1,7 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Requests; + +public class UpdateClientRequest +{ + public required string DefaultTier { get; set; } + public int? MaxIdentities { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/Responses/CreateClientResponse.cs b/AdminApi.Sdk/Endpoints/Clients/Types/Responses/CreateClientResponse.cs new file mode 100644 index 0000000000..49223023d9 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/Responses/CreateClientResponse.cs @@ -0,0 +1,11 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Responses; + +public class CreateClientResponse +{ + public required string ClientId { get; set; } + public required string DisplayName { get; set; } + public required string ClientSecret { get; set; } + public required string DefaultTier { get; set; } + public required DateTime CreatedAt { get; set; } + public int? MaxIdentities { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Clients/Types/Responses/ListClientsResponse.cs b/AdminApi.Sdk/Endpoints/Clients/Types/Responses/ListClientsResponse.cs new file mode 100644 index 0000000000..94b2fc6099 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Clients/Types/Responses/ListClientsResponse.cs @@ -0,0 +1,5 @@ +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Clients.Types.Responses; + +public class ListClientsResponse : EnumerableResponseBase; diff --git a/AdminApi.Sdk/Endpoints/Common/XsrfAndApiKeyAuthenticator.cs b/AdminApi.Sdk/Endpoints/Common/XsrfAndApiKeyAuthenticator.cs new file mode 100644 index 0000000000..a922d26ace --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Common/XsrfAndApiKeyAuthenticator.cs @@ -0,0 +1,53 @@ +using System.Diagnostics.CodeAnalysis; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; + +namespace Backbone.AdminApi.Sdk.Endpoints.Common; + +public class XsrfAndApiKeyAuthenticator : IAuthenticator +{ + private readonly string _apiKey; + private string? _xsrfToken = null; + private string? _xsrfCookie = null; + private readonly HttpClient _client; + + public XsrfAndApiKeyAuthenticator(string apiKey, HttpClient client) + { + _apiKey = apiKey; + _client = client; + } + + public async Task Authenticate(HttpRequestMessage request) + { + request.Headers.Add("X-API-KEY", _apiKey); + request.Headers.Add("X-XSRF-TOKEN", await GetToken()); + request.Headers.Add("Cookie", await GetCookie()); + } + + private async Task GetToken() + { + if (_xsrfToken == null) await RefreshToken(); + + return _xsrfToken; + } + + private async Task GetCookie() + { + if (_xsrfCookie == null) await RefreshToken(); + + return _xsrfCookie; + } + + [MemberNotNull(nameof(_xsrfToken), nameof(_xsrfCookie))] + private async Task RefreshToken() + { + HttpRequestMessage request = new(HttpMethod.Get, "xsrf"); + request.Headers.Add("X-API-KEY", _apiKey); + +#pragma warning disable CS8774 // This warning ("Member must have a non-null value when exiting") must currently be disabled. (see https://github.com/dotnet/csharplang/discussions/ for details) + var response = await _client.SendAsync(request); + + _xsrfToken = await response.Content.ReadAsStringAsync(); + _xsrfCookie = response.Headers.GetValues("Set-Cookie").First(); +#pragma warning restore CS8774 + } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs b/AdminApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs new file mode 100644 index 0000000000..85d715b340 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs @@ -0,0 +1,27 @@ +using Backbone.AdminApi.Sdk.Endpoints.Identities.Types; +using Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Requests; +using Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Responses; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Identities; + +public class IdentitiesEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> CreateIndividualQuota(string address, CreateQuotaForIdentityRequest request) + => await _client.Post($"Identities/{address}/Quotas", request); + + public async Task> DeleteIndividualQuota(string address, string quotaId) + => await _client.Delete($"Identities/{address}/Quotas/{quotaId}"); + + public async Task> GetIdentity(string address) => await _client.Get($"Identities/{address}"); + + public async Task> UpdateIdentityTier(string address, UpdateIdentityTierRequest request) + => await _client.Put($"Identities/{address}", request); + + public async Task> CreateIdentity(CreateIdentityRequest request) + => await _client.Post("Identities", request); + + public async Task> StartDeletionProcess(string address) + => await _client.Post($"Identities/{address}/DeletionProcesses"); +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/IndividualQuota.cs b/AdminApi.Sdk/Endpoints/Identities/Types/IndividualQuota.cs new file mode 100644 index 0000000000..4cb824f80f --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/IndividualQuota.cs @@ -0,0 +1,9 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types; + +public class IndividualQuota +{ + public required string Id { get; set; } + public required Metric Metric { get; set; } + public required int Max { get; set; } + public required string Period { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Metric.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Metric.cs new file mode 100644 index 0000000000..e84b0a8245 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Metric.cs @@ -0,0 +1,7 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types; + +public class Metric +{ + public required string Key { get; set; } + public required string DisplayName { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateIdentityRequest.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateIdentityRequest.cs new file mode 100644 index 0000000000..b203897e36 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateIdentityRequest.cs @@ -0,0 +1,10 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Requests; + +public class CreateIdentityRequest +{ + public required string ClientId { get; set; } + public required string ClientSecret { get; set; } + public required byte[] IdentityPublicKey { get; set; } + public required string DevicePassword { get; set; } + public required byte IdentityVersion { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateQuotaForIdentityRequest.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateQuotaForIdentityRequest.cs new file mode 100644 index 0000000000..cc75705347 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Requests/CreateQuotaForIdentityRequest.cs @@ -0,0 +1,8 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Requests; + +public class CreateQuotaForIdentityRequest +{ + public required string MetricKey { get; set; } + public required int Max { get; set; } + public required string Period { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Requests/UpdateIdentityTierRequest.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Requests/UpdateIdentityTierRequest.cs new file mode 100644 index 0000000000..f493f9c550 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Requests/UpdateIdentityTierRequest.cs @@ -0,0 +1,6 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Requests; + +public class UpdateIdentityTierRequest +{ + public required string TierId { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Responses/CreateIdentityResponse.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Responses/CreateIdentityResponse.cs new file mode 100644 index 0000000000..79453ada26 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Responses/CreateIdentityResponse.cs @@ -0,0 +1,15 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Responses; + +public class CreateIdentityResponse +{ + public required string Address { get; set; } + public required DateTime CreatedAt { get; set; } + public required CreateIdentityResponseDevice Device { get; set; } +} + +public class CreateIdentityResponseDevice +{ + public required string Id { get; set; } + public required string Username { get; set; } + public required DateTime CreatedAt { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Responses/GetIdentityResponse.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Responses/GetIdentityResponse.cs new file mode 100644 index 0000000000..7dd21f981f --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Responses/GetIdentityResponse.cs @@ -0,0 +1,38 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Responses; + +public class GetIdentityResponse +{ + public required string Address { get; set; } + public string? ClientId { get; set; } + public required byte[] PublicKey { get; set; } + public required string TierId { get; set; } + public required DateTime CreatedAt { get; set; } + public required byte IdentityVersion { get; set; } + public required int NumberOfDevices { get; set; } + public required List Devices { get; set; } + public required List Quotas { get; set; } +} + +public class Device +{ + public required string Id { get; set; } + public required string Username { get; set; } + public required DateTime CreatedAt { get; set; } + public required string CreatedByDevice { get; set; } + public required LastLoginInformation LastLogin { get; set; } +} + +public class LastLoginInformation +{ + public DateTime? Time { get; set; } +} + +public class Quota +{ + public required string Id { get; set; } + public required string Source { get; set; } + public required Metric Metric { get; set; } + public required int Max { get; set; } + public required uint Usage { get; set; } + public required string Period { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Identities/Types/Responses/StartDeletionProcessAsSupportResponse.cs b/AdminApi.Sdk/Endpoints/Identities/Types/Responses/StartDeletionProcessAsSupportResponse.cs new file mode 100644 index 0000000000..952ee19347 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Identities/Types/Responses/StartDeletionProcessAsSupportResponse.cs @@ -0,0 +1,8 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Identities.Types.Responses; + +public class StartDeletionProcessAsSupportResponse +{ + public required string Id { get; set; } + public required string Status { get; set; } + public required DateTime CreatedAt { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Logs/LogsEndpoint.cs b/AdminApi.Sdk/Endpoints/Logs/LogsEndpoint.cs new file mode 100644 index 0000000000..f6a12a68e9 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Logs/LogsEndpoint.cs @@ -0,0 +1,10 @@ +using Backbone.AdminApi.Sdk.Endpoints.Logs.Types.Requests; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Logs; + +public class LogsEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> CreateLog(LogRequest request) => await _client.Post("Logs", request); +} diff --git a/AdminApi.Sdk/Endpoints/Logs/Types/Requests/LogRequest.cs b/AdminApi.Sdk/Endpoints/Logs/Types/Requests/LogRequest.cs new file mode 100644 index 0000000000..566c3103df --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Logs/Types/Requests/LogRequest.cs @@ -0,0 +1,20 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Logs.Types.Requests; + +public class LogRequest +{ + public required LogLevel LogLevel { get; set; } + public required string Category { get; set; } + public required string MessageTemplate { get; set; } + public object[] Arguments { get; set; } = []; +} + +public enum LogLevel +{ + Trace, + Debug, + Information, + Log, + Warning, + Error, + Critical +} diff --git a/AdminApi.Sdk/Endpoints/Metrics/MetricsEndpoint.cs b/AdminApi.Sdk/Endpoints/Metrics/MetricsEndpoint.cs new file mode 100644 index 0000000000..8011a5f7a1 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Metrics/MetricsEndpoint.cs @@ -0,0 +1,10 @@ +using Backbone.AdminApi.Sdk.Endpoints.Metrics.Types.Responses; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Metrics; + +public class MetricsEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> GetAllMetrics() => await _client.Get("Metrics"); +} diff --git a/AdminApi.Sdk/Endpoints/Metrics/Types/Responses/ListMetricsResponse.cs b/AdminApi.Sdk/Endpoints/Metrics/Types/Responses/ListMetricsResponse.cs new file mode 100644 index 0000000000..e75b7ffb7e --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Metrics/Types/Responses/ListMetricsResponse.cs @@ -0,0 +1,6 @@ +using Backbone.AdminApi.Sdk.Endpoints.Identities.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Metrics.Types.Responses; + +public class ListMetricsResponse : EnumerableResponseBase; diff --git a/AdminApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs b/AdminApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs new file mode 100644 index 0000000000..ea95018277 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs @@ -0,0 +1,18 @@ +using Backbone.AdminApi.Sdk.Endpoints.Relationships.Types.Responses; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Relationships; + +public class RelationshipsEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> GetAllRelationships(PaginationFilter? pagination = null) + => await _client.Get("Relationships", null, pagination); + + public async Task> GetAllRelationships(string participant, PaginationFilter? pagination = null) => await _client + .Request(HttpMethod.Get, "Relationships") + .Authenticate() + .WithPagination(pagination) + .AddQueryParameter("participant", participant) + .Execute(); +} diff --git a/AdminApi.Sdk/Endpoints/Relationships/Types/Relationship.cs b/AdminApi.Sdk/Endpoints/Relationships/Types/Relationship.cs new file mode 100644 index 0000000000..3f37364ccd --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Relationships/Types/Relationship.cs @@ -0,0 +1,13 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Relationships.Types; + +public class Relationship +{ + public required string Peer { get; set; } + public required string RequestedBy { get; set; } + public required string TemplateId { get; set; } + public required string Status { get; set; } + public required DateTime CreationDate { get; set; } + public DateTime? AnsweredAt { get; set; } + public required string CreatedByDevice { get; set; } + public string? AnsweredByDevice { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs b/AdminApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs new file mode 100644 index 0000000000..aabe0b02d9 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs @@ -0,0 +1,5 @@ +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Relationships.Types.Responses; + +public class ListRelationshipsResponse : EnumerableResponseBase; diff --git a/AdminApi.Sdk/Endpoints/Tiers/TiersEndpoint.cs b/AdminApi.Sdk/Endpoints/Tiers/TiersEndpoint.cs new file mode 100644 index 0000000000..0bc62723e4 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/TiersEndpoint.cs @@ -0,0 +1,24 @@ +using Backbone.AdminApi.Sdk.Endpoints.Tiers.Types; +using Backbone.AdminApi.Sdk.Endpoints.Tiers.Types.Requests; +using Backbone.AdminApi.Sdk.Endpoints.Tiers.Types.Responses; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers; + +public class TiersEndpoint(EndpointClient client) : Endpoint(client) +{ + public async Task> ListTiers() => await _client.Get("Tiers"); + + public async Task> GetTier(string id) => await _client.Get($"Tiers/{id}"); + + public async Task> CreateTier(CreateTierRequest request) => await _client.Post("Tiers", request); + + public async Task> DeleteTier(string id) => await _client.Delete($"Tiers/{id}"); + + public async Task> AddTierQuota(string id, CreateQuotaForTierRequest request) + => await _client.Post($"Tiers/{id}/Quotas", request); + + public async Task> DeleteTierQuota(string id, string quotaId) + => await _client.Delete($"Tiers/{id}/Quotas/{quotaId}"); +} diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateQuotaForTierRequest.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateQuotaForTierRequest.cs new file mode 100644 index 0000000000..e26a892d77 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateQuotaForTierRequest.cs @@ -0,0 +1,8 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types.Requests; + +public class CreateQuotaForTierRequest +{ + public required string MetricKey { get; set; } + public required int Max { get; set; } + public required string Period { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateTierRequest.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateTierRequest.cs new file mode 100644 index 0000000000..529eefef81 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/Requests/CreateTierRequest.cs @@ -0,0 +1,6 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types.Requests; + +public class CreateTierRequest +{ + public required string Name { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/Responses/ListTiersResponse.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/Responses/ListTiersResponse.cs new file mode 100644 index 0000000000..412a29b376 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/Responses/ListTiersResponse.cs @@ -0,0 +1,5 @@ +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types.Responses; + +public class ListTiersResponse : EnumerableResponseBase; diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/Tier.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/Tier.cs new file mode 100644 index 0000000000..04c33fa3e8 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/Tier.cs @@ -0,0 +1,7 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types; + +public class Tier +{ + public required string Id { get; set; } + public required string Name { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/TierDetails.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/TierDetails.cs new file mode 100644 index 0000000000..175ec400b2 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/TierDetails.cs @@ -0,0 +1,10 @@ +using Backbone.AdminApi.Sdk.Endpoints.Identities.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types; + +public class TierDetails +{ + public required string Id { get; set; } + public required string Name { get; set; } + public required List Quotas { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/TierOverview.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/TierOverview.cs new file mode 100644 index 0000000000..5b2d5428c8 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/TierOverview.cs @@ -0,0 +1,8 @@ +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types; + +public class TierOverview +{ + public required string Id { get; set; } + public required string Name { get; set; } + public required int NumberOfIdentities { get; set; } +} diff --git a/AdminApi.Sdk/Endpoints/Tiers/Types/TierQuotaDefinition.cs b/AdminApi.Sdk/Endpoints/Tiers/Types/TierQuotaDefinition.cs new file mode 100644 index 0000000000..3492f05477 --- /dev/null +++ b/AdminApi.Sdk/Endpoints/Tiers/Types/TierQuotaDefinition.cs @@ -0,0 +1,11 @@ +using Backbone.AdminApi.Sdk.Endpoints.Identities.Types; + +namespace Backbone.AdminApi.Sdk.Endpoints.Tiers.Types; + +public class TierQuotaDefinition +{ + public required string Id { get; set; } + public required Metric Metric { get; set; } + public required int Max { get; set; } + public required string Period { get; set; } +} diff --git a/AdminApi/src/AdminApi/Controllers/IdentitiesController.cs b/AdminApi/src/AdminApi/Controllers/IdentitiesController.cs index f57bf3aa3e..b15e38e8a4 100644 --- a/AdminApi/src/AdminApi/Controllers/IdentitiesController.cs +++ b/AdminApi/src/AdminApi/Controllers/IdentitiesController.cs @@ -96,8 +96,8 @@ public async Task CreateIdentity(CreateIdentityRequest request, C IdentityVersion = request.IdentityVersion, SignedChallenge = new SignedChallengeDTO { - Challenge = request.SignedChallenge.Challenge, - Signature = request.SignedChallenge.Signature + Challenge = "-", + Signature = [0] }, ShouldValidateChallenge = false }; @@ -111,7 +111,7 @@ public async Task CreateIdentity(CreateIdentityRequest request, C [ProducesResponseType(StatusCodes.Status201Created)] [ProducesError(StatusCodes.Status400BadRequest)] [ProducesError(StatusCodes.Status404NotFound)] - public async Task StartDeletionProcessAsSupport([FromRoute] string address, CancellationToken cancellationToken) + public async Task StartDeletionProcess([FromRoute] string address, CancellationToken cancellationToken) { var response = await _mediator.Send(new StartDeletionProcessAsSupportCommand(address), cancellationToken); return Created("", response); @@ -177,11 +177,4 @@ public class CreateIdentityRequest public required byte[] IdentityPublicKey { get; set; } public required string DevicePassword { get; set; } public required byte IdentityVersion { get; set; } - public required CreateIdentityRequestSignedChallenge SignedChallenge { get; set; } -} - -public class CreateIdentityRequestSignedChallenge -{ - public required string Challenge { get; set; } - public required byte[] Signature { get; set; } } diff --git a/Backbone.sln b/Backbone.sln index d93caef3ac..9e66ee85a5 100644 --- a/Backbone.sln +++ b/Backbone.sln @@ -1,808 +1,817 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.4.33122.133 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Challenges", "Challenges", "{DF1C4335-5043-4365-B753-6A8698528E4B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildingBlocks", "BuildingBlocks", "{13BA71F8-58D7-45F6-997D-4DE87E7B41F3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{06D714AE-EDF4-421C-9340-EDA6FCDF491F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{76F6B614-D605-427C-ADFE-0A6D63A3858B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Application", "BuildingBlocks\src\BuildingBlocks.Application\BuildingBlocks.Application.csproj", "{B9616684-0252-428D-8D64-CAFC8708F7D1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tooling", "BuildingBlocks\src\Tooling\Tooling.csproj", "{2D4AF534-2435-4FD0-88EC-690227F26172}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Application.Abstractions", "BuildingBlocks\src\BuildingBlocks.Application.Abstractions\BuildingBlocks.Application.Abstractions.csproj", "{9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Infrastructure", "Modules\Challenges\src\Challenges.Infrastructure\Challenges.Infrastructure.csproj", "{15150029-9E3F-4211-9BF4-DEC868BB0F0E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Application", "Modules\Challenges\src\Challenges.Application\Challenges.Application.csproj", "{37800063-6675-46B2-8C84-B2F35728C5CE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Domain", "Modules\Challenges\src\Challenges.Domain\Challenges.Domain.csproj", "{8A21954E-99F6-484A-B7C4-32AC71108285}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevelopmentKit.Identity", "BuildingBlocks\src\DevelopmentKit.Identity\DevelopmentKit.Identity.csproj", "{6275041A-FF15-44C4-8386-4D42A234C890}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Infrastructure", "BuildingBlocks\src\BuildingBlocks.Infrastructure\BuildingBlocks.Infrastructure.csproj", "{F157A154-8E45-443C-8021-29BE9D32325F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E4B0D1F2-8AD5-481D-96EE-AC2EE7B85A51}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - .env = .env - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{197F5C0C-A042-42F9-AE83-057640AA4036}" -EndProject -Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose\docker-compose.dcproj", "{24644042-C274-4A5F-8F40-463ADC3E7B34}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{0EAF57B8-E97C-469E-A74B-596D78C978B2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{557BD815-AC5A-4880-9455-F0CE4F493EAD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Application", "Modules\Files\src\Files.Application\Files.Application.csproj", "{1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Domain", "Modules\Files\src\Files.Domain\Files.Domain.csproj", "{F08D7B60-A643-4277-AD67-DBD50F9D4B87}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Infrastructure", "Modules\Files\src\Files.Infrastructure\Files.Infrastructure.csproj", "{70F69EC1-1374-49D2-88AB-111B62664B27}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Messages", "Messages", "{10FD6076-863A-4197-B7D5-EC91061F8DD2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Relationships", "Relationships", "{1094EE0F-A767-429C-8A99-1C0D3FFABC52}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tokens", "Tokens", "{6A9D0121-D0FC-41B8-8BC4-697176646DA7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Synchronization", "Synchronization", "{AB0FB8CB-C232-459F-A6C8-01B574E96D70}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Application", "Modules\Messages\src\Messages.Application\Messages.Application.csproj", "{D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Common", "Modules\Messages\src\Messages.Common\Messages.Common.csproj", "{7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Domain", "Modules\Messages\src\Messages.Domain\Messages.Domain.csproj", "{CF623BC9-660E-49D1-B215-B2B285F67DA3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Infrastructure", "Modules\Messages\src\Messages.Infrastructure\Messages.Infrastructure.csproj", "{C880254A-1775-40F7-9E70-D6B627C58D04}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Application", "Modules\Relationships\src\Relationships.Application\Relationships.Application.csproj", "{1524655C-99D8-41DF-B80B-B7666CBE6B6C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Common", "Modules\Relationships\src\Relationships.Common\Relationships.Common.csproj", "{3C60925D-A9CE-4957-9C27-C2043A7A42F0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Domain", "Modules\Relationships\src\Relationships.Domain\Relationships.Domain.csproj", "{A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Infrastructure", "Modules\Relationships\src\Relationships.Infrastructure\Relationships.Infrastructure.csproj", "{2B504170-1CA6-463B-955A-028EABF70B89}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Application", "Modules\Synchronization\src\Synchronization.Application\Synchronization.Application.csproj", "{93105D4E-D13D-4878-8207-8F6C0CD75D60}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Domain", "Modules\Synchronization\src\Synchronization.Domain\Synchronization.Domain.csproj", "{C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Infrastructure", "Modules\Synchronization\src\Synchronization.Infrastructure\Synchronization.Infrastructure.csproj", "{C78F3C29-514E-411B-AB80-B484186EF88E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Application", "Modules\Tokens\src\Tokens.Application\Tokens.Application.csproj", "{006E287E-E685-43C2-A379-1DB78C06DCD8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Domain", "Modules\Tokens\src\Tokens.Domain\Tokens.Domain.csproj", "{B643D89D-A4ED-4C36-9D18-060096C1F37D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Infrastructure", "Modules\Tokens\src\Tokens.Infrastructure\Tokens.Infrastructure.csproj", "{4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Devices", "Devices", "{8D25581A-C9DD-4DED-A1DB-A26CD9239666}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Application.Tests", "BuildingBlocks\test\BuildingBlocks.Application.Tests\BuildingBlocks.Application.Tests.csproj", "{6E326CDD-7992-487E-A840-987929DC79EF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Infrastructure.Tests", "BuildingBlocks\test\BuildingBlocks.Infrastructure.Tests\BuildingBlocks.Infrastructure.Tests.csproj", "{35B85FC1-3134-4FE5-815E-F7C4282C6991}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crypto.Tests", "BuildingBlocks\test\Crypto.Tests\Crypto.Tests.csproj", "{6932B4A6-A8D8-4F0B-9338-520F6488925E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevelopmentKit.Identity.Tests", "BuildingBlocks\test\DevelopmentKit.Identity.Tests\DevelopmentKit.Identity.Tests.csproj", "{AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StronglyTypedIds.Tests", "BuildingBlocks\test\StronglyTypedIds.Tests\StronglyTypedIds.Tests.csproj", "{49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tooling.Tests", "BuildingBlocks\test\Tooling.Tests\Tooling.Tests.csproj", "{33AF4A60-5E10-4F84-93A5-E724D013CFC3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.API", "BuildingBlocks\src\BuildingBlocks.API\BuildingBlocks.API.csproj", "{EB4F2036-B4F2-4DEF-838C-480BFF3635E4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crypto", "BuildingBlocks\src\Crypto\Crypto.csproj", "{6F58D49A-BDF4-4599-9584-AC7A4134838E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTestTools", "BuildingBlocks\src\UnitTestTools\UnitTestTools.csproj", "{A5BC6269-E1FC-4F91-B1D2-5B4F90571531}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Application.Tests", "Modules\Tokens\test\Tokens.Application.Tests\Tokens.Application.Tests.csproj", "{0BA6342E-C2BE-450C-848B-D4A9898A09F9}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{1E437DEA-7657-48AD-ADA0-7B86608E0768}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{903C38CB-C2E2-42D2-9277-74CE675551E8}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1FEB1A37-59AD-403D-B7EC-50AD796BB25C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Application.Tests", "Modules\Synchronization\test\Synchronization.Application.Tests\Synchronization.Application.Tests.csproj", "{025B87CC-EDA5-4D82-852E-983A433941FD}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Domain.Tests", "Modules\Synchronization\test\Synchronization.Domain.Tests\Synchronization.Domain.Tests.csproj", "{6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C790AF37-65C9-4E9C-A7E1-B57560411EF2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9ED99444-B4ED-43AA-852B-BBC6E4D04C23}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Application.Tests", "Modules\Relationships\test\Relationships.Application.Tests\Relationships.Application.Tests.csproj", "{6B9696B7-02BE-44D1-B48F-4A50C11674D6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Domain.Tests", "Modules\Relationships\test\Relationships.Domain.Tests\Relationships.Domain.Tests.csproj", "{D74436AD-38BD-409F-A36B-A3923206A77A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{BBE908B0-D642-4002-8A88-9F1726BA8CB6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Application.Tests", "Modules\Messages\test\Messages.Application.Tests\Messages.Application.Tests.csproj", "{2448ABCE-EE9F-44D4-9217-2403EB16CDA4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3D324161-C287-4DC0-A9FD-FA3B1A6643FD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Application.Tests", "Modules\Files\test\Files.Application.Tests\Files.Application.Tests.csproj", "{90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AAE79377-8414-4C23-BF0C-678B68A24BC7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F31B1655-A11B-4F30-9BC7-7418B8B915D7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Jobs.Cleanup", "Modules\Challenges\src\Challenges.Jobs.Cleanup\Challenges.Jobs.Cleanup.csproj", "{4CBCD092-484C-4A80-8ACD-5666AC41C6AD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{EFC1F89E-1C44-4385-A0F6-1F2124260561}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Backbone.Tests.ArchUnit", "Backbone.Tests.ArchUnit\Backbone.Tests.ArchUnit.csproj", "{4525765E-C15C-44E8-BE87-D8B06213ACFF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Application", "Modules\Devices\src\Devices.Application\Devices.Application.csproj", "{BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Domain", "Modules\Devices\src\Devices.Domain\Devices.Domain.csproj", "{4E15A31F-57BC-420E-809D-35F7F0B834BC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure", "Modules\Devices\src\Devices.Infrastructure\Devices.Infrastructure.csproj", "{B81FA22E-957A-45DE-95C6-60B88080B3C0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Infrastructure.Database.Postgres", "Modules\Relationships\src\Relationships.Infrastructure.Database.Postgres\Relationships.Infrastructure.Database.Postgres.csproj", "{49848C95-B8A3-45A4-BF4B-B2C182F58521}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Infrastructure.Database.SqlServer", "Modules\Relationships\src\Relationships.Infrastructure.Database.SqlServer\Relationships.Infrastructure.Database.SqlServer.csproj", "{DE89033E-BB74-43C0-8983-F07E5C75C8AE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Infrastructure.Database.SqlServer", "Modules\Messages\src\Messages.Infrastructure.Database.SqlServer\Messages.Infrastructure.Database.SqlServer.csproj", "{E045E08A-4F57-4249-8F13-66BE5F19E1E5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Infrastructure.Database.Postgres", "Modules\Messages\src\Messages.Infrastructure.Database.Postgres\Messages.Infrastructure.Database.Postgres.csproj", "{77EEA619-2203-427D-A00D-11AA70B6104B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Infrastructure.Database.SqlServer", "Modules\Files\src\Files.Infrastructure.Database.SqlServer\Files.Infrastructure.Database.SqlServer.csproj", "{EE4AC915-F377-4001-834A-6760B4403415}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Infrastructure.Database.Postgres", "Modules\Files\src\Files.Infrastructure.Database.Postgres\Files.Infrastructure.Database.Postgres.csproj", "{92D57E34-502F-4CE3-AC43-3E8A53B2FC91}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Infrastructure.Database.SqlServer", "Modules\Synchronization\src\Synchronization.Infrastructure.Database.SqlServer\Synchronization.Infrastructure.Database.SqlServer.csproj", "{BFE78AAC-6275-45EB-9B73-07958BB5AFD1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Infrastructure.Database.Postgres", "Modules\Synchronization\src\Synchronization.Infrastructure.Database.Postgres\Synchronization.Infrastructure.Database.Postgres.csproj", "{225ABDC8-3612-4236-A2D0-19C1C3638BE1}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Infrastructure.Database.SqlServer", "Modules\Tokens\src\Tokens.Infrastructure.Database.SqlServer\Tokens.Infrastructure.Database.SqlServer.csproj", "{05279D11-8B1A-4C97-9F57-750740803C28}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Infrastructure.Database.Postgres", "Modules\Tokens\src\Tokens.Infrastructure.Database.Postgres\Tokens.Infrastructure.Database.Postgres.csproj", "{3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure.Database.SqlServer", "Modules\Devices\src\Devices.Infrastructure.Database.SqlServer\Devices.Infrastructure.Database.SqlServer.csproj", "{5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure.Database.Postgres", "Modules\Devices\src\Devices.Infrastructure.Database.Postgres\Devices.Infrastructure.Database.Postgres.csproj", "{58706D00-9A53-4CC4-8201-46C3CEDCE8F9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Infrastructure.Database.Postgres", "Modules\Challenges\src\Challenges.Infrastructure.Database.Postgres\Challenges.Infrastructure.Database.Postgres.csproj", "{7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Infrastructure.Database.SqlServer", "Modules\Challenges\src\Challenges.Infrastructure.Database.SqlServer\Challenges.Infrastructure.Database.SqlServer.csproj", "{82493577-AB78-4338-BE4D-851EEAF8E1A7}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Application.Tests", "Modules\Devices\test\Devices.Application.Tests\Devices.Application.Tests.csproj", "{40F14114-44B0-4EE0-A653-6C8205F6F28C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure.Tests", "Modules\Devices\test\Devices.Infrastructure.Tests\Devices.Infrastructure.Tests.csproj", "{19BE44FE-8852-40DD-AE70-EFA8B1E28730}" - ProjectSection(ProjectDependencies) = postProject - {A5BC6269-E1FC-4F91-B1D2-5B4F90571531} = {A5BC6269-E1FC-4F91-B1D2-5B4F90571531} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.AdminCli", "Modules\Devices\src\Devices.AdminCli\Devices.AdminCli.csproj", "{E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Jobs.SanityCheck", "Modules\Files\src\Files.Jobs.SanityCheck\Files.Jobs.SanityCheck.csproj", "{1BB56A85-74F8-497F-983C-274D51B25CF4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Jobs.SanityCheck.Tests", "Modules\Files\test\Files.Jobs.SanityCheck.Tests\Files.Jobs.SanityCheck.Tests.csproj", "{6289332A-DBF2-4B99-BEFB-AC01A4C9D262}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Domain", "BuildingBlocks\src\BuildingBlocks.Domain\BuildingBlocks.Domain.csproj", "{360430CE-6850-4A67-88ED-E9508B7D2658}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Quotas", "Quotas", "{78F88787-78AB-41E5-9A64-6B77B6CCFBCD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C258DF5B-0AE0-4DDF-9284-60671699C6ED}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Application", "Modules\Quotas\src\Quotas.Application\Quotas.Application.csproj", "{800B5CBB-4860-42D3-9F6C-293670ED5936}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Domain", "Modules\Quotas\src\Quotas.Domain\Quotas.Domain.csproj", "{6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure", "Modules\Quotas\src\Quotas.Infrastructure\Quotas.Infrastructure.csproj", "{A326741C-C030-4535-BA73-2B508E337CF0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure.Database.Postgres", "Modules\Quotas\src\Quotas.Infrastructure.Database.Postgres\Quotas.Infrastructure.Database.Postgres.csproj", "{B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure.Database.SqlServer", "Modules\Quotas\src\Quotas.Infrastructure.Database.SqlServer\Quotas.Infrastructure.Database.SqlServer.csproj", "{E2262502-F55A-4967-9D09-30F670BBB045}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4192A28C-45C0-4D20-B880-F417B8AB752F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Application.Tests", "Modules\Quotas\test\Quotas.Application.Tests\Quotas.Application.Tests.csproj", "{78711621-A1FE-4868-8BB1-B886E1AB3879}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Domain.Tests", "Modules\Quotas\test\Quotas.Domain.Tests\Quotas.Domain.Tests.csproj", "{C7DFAE72-C164-43A6-8C81-FCCA4582710B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Domain.Tests", "Modules\Devices\test\Devices.Domain.Tests\Devices.Domain.Tests.csproj", "{06C80BAE-3B73-49C0-9420-CDB7EA969058}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.ConsumerApi", "Modules\Challenges\src\Challenges.ConsumerApi\Challenges.ConsumerApi.csproj", "{84BA182A-6E24-4437-A7DB-13D2D675E14B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.ConsumerApi", "Modules\Files\src\Files.ConsumerApi\Files.ConsumerApi.csproj", "{B301A0EE-BFA9-4268-8DC3-4F5865992543}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.ConsumerApi", "Modules\Messages\src\Messages.ConsumerApi\Messages.ConsumerApi.csproj", "{762E3613-2C9D-412B-B17D-9C087E9CF419}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.ConsumerApi", "Modules\Relationships\src\Relationships.ConsumerApi\Relationships.ConsumerApi.csproj", "{60CAE514-B713-4F3F-8B5D-D3BB34E3805F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.ConsumerApi", "Modules\Synchronization\src\Synchronization.ConsumerApi\Synchronization.ConsumerApi.csproj", "{0C2FA416-00D3-4E1E-87B1-C7E48E162B01}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.ConsumerApi", "Modules\Tokens\src\Tokens.ConsumerApi\Tokens.ConsumerApi.csproj", "{E57EB47C-41CF-4956-835F-D933A0D97D8A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.ConsumerApi", "Modules\Quotas\src\Quotas.ConsumerApi\Quotas.ConsumerApi.csproj", "{66694B90-62FA-410F-8178-AC1641DB8D11}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.ConsumerApi", "Modules\Devices\src\Devices.ConsumerApi\Devices.ConsumerApi.csproj", "{8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AdminApi", "AdminApi", "{285E30DF-68B4-4A13-981E-E8BAB05489F5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ConsumerApi", "ConsumerApi", "{E6BFD37D-335D-4975-B661-BC67FB82F5AA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{B147B99D-3FC7-4D99-A3B7-796AA9FA126C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AC21BC09-864E-4C35-A8BE-8575A9C14134}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Infrastructure", "Common\src\Common.Infrastructure\Common.Infrastructure.csproj", "{67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsumerApi", "ConsumerApi\ConsumerApi.csproj", "{F2823AB7-4361-437F-A5C7-D06540BCB362}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsumerApi.Tests.Integration", "ConsumerApi.Tests.Integration\ConsumerApi.Tests.Integration.csproj", "{30CFBC0E-D72A-4890-9647-D488273B0F68}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "HealthCheck\HealthCheck.csproj", "{EE910828-296B-45CD-BA01-DCABE27BCC4C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure.Tests", "Modules\Quotas\test\Quotas.Infrastructure.Tests\Quotas.Infrastructure.Tests.csproj", "{FB38C7C5-9F11-43BB-871F-E2E0360FD993}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jobs", "Jobs", "{A960F984-B1A3-403E-B2BA-7C4F6287D91F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9599F729-2B1F-4E96-83F4-C20D0CA1C61B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4F812E23-62EB-4B79-8ECA-5CA72CF5D3BC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Job.IdentityDeletion", "Jobs\src\Job.IdentityDeletion\Job.IdentityDeletion.csproj", "{34F64873-2412-4835-BA68-D2B278FD120E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Job.IdentityDeletion.Tests", "Jobs\test\Job.IdentityDeletion.Tests\Job.IdentityDeletion.Tests.csproj", "{B996F6B2-D31E-4312-A98B-AD6D604B6825}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi", "AdminApi\src\AdminApi\AdminApi.csproj", "{5949DB91-5528-4547-B0EA-634FEDCC9904}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4E66D5C4-1EF2-4605-BBA3-F99BF90E973F}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E7576FD6-32FA-4EA7-AFDB-0D74F37044A0}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Tests.Integration", "AdminApi\test\AdminApi.Tests.Integration\AdminApi.Tests.Integration.csproj", "{7B42684C-9846-4769-814B-5F96C8A7CE82}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsumerApi.Sdk", "ConsumerApi.Sdk\ConsumerApi.Sdk.csproj", "{76956954-B37E-4055-B5F5-CF2FFD473598}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Infrastructure", "AdminApi\src\AdminApi.Infrastructure\AdminApi.Infrastructure.csproj", "{EC79D227-E181-43D1-8D61-0503AB17B689}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Infrastructure.Database.Postgres", "AdminApi\src\AdminApi.Infrastructure.Database.Postgres\AdminApi.Infrastructure.Database.Postgres.csproj", "{D3DCCA97-80ED-4362-A344-EC0305F356A6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Infrastructure.Database.SqlServer", "AdminApi\src\AdminApi.Infrastructure.Database.SqlServer\AdminApi.Infrastructure.Database.SqlServer.csproj", "{5EB516C8-510A-437E-8E68-88431717AFC1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B9616684-0252-428D-8D64-CAFC8708F7D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9616684-0252-428D-8D64-CAFC8708F7D1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9616684-0252-428D-8D64-CAFC8708F7D1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9616684-0252-428D-8D64-CAFC8708F7D1}.Release|Any CPU.Build.0 = Release|Any CPU - {2D4AF534-2435-4FD0-88EC-690227F26172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D4AF534-2435-4FD0-88EC-690227F26172}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D4AF534-2435-4FD0-88EC-690227F26172}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D4AF534-2435-4FD0-88EC-690227F26172}.Release|Any CPU.Build.0 = Release|Any CPU - {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Release|Any CPU.Build.0 = Release|Any CPU - {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Release|Any CPU.Build.0 = Release|Any CPU - {37800063-6675-46B2-8C84-B2F35728C5CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {37800063-6675-46B2-8C84-B2F35728C5CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37800063-6675-46B2-8C84-B2F35728C5CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {37800063-6675-46B2-8C84-B2F35728C5CE}.Release|Any CPU.Build.0 = Release|Any CPU - {8A21954E-99F6-484A-B7C4-32AC71108285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8A21954E-99F6-484A-B7C4-32AC71108285}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8A21954E-99F6-484A-B7C4-32AC71108285}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8A21954E-99F6-484A-B7C4-32AC71108285}.Release|Any CPU.Build.0 = Release|Any CPU - {6275041A-FF15-44C4-8386-4D42A234C890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6275041A-FF15-44C4-8386-4D42A234C890}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6275041A-FF15-44C4-8386-4D42A234C890}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6275041A-FF15-44C4-8386-4D42A234C890}.Release|Any CPU.Build.0 = Release|Any CPU - {F157A154-8E45-443C-8021-29BE9D32325F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F157A154-8E45-443C-8021-29BE9D32325F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F157A154-8E45-443C-8021-29BE9D32325F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F157A154-8E45-443C-8021-29BE9D32325F}.Release|Any CPU.Build.0 = Release|Any CPU - {197F5C0C-A042-42F9-AE83-057640AA4036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {197F5C0C-A042-42F9-AE83-057640AA4036}.Debug|Any CPU.Build.0 = Debug|Any CPU - {197F5C0C-A042-42F9-AE83-057640AA4036}.Release|Any CPU.ActiveCfg = Release|Any CPU - {197F5C0C-A042-42F9-AE83-057640AA4036}.Release|Any CPU.Build.0 = Release|Any CPU - {24644042-C274-4A5F-8F40-463ADC3E7B34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {24644042-C274-4A5F-8F40-463ADC3E7B34}.Debug|Any CPU.Build.0 = Debug|Any CPU - {24644042-C274-4A5F-8F40-463ADC3E7B34}.Release|Any CPU.ActiveCfg = Release|Any CPU - {24644042-C274-4A5F-8F40-463ADC3E7B34}.Release|Any CPU.Build.0 = Release|Any CPU - {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Release|Any CPU.Build.0 = Release|Any CPU - {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Release|Any CPU.Build.0 = Release|Any CPU - {70F69EC1-1374-49D2-88AB-111B62664B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {70F69EC1-1374-49D2-88AB-111B62664B27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {70F69EC1-1374-49D2-88AB-111B62664B27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {70F69EC1-1374-49D2-88AB-111B62664B27}.Release|Any CPU.Build.0 = Release|Any CPU - {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Release|Any CPU.Build.0 = Release|Any CPU - {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Release|Any CPU.Build.0 = Release|Any CPU - {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Release|Any CPU.Build.0 = Release|Any CPU - {C880254A-1775-40F7-9E70-D6B627C58D04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C880254A-1775-40F7-9E70-D6B627C58D04}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C880254A-1775-40F7-9E70-D6B627C58D04}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C880254A-1775-40F7-9E70-D6B627C58D04}.Release|Any CPU.Build.0 = Release|Any CPU - {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Release|Any CPU.Build.0 = Release|Any CPU - {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Release|Any CPU.Build.0 = Release|Any CPU - {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Release|Any CPU.Build.0 = Release|Any CPU - {2B504170-1CA6-463B-955A-028EABF70B89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B504170-1CA6-463B-955A-028EABF70B89}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B504170-1CA6-463B-955A-028EABF70B89}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B504170-1CA6-463B-955A-028EABF70B89}.Release|Any CPU.Build.0 = Release|Any CPU - {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Debug|Any CPU.Build.0 = Debug|Any CPU - {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Release|Any CPU.ActiveCfg = Release|Any CPU - {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Release|Any CPU.Build.0 = Release|Any CPU - {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Release|Any CPU.Build.0 = Release|Any CPU - {C78F3C29-514E-411B-AB80-B484186EF88E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C78F3C29-514E-411B-AB80-B484186EF88E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C78F3C29-514E-411B-AB80-B484186EF88E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C78F3C29-514E-411B-AB80-B484186EF88E}.Release|Any CPU.Build.0 = Release|Any CPU - {006E287E-E685-43C2-A379-1DB78C06DCD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {006E287E-E685-43C2-A379-1DB78C06DCD8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {006E287E-E685-43C2-A379-1DB78C06DCD8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {006E287E-E685-43C2-A379-1DB78C06DCD8}.Release|Any CPU.Build.0 = Release|Any CPU - {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Release|Any CPU.Build.0 = Release|Any CPU - {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Release|Any CPU.Build.0 = Release|Any CPU - {6E326CDD-7992-487E-A840-987929DC79EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6E326CDD-7992-487E-A840-987929DC79EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6E326CDD-7992-487E-A840-987929DC79EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6E326CDD-7992-487E-A840-987929DC79EF}.Release|Any CPU.Build.0 = Release|Any CPU - {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Debug|Any CPU.Build.0 = Debug|Any CPU - {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Release|Any CPU.ActiveCfg = Release|Any CPU - {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Release|Any CPU.Build.0 = Release|Any CPU - {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Release|Any CPU.Build.0 = Release|Any CPU - {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Release|Any CPU.Build.0 = Release|Any CPU - {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Release|Any CPU.Build.0 = Release|Any CPU - {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Release|Any CPU.Build.0 = Release|Any CPU - {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Release|Any CPU.Build.0 = Release|Any CPU - {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Release|Any CPU.Build.0 = Release|Any CPU - {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Release|Any CPU.Build.0 = Release|Any CPU - {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Release|Any CPU.Build.0 = Release|Any CPU - {025B87CC-EDA5-4D82-852E-983A433941FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {025B87CC-EDA5-4D82-852E-983A433941FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {025B87CC-EDA5-4D82-852E-983A433941FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {025B87CC-EDA5-4D82-852E-983A433941FD}.Release|Any CPU.Build.0 = Release|Any CPU - {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Release|Any CPU.Build.0 = Release|Any CPU - {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Release|Any CPU.Build.0 = Release|Any CPU - {D74436AD-38BD-409F-A36B-A3923206A77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D74436AD-38BD-409F-A36B-A3923206A77A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D74436AD-38BD-409F-A36B-A3923206A77A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D74436AD-38BD-409F-A36B-A3923206A77A}.Release|Any CPU.Build.0 = Release|Any CPU - {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Release|Any CPU.Build.0 = Release|Any CPU - {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Release|Any CPU.Build.0 = Release|Any CPU - {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Release|Any CPU.Build.0 = Release|Any CPU - {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Release|Any CPU.Build.0 = Release|Any CPU - {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Release|Any CPU.Build.0 = Release|Any CPU - {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Release|Any CPU.Build.0 = Release|Any CPU - {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Release|Any CPU.Build.0 = Release|Any CPU - {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Release|Any CPU.Build.0 = Release|Any CPU - {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Release|Any CPU.Build.0 = Release|Any CPU - {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Release|Any CPU.Build.0 = Release|Any CPU - {77EEA619-2203-427D-A00D-11AA70B6104B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {77EEA619-2203-427D-A00D-11AA70B6104B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {77EEA619-2203-427D-A00D-11AA70B6104B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {77EEA619-2203-427D-A00D-11AA70B6104B}.Release|Any CPU.Build.0 = Release|Any CPU - {EE4AC915-F377-4001-834A-6760B4403415}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE4AC915-F377-4001-834A-6760B4403415}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE4AC915-F377-4001-834A-6760B4403415}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE4AC915-F377-4001-834A-6760B4403415}.Release|Any CPU.Build.0 = Release|Any CPU - {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Release|Any CPU.Build.0 = Release|Any CPU - {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Release|Any CPU.Build.0 = Release|Any CPU - {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Release|Any CPU.Build.0 = Release|Any CPU - {05279D11-8B1A-4C97-9F57-750740803C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05279D11-8B1A-4C97-9F57-750740803C28}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05279D11-8B1A-4C97-9F57-750740803C28}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05279D11-8B1A-4C97-9F57-750740803C28}.Release|Any CPU.Build.0 = Release|Any CPU - {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Release|Any CPU.Build.0 = Release|Any CPU - {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Release|Any CPU.Build.0 = Release|Any CPU - {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Release|Any CPU.Build.0 = Release|Any CPU - {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Release|Any CPU.Build.0 = Release|Any CPU - {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Release|Any CPU.Build.0 = Release|Any CPU - {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Release|Any CPU.Build.0 = Release|Any CPU - {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Release|Any CPU.Build.0 = Release|Any CPU - {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Release|Any CPU.Build.0 = Release|Any CPU - {1BB56A85-74F8-497F-983C-274D51B25CF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1BB56A85-74F8-497F-983C-274D51B25CF4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1BB56A85-74F8-497F-983C-274D51B25CF4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1BB56A85-74F8-497F-983C-274D51B25CF4}.Release|Any CPU.Build.0 = Release|Any CPU - {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Release|Any CPU.Build.0 = Release|Any CPU - {360430CE-6850-4A67-88ED-E9508B7D2658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {360430CE-6850-4A67-88ED-E9508B7D2658}.Debug|Any CPU.Build.0 = Debug|Any CPU - {360430CE-6850-4A67-88ED-E9508B7D2658}.Release|Any CPU.ActiveCfg = Release|Any CPU - {360430CE-6850-4A67-88ED-E9508B7D2658}.Release|Any CPU.Build.0 = Release|Any CPU - {800B5CBB-4860-42D3-9F6C-293670ED5936}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {800B5CBB-4860-42D3-9F6C-293670ED5936}.Debug|Any CPU.Build.0 = Debug|Any CPU - {800B5CBB-4860-42D3-9F6C-293670ED5936}.Release|Any CPU.ActiveCfg = Release|Any CPU - {800B5CBB-4860-42D3-9F6C-293670ED5936}.Release|Any CPU.Build.0 = Release|Any CPU - {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Release|Any CPU.Build.0 = Release|Any CPU - {A326741C-C030-4535-BA73-2B508E337CF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A326741C-C030-4535-BA73-2B508E337CF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A326741C-C030-4535-BA73-2B508E337CF0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A326741C-C030-4535-BA73-2B508E337CF0}.Release|Any CPU.Build.0 = Release|Any CPU - {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Release|Any CPU.Build.0 = Release|Any CPU - {E2262502-F55A-4967-9D09-30F670BBB045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2262502-F55A-4967-9D09-30F670BBB045}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2262502-F55A-4967-9D09-30F670BBB045}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2262502-F55A-4967-9D09-30F670BBB045}.Release|Any CPU.Build.0 = Release|Any CPU - {78711621-A1FE-4868-8BB1-B886E1AB3879}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {78711621-A1FE-4868-8BB1-B886E1AB3879}.Debug|Any CPU.Build.0 = Debug|Any CPU - {78711621-A1FE-4868-8BB1-B886E1AB3879}.Release|Any CPU.ActiveCfg = Release|Any CPU - {78711621-A1FE-4868-8BB1-B886E1AB3879}.Release|Any CPU.Build.0 = Release|Any CPU - {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Release|Any CPU.Build.0 = Release|Any CPU - {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Debug|Any CPU.Build.0 = Debug|Any CPU - {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Release|Any CPU.ActiveCfg = Release|Any CPU - {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Release|Any CPU.Build.0 = Release|Any CPU - {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Release|Any CPU.Build.0 = Release|Any CPU - {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Release|Any CPU.Build.0 = Release|Any CPU - {762E3613-2C9D-412B-B17D-9C087E9CF419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {762E3613-2C9D-412B-B17D-9C087E9CF419}.Debug|Any CPU.Build.0 = Debug|Any CPU - {762E3613-2C9D-412B-B17D-9C087E9CF419}.Release|Any CPU.ActiveCfg = Release|Any CPU - {762E3613-2C9D-412B-B17D-9C087E9CF419}.Release|Any CPU.Build.0 = Release|Any CPU - {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Release|Any CPU.Build.0 = Release|Any CPU - {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Release|Any CPU.Build.0 = Release|Any CPU - {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Release|Any CPU.Build.0 = Release|Any CPU - {66694B90-62FA-410F-8178-AC1641DB8D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {66694B90-62FA-410F-8178-AC1641DB8D11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {66694B90-62FA-410F-8178-AC1641DB8D11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {66694B90-62FA-410F-8178-AC1641DB8D11}.Release|Any CPU.Build.0 = Release|Any CPU - {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Release|Any CPU.Build.0 = Release|Any CPU - {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Release|Any CPU.Build.0 = Release|Any CPU - {F2823AB7-4361-437F-A5C7-D06540BCB362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2823AB7-4361-437F-A5C7-D06540BCB362}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2823AB7-4361-437F-A5C7-D06540BCB362}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2823AB7-4361-437F-A5C7-D06540BCB362}.Release|Any CPU.Build.0 = Release|Any CPU - {30CFBC0E-D72A-4890-9647-D488273B0F68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {30CFBC0E-D72A-4890-9647-D488273B0F68}.Debug|Any CPU.Build.0 = Debug|Any CPU - {30CFBC0E-D72A-4890-9647-D488273B0F68}.Release|Any CPU.ActiveCfg = Release|Any CPU - {30CFBC0E-D72A-4890-9647-D488273B0F68}.Release|Any CPU.Build.0 = Release|Any CPU - {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Release|Any CPU.Build.0 = Release|Any CPU - {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Release|Any CPU.Build.0 = Release|Any CPU - {34F64873-2412-4835-BA68-D2B278FD120E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34F64873-2412-4835-BA68-D2B278FD120E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34F64873-2412-4835-BA68-D2B278FD120E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34F64873-2412-4835-BA68-D2B278FD120E}.Release|Any CPU.Build.0 = Release|Any CPU - {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Release|Any CPU.Build.0 = Release|Any CPU - {5949DB91-5528-4547-B0EA-634FEDCC9904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5949DB91-5528-4547-B0EA-634FEDCC9904}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5949DB91-5528-4547-B0EA-634FEDCC9904}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5949DB91-5528-4547-B0EA-634FEDCC9904}.Release|Any CPU.Build.0 = Release|Any CPU - {7B42684C-9846-4769-814B-5F96C8A7CE82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7B42684C-9846-4769-814B-5F96C8A7CE82}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7B42684C-9846-4769-814B-5F96C8A7CE82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7B42684C-9846-4769-814B-5F96C8A7CE82}.Release|Any CPU.Build.0 = Release|Any CPU - {76956954-B37E-4055-B5F5-CF2FFD473598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {76956954-B37E-4055-B5F5-CF2FFD473598}.Debug|Any CPU.Build.0 = Debug|Any CPU - {76956954-B37E-4055-B5F5-CF2FFD473598}.Release|Any CPU.ActiveCfg = Release|Any CPU - {76956954-B37E-4055-B5F5-CF2FFD473598}.Release|Any CPU.Build.0 = Release|Any CPU - {EC79D227-E181-43D1-8D61-0503AB17B689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC79D227-E181-43D1-8D61-0503AB17B689}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC79D227-E181-43D1-8D61-0503AB17B689}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC79D227-E181-43D1-8D61-0503AB17B689}.Release|Any CPU.Build.0 = Release|Any CPU - {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Release|Any CPU.Build.0 = Release|Any CPU - {5EB516C8-510A-437E-8E68-88431717AFC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5EB516C8-510A-437E-8E68-88431717AFC1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5EB516C8-510A-437E-8E68-88431717AFC1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5EB516C8-510A-437E-8E68-88431717AFC1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {DF1C4335-5043-4365-B753-6A8698528E4B} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} = {DF1C4335-5043-4365-B753-6A8698528E4B} - {06D714AE-EDF4-421C-9340-EDA6FCDF491F} = {13BA71F8-58D7-45F6-997D-4DE87E7B41F3} - {76F6B614-D605-427C-ADFE-0A6D63A3858B} = {13BA71F8-58D7-45F6-997D-4DE87E7B41F3} - {B9616684-0252-428D-8D64-CAFC8708F7D1} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {2D4AF534-2435-4FD0-88EC-690227F26172} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {15150029-9E3F-4211-9BF4-DEC868BB0F0E} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {37800063-6675-46B2-8C84-B2F35728C5CE} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {8A21954E-99F6-484A-B7C4-32AC71108285} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {6275041A-FF15-44C4-8386-4D42A234C890} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {F157A154-8E45-443C-8021-29BE9D32325F} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {557BD815-AC5A-4880-9455-F0CE4F493EAD} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {F08D7B60-A643-4277-AD67-DBD50F9D4B87} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {70F69EC1-1374-49D2-88AB-111B62664B27} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {10FD6076-863A-4197-B7D5-EC91061F8DD2} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {1094EE0F-A767-429C-8A99-1C0D3FFABC52} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {6A9D0121-D0FC-41B8-8BC4-697176646DA7} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {AB0FB8CB-C232-459F-A6C8-01B574E96D70} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {CF623BC9-660E-49D1-B215-B2B285F67DA3} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {C880254A-1775-40F7-9E70-D6B627C58D04} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {1524655C-99D8-41DF-B80B-B7666CBE6B6C} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {3C60925D-A9CE-4957-9C27-C2043A7A42F0} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {2B504170-1CA6-463B-955A-028EABF70B89} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {93105D4E-D13D-4878-8207-8F6C0CD75D60} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} - {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} - {C78F3C29-514E-411B-AB80-B484186EF88E} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} - {006E287E-E685-43C2-A379-1DB78C06DCD8} = {903C38CB-C2E2-42D2-9277-74CE675551E8} - {B643D89D-A4ED-4C36-9D18-060096C1F37D} = {903C38CB-C2E2-42D2-9277-74CE675551E8} - {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE} = {903C38CB-C2E2-42D2-9277-74CE675551E8} - {8D25581A-C9DD-4DED-A1DB-A26CD9239666} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {6E326CDD-7992-487E-A840-987929DC79EF} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} - {35B85FC1-3134-4FE5-815E-F7C4282C6991} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} - {6932B4A6-A8D8-4F0B-9338-520F6488925E} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} - {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} - {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} - {33AF4A60-5E10-4F84-93A5-E724D013CFC3} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} - {EB4F2036-B4F2-4DEF-838C-480BFF3635E4} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {6F58D49A-BDF4-4599-9584-AC7A4134838E} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {A5BC6269-E1FC-4F91-B1D2-5B4F90571531} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {0BA6342E-C2BE-450C-848B-D4A9898A09F9} = {1E437DEA-7657-48AD-ADA0-7B86608E0768} - {1E437DEA-7657-48AD-ADA0-7B86608E0768} = {6A9D0121-D0FC-41B8-8BC4-697176646DA7} - {903C38CB-C2E2-42D2-9277-74CE675551E8} = {6A9D0121-D0FC-41B8-8BC4-697176646DA7} - {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} = {AB0FB8CB-C232-459F-A6C8-01B574E96D70} - {E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46} = {AB0FB8CB-C232-459F-A6C8-01B574E96D70} - {025B87CC-EDA5-4D82-852E-983A433941FD} = {E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46} - {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4} = {E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46} - {C790AF37-65C9-4E9C-A7E1-B57560411EF2} = {1094EE0F-A767-429C-8A99-1C0D3FFABC52} - {9ED99444-B4ED-43AA-852B-BBC6E4D04C23} = {1094EE0F-A767-429C-8A99-1C0D3FFABC52} - {6B9696B7-02BE-44D1-B48F-4A50C11674D6} = {9ED99444-B4ED-43AA-852B-BBC6E4D04C23} - {D74436AD-38BD-409F-A36B-A3923206A77A} = {9ED99444-B4ED-43AA-852B-BBC6E4D04C23} - {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} = {10FD6076-863A-4197-B7D5-EC91061F8DD2} - {BBE908B0-D642-4002-8A88-9F1726BA8CB6} = {10FD6076-863A-4197-B7D5-EC91061F8DD2} - {2448ABCE-EE9F-44D4-9217-2403EB16CDA4} = {BBE908B0-D642-4002-8A88-9F1726BA8CB6} - {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} = {557BD815-AC5A-4880-9455-F0CE4F493EAD} - {2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E} = {557BD815-AC5A-4880-9455-F0CE4F493EAD} - {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4} = {2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E} - {AAE79377-8414-4C23-BF0C-678B68A24BC7} = {8D25581A-C9DD-4DED-A1DB-A26CD9239666} - {F31B1655-A11B-4F30-9BC7-7418B8B915D7} = {8D25581A-C9DD-4DED-A1DB-A26CD9239666} - {4CBCD092-484C-4A80-8ACD-5666AC41C6AD} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {EFC1F89E-1C44-4385-A0F6-1F2124260561} = {DF1C4335-5043-4365-B753-6A8698528E4B} - {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {4E15A31F-57BC-420E-809D-35F7F0B834BC} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {B81FA22E-957A-45DE-95C6-60B88080B3C0} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {49848C95-B8A3-45A4-BF4B-B2C182F58521} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {DE89033E-BB74-43C0-8983-F07E5C75C8AE} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {E045E08A-4F57-4249-8F13-66BE5F19E1E5} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {77EEA619-2203-427D-A00D-11AA70B6104B} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {EE4AC915-F377-4001-834A-6760B4403415} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {92D57E34-502F-4CE3-AC43-3E8A53B2FC91} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {BFE78AAC-6275-45EB-9B73-07958BB5AFD1} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} - {225ABDC8-3612-4236-A2D0-19C1C3638BE1} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} - {05279D11-8B1A-4C97-9F57-750740803C28} = {903C38CB-C2E2-42D2-9277-74CE675551E8} - {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45} = {903C38CB-C2E2-42D2-9277-74CE675551E8} - {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {58706D00-9A53-4CC4-8201-46C3CEDCE8F9} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {82493577-AB78-4338-BE4D-851EEAF8E1A7} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {40F14114-44B0-4EE0-A653-6C8205F6F28C} = {F31B1655-A11B-4F30-9BC7-7418B8B915D7} - {19BE44FE-8852-40DD-AE70-EFA8B1E28730} = {F31B1655-A11B-4F30-9BC7-7418B8B915D7} - {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {1BB56A85-74F8-497F-983C-274D51B25CF4} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {6289332A-DBF2-4B99-BEFB-AC01A4C9D262} = {2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E} - {360430CE-6850-4A67-88ED-E9508B7D2658} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} - {78F88787-78AB-41E5-9A64-6B77B6CCFBCD} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} - {C258DF5B-0AE0-4DDF-9284-60671699C6ED} = {78F88787-78AB-41E5-9A64-6B77B6CCFBCD} - {800B5CBB-4860-42D3-9F6C-293670ED5936} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} - {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} - {A326741C-C030-4535-BA73-2B508E337CF0} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} - {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} - {E2262502-F55A-4967-9D09-30F670BBB045} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} - {4192A28C-45C0-4D20-B880-F417B8AB752F} = {78F88787-78AB-41E5-9A64-6B77B6CCFBCD} - {78711621-A1FE-4868-8BB1-B886E1AB3879} = {4192A28C-45C0-4D20-B880-F417B8AB752F} - {C7DFAE72-C164-43A6-8C81-FCCA4582710B} = {4192A28C-45C0-4D20-B880-F417B8AB752F} - {06C80BAE-3B73-49C0-9420-CDB7EA969058} = {F31B1655-A11B-4F30-9BC7-7418B8B915D7} - {84BA182A-6E24-4437-A7DB-13D2D675E14B} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} - {B301A0EE-BFA9-4268-8DC3-4F5865992543} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} - {762E3613-2C9D-412B-B17D-9C087E9CF419} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} - {60CAE514-B713-4F3F-8B5D-D3BB34E3805F} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} - {0C2FA416-00D3-4E1E-87B1-C7E48E162B01} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} - {E57EB47C-41CF-4956-835F-D933A0D97D8A} = {903C38CB-C2E2-42D2-9277-74CE675551E8} - {66694B90-62FA-410F-8178-AC1641DB8D11} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} - {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} - {AC21BC09-864E-4C35-A8BE-8575A9C14134} = {B147B99D-3FC7-4D99-A3B7-796AA9FA126C} - {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C} = {AC21BC09-864E-4C35-A8BE-8575A9C14134} - {F2823AB7-4361-437F-A5C7-D06540BCB362} = {E6BFD37D-335D-4975-B661-BC67FB82F5AA} - {30CFBC0E-D72A-4890-9647-D488273B0F68} = {E6BFD37D-335D-4975-B661-BC67FB82F5AA} - {FB38C7C5-9F11-43BB-871F-E2E0360FD993} = {4192A28C-45C0-4D20-B880-F417B8AB752F} - {9599F729-2B1F-4E96-83F4-C20D0CA1C61B} = {A960F984-B1A3-403E-B2BA-7C4F6287D91F} - {4F812E23-62EB-4B79-8ECA-5CA72CF5D3BC} = {A960F984-B1A3-403E-B2BA-7C4F6287D91F} - {34F64873-2412-4835-BA68-D2B278FD120E} = {9599F729-2B1F-4E96-83F4-C20D0CA1C61B} - {B996F6B2-D31E-4312-A98B-AD6D604B6825} = {4F812E23-62EB-4B79-8ECA-5CA72CF5D3BC} - {5949DB91-5528-4547-B0EA-634FEDCC9904} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} - {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} = {285E30DF-68B4-4A13-981E-E8BAB05489F5} - {E7576FD6-32FA-4EA7-AFDB-0D74F37044A0} = {285E30DF-68B4-4A13-981E-E8BAB05489F5} - {7B42684C-9846-4769-814B-5F96C8A7CE82} = {E7576FD6-32FA-4EA7-AFDB-0D74F37044A0} - {EC79D227-E181-43D1-8D61-0503AB17B689} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} - {D3DCCA97-80ED-4362-A344-EC0305F356A6} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} - {5EB516C8-510A-437E-8E68-88431717AFC1} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {1F3BD2C6-7CB3-450F-A21A-23EA520D5B7A} - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33122.133 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Challenges", "Challenges", "{DF1C4335-5043-4365-B753-6A8698528E4B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildingBlocks", "BuildingBlocks", "{13BA71F8-58D7-45F6-997D-4DE87E7B41F3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{06D714AE-EDF4-421C-9340-EDA6FCDF491F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{76F6B614-D605-427C-ADFE-0A6D63A3858B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Application", "BuildingBlocks\src\BuildingBlocks.Application\BuildingBlocks.Application.csproj", "{B9616684-0252-428D-8D64-CAFC8708F7D1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tooling", "BuildingBlocks\src\Tooling\Tooling.csproj", "{2D4AF534-2435-4FD0-88EC-690227F26172}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Application.Abstractions", "BuildingBlocks\src\BuildingBlocks.Application.Abstractions\BuildingBlocks.Application.Abstractions.csproj", "{9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Infrastructure", "Modules\Challenges\src\Challenges.Infrastructure\Challenges.Infrastructure.csproj", "{15150029-9E3F-4211-9BF4-DEC868BB0F0E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Application", "Modules\Challenges\src\Challenges.Application\Challenges.Application.csproj", "{37800063-6675-46B2-8C84-B2F35728C5CE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Domain", "Modules\Challenges\src\Challenges.Domain\Challenges.Domain.csproj", "{8A21954E-99F6-484A-B7C4-32AC71108285}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevelopmentKit.Identity", "BuildingBlocks\src\DevelopmentKit.Identity\DevelopmentKit.Identity.csproj", "{6275041A-FF15-44C4-8386-4D42A234C890}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Infrastructure", "BuildingBlocks\src\BuildingBlocks.Infrastructure\BuildingBlocks.Infrastructure.csproj", "{F157A154-8E45-443C-8021-29BE9D32325F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E4B0D1F2-8AD5-481D-96EE-AC2EE7B85A51}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + .env = .env + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure", "Infrastructure\Infrastructure.csproj", "{197F5C0C-A042-42F9-AE83-057640AA4036}" +EndProject +Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose\docker-compose.dcproj", "{24644042-C274-4A5F-8F40-463ADC3E7B34}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{0EAF57B8-E97C-469E-A74B-596D78C978B2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{557BD815-AC5A-4880-9455-F0CE4F493EAD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Application", "Modules\Files\src\Files.Application\Files.Application.csproj", "{1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Domain", "Modules\Files\src\Files.Domain\Files.Domain.csproj", "{F08D7B60-A643-4277-AD67-DBD50F9D4B87}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Infrastructure", "Modules\Files\src\Files.Infrastructure\Files.Infrastructure.csproj", "{70F69EC1-1374-49D2-88AB-111B62664B27}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Messages", "Messages", "{10FD6076-863A-4197-B7D5-EC91061F8DD2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Relationships", "Relationships", "{1094EE0F-A767-429C-8A99-1C0D3FFABC52}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tokens", "Tokens", "{6A9D0121-D0FC-41B8-8BC4-697176646DA7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Synchronization", "Synchronization", "{AB0FB8CB-C232-459F-A6C8-01B574E96D70}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Application", "Modules\Messages\src\Messages.Application\Messages.Application.csproj", "{D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Common", "Modules\Messages\src\Messages.Common\Messages.Common.csproj", "{7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Domain", "Modules\Messages\src\Messages.Domain\Messages.Domain.csproj", "{CF623BC9-660E-49D1-B215-B2B285F67DA3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Infrastructure", "Modules\Messages\src\Messages.Infrastructure\Messages.Infrastructure.csproj", "{C880254A-1775-40F7-9E70-D6B627C58D04}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Application", "Modules\Relationships\src\Relationships.Application\Relationships.Application.csproj", "{1524655C-99D8-41DF-B80B-B7666CBE6B6C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Common", "Modules\Relationships\src\Relationships.Common\Relationships.Common.csproj", "{3C60925D-A9CE-4957-9C27-C2043A7A42F0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Domain", "Modules\Relationships\src\Relationships.Domain\Relationships.Domain.csproj", "{A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Infrastructure", "Modules\Relationships\src\Relationships.Infrastructure\Relationships.Infrastructure.csproj", "{2B504170-1CA6-463B-955A-028EABF70B89}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Application", "Modules\Synchronization\src\Synchronization.Application\Synchronization.Application.csproj", "{93105D4E-D13D-4878-8207-8F6C0CD75D60}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Domain", "Modules\Synchronization\src\Synchronization.Domain\Synchronization.Domain.csproj", "{C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Infrastructure", "Modules\Synchronization\src\Synchronization.Infrastructure\Synchronization.Infrastructure.csproj", "{C78F3C29-514E-411B-AB80-B484186EF88E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Application", "Modules\Tokens\src\Tokens.Application\Tokens.Application.csproj", "{006E287E-E685-43C2-A379-1DB78C06DCD8}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Domain", "Modules\Tokens\src\Tokens.Domain\Tokens.Domain.csproj", "{B643D89D-A4ED-4C36-9D18-060096C1F37D}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Infrastructure", "Modules\Tokens\src\Tokens.Infrastructure\Tokens.Infrastructure.csproj", "{4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Devices", "Devices", "{8D25581A-C9DD-4DED-A1DB-A26CD9239666}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Application.Tests", "BuildingBlocks\test\BuildingBlocks.Application.Tests\BuildingBlocks.Application.Tests.csproj", "{6E326CDD-7992-487E-A840-987929DC79EF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Infrastructure.Tests", "BuildingBlocks\test\BuildingBlocks.Infrastructure.Tests\BuildingBlocks.Infrastructure.Tests.csproj", "{35B85FC1-3134-4FE5-815E-F7C4282C6991}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crypto.Tests", "BuildingBlocks\test\Crypto.Tests\Crypto.Tests.csproj", "{6932B4A6-A8D8-4F0B-9338-520F6488925E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevelopmentKit.Identity.Tests", "BuildingBlocks\test\DevelopmentKit.Identity.Tests\DevelopmentKit.Identity.Tests.csproj", "{AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StronglyTypedIds.Tests", "BuildingBlocks\test\StronglyTypedIds.Tests\StronglyTypedIds.Tests.csproj", "{49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tooling.Tests", "BuildingBlocks\test\Tooling.Tests\Tooling.Tests.csproj", "{33AF4A60-5E10-4F84-93A5-E724D013CFC3}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.API", "BuildingBlocks\src\BuildingBlocks.API\BuildingBlocks.API.csproj", "{EB4F2036-B4F2-4DEF-838C-480BFF3635E4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Crypto", "BuildingBlocks\src\Crypto\Crypto.csproj", "{6F58D49A-BDF4-4599-9584-AC7A4134838E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTestTools", "BuildingBlocks\src\UnitTestTools\UnitTestTools.csproj", "{A5BC6269-E1FC-4F91-B1D2-5B4F90571531}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Application.Tests", "Modules\Tokens\test\Tokens.Application.Tests\Tokens.Application.Tests.csproj", "{0BA6342E-C2BE-450C-848B-D4A9898A09F9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{1E437DEA-7657-48AD-ADA0-7B86608E0768}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{903C38CB-C2E2-42D2-9277-74CE675551E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{1FEB1A37-59AD-403D-B7EC-50AD796BB25C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Application.Tests", "Modules\Synchronization\test\Synchronization.Application.Tests\Synchronization.Application.Tests.csproj", "{025B87CC-EDA5-4D82-852E-983A433941FD}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Domain.Tests", "Modules\Synchronization\test\Synchronization.Domain.Tests\Synchronization.Domain.Tests.csproj", "{6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C790AF37-65C9-4E9C-A7E1-B57560411EF2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{9ED99444-B4ED-43AA-852B-BBC6E4D04C23}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Application.Tests", "Modules\Relationships\test\Relationships.Application.Tests\Relationships.Application.Tests.csproj", "{6B9696B7-02BE-44D1-B48F-4A50C11674D6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Domain.Tests", "Modules\Relationships\test\Relationships.Domain.Tests\Relationships.Domain.Tests.csproj", "{D74436AD-38BD-409F-A36B-A3923206A77A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{BBE908B0-D642-4002-8A88-9F1726BA8CB6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Application.Tests", "Modules\Messages\test\Messages.Application.Tests\Messages.Application.Tests.csproj", "{2448ABCE-EE9F-44D4-9217-2403EB16CDA4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3D324161-C287-4DC0-A9FD-FA3B1A6643FD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Application.Tests", "Modules\Files\test\Files.Application.Tests\Files.Application.Tests.csproj", "{90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AAE79377-8414-4C23-BF0C-678B68A24BC7}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F31B1655-A11B-4F30-9BC7-7418B8B915D7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Jobs.Cleanup", "Modules\Challenges\src\Challenges.Jobs.Cleanup\Challenges.Jobs.Cleanup.csproj", "{4CBCD092-484C-4A80-8ACD-5666AC41C6AD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{EFC1F89E-1C44-4385-A0F6-1F2124260561}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Backbone.Tests.ArchUnit", "Backbone.Tests.ArchUnit\Backbone.Tests.ArchUnit.csproj", "{4525765E-C15C-44E8-BE87-D8B06213ACFF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Application", "Modules\Devices\src\Devices.Application\Devices.Application.csproj", "{BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Domain", "Modules\Devices\src\Devices.Domain\Devices.Domain.csproj", "{4E15A31F-57BC-420E-809D-35F7F0B834BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure", "Modules\Devices\src\Devices.Infrastructure\Devices.Infrastructure.csproj", "{B81FA22E-957A-45DE-95C6-60B88080B3C0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Infrastructure.Database.Postgres", "Modules\Relationships\src\Relationships.Infrastructure.Database.Postgres\Relationships.Infrastructure.Database.Postgres.csproj", "{49848C95-B8A3-45A4-BF4B-B2C182F58521}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.Infrastructure.Database.SqlServer", "Modules\Relationships\src\Relationships.Infrastructure.Database.SqlServer\Relationships.Infrastructure.Database.SqlServer.csproj", "{DE89033E-BB74-43C0-8983-F07E5C75C8AE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Infrastructure.Database.SqlServer", "Modules\Messages\src\Messages.Infrastructure.Database.SqlServer\Messages.Infrastructure.Database.SqlServer.csproj", "{E045E08A-4F57-4249-8F13-66BE5F19E1E5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.Infrastructure.Database.Postgres", "Modules\Messages\src\Messages.Infrastructure.Database.Postgres\Messages.Infrastructure.Database.Postgres.csproj", "{77EEA619-2203-427D-A00D-11AA70B6104B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Infrastructure.Database.SqlServer", "Modules\Files\src\Files.Infrastructure.Database.SqlServer\Files.Infrastructure.Database.SqlServer.csproj", "{EE4AC915-F377-4001-834A-6760B4403415}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Infrastructure.Database.Postgres", "Modules\Files\src\Files.Infrastructure.Database.Postgres\Files.Infrastructure.Database.Postgres.csproj", "{92D57E34-502F-4CE3-AC43-3E8A53B2FC91}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Infrastructure.Database.SqlServer", "Modules\Synchronization\src\Synchronization.Infrastructure.Database.SqlServer\Synchronization.Infrastructure.Database.SqlServer.csproj", "{BFE78AAC-6275-45EB-9B73-07958BB5AFD1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.Infrastructure.Database.Postgres", "Modules\Synchronization\src\Synchronization.Infrastructure.Database.Postgres\Synchronization.Infrastructure.Database.Postgres.csproj", "{225ABDC8-3612-4236-A2D0-19C1C3638BE1}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Infrastructure.Database.SqlServer", "Modules\Tokens\src\Tokens.Infrastructure.Database.SqlServer\Tokens.Infrastructure.Database.SqlServer.csproj", "{05279D11-8B1A-4C97-9F57-750740803C28}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.Infrastructure.Database.Postgres", "Modules\Tokens\src\Tokens.Infrastructure.Database.Postgres\Tokens.Infrastructure.Database.Postgres.csproj", "{3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure.Database.SqlServer", "Modules\Devices\src\Devices.Infrastructure.Database.SqlServer\Devices.Infrastructure.Database.SqlServer.csproj", "{5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure.Database.Postgres", "Modules\Devices\src\Devices.Infrastructure.Database.Postgres\Devices.Infrastructure.Database.Postgres.csproj", "{58706D00-9A53-4CC4-8201-46C3CEDCE8F9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Infrastructure.Database.Postgres", "Modules\Challenges\src\Challenges.Infrastructure.Database.Postgres\Challenges.Infrastructure.Database.Postgres.csproj", "{7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.Infrastructure.Database.SqlServer", "Modules\Challenges\src\Challenges.Infrastructure.Database.SqlServer\Challenges.Infrastructure.Database.SqlServer.csproj", "{82493577-AB78-4338-BE4D-851EEAF8E1A7}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Application.Tests", "Modules\Devices\test\Devices.Application.Tests\Devices.Application.Tests.csproj", "{40F14114-44B0-4EE0-A653-6C8205F6F28C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Infrastructure.Tests", "Modules\Devices\test\Devices.Infrastructure.Tests\Devices.Infrastructure.Tests.csproj", "{19BE44FE-8852-40DD-AE70-EFA8B1E28730}" + ProjectSection(ProjectDependencies) = postProject + {A5BC6269-E1FC-4F91-B1D2-5B4F90571531} = {A5BC6269-E1FC-4F91-B1D2-5B4F90571531} + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.AdminCli", "Modules\Devices\src\Devices.AdminCli\Devices.AdminCli.csproj", "{E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Jobs.SanityCheck", "Modules\Files\src\Files.Jobs.SanityCheck\Files.Jobs.SanityCheck.csproj", "{1BB56A85-74F8-497F-983C-274D51B25CF4}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.Jobs.SanityCheck.Tests", "Modules\Files\test\Files.Jobs.SanityCheck.Tests\Files.Jobs.SanityCheck.Tests.csproj", "{6289332A-DBF2-4B99-BEFB-AC01A4C9D262}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildingBlocks.Domain", "BuildingBlocks\src\BuildingBlocks.Domain\BuildingBlocks.Domain.csproj", "{360430CE-6850-4A67-88ED-E9508B7D2658}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Quotas", "Quotas", "{78F88787-78AB-41E5-9A64-6B77B6CCFBCD}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C258DF5B-0AE0-4DDF-9284-60671699C6ED}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Application", "Modules\Quotas\src\Quotas.Application\Quotas.Application.csproj", "{800B5CBB-4860-42D3-9F6C-293670ED5936}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Domain", "Modules\Quotas\src\Quotas.Domain\Quotas.Domain.csproj", "{6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure", "Modules\Quotas\src\Quotas.Infrastructure\Quotas.Infrastructure.csproj", "{A326741C-C030-4535-BA73-2B508E337CF0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure.Database.Postgres", "Modules\Quotas\src\Quotas.Infrastructure.Database.Postgres\Quotas.Infrastructure.Database.Postgres.csproj", "{B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure.Database.SqlServer", "Modules\Quotas\src\Quotas.Infrastructure.Database.SqlServer\Quotas.Infrastructure.Database.SqlServer.csproj", "{E2262502-F55A-4967-9D09-30F670BBB045}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4192A28C-45C0-4D20-B880-F417B8AB752F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Application.Tests", "Modules\Quotas\test\Quotas.Application.Tests\Quotas.Application.Tests.csproj", "{78711621-A1FE-4868-8BB1-B886E1AB3879}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Domain.Tests", "Modules\Quotas\test\Quotas.Domain.Tests\Quotas.Domain.Tests.csproj", "{C7DFAE72-C164-43A6-8C81-FCCA4582710B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.Domain.Tests", "Modules\Devices\test\Devices.Domain.Tests\Devices.Domain.Tests.csproj", "{06C80BAE-3B73-49C0-9420-CDB7EA969058}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Challenges.ConsumerApi", "Modules\Challenges\src\Challenges.ConsumerApi\Challenges.ConsumerApi.csproj", "{84BA182A-6E24-4437-A7DB-13D2D675E14B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Files.ConsumerApi", "Modules\Files\src\Files.ConsumerApi\Files.ConsumerApi.csproj", "{B301A0EE-BFA9-4268-8DC3-4F5865992543}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Messages.ConsumerApi", "Modules\Messages\src\Messages.ConsumerApi\Messages.ConsumerApi.csproj", "{762E3613-2C9D-412B-B17D-9C087E9CF419}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Relationships.ConsumerApi", "Modules\Relationships\src\Relationships.ConsumerApi\Relationships.ConsumerApi.csproj", "{60CAE514-B713-4F3F-8B5D-D3BB34E3805F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Synchronization.ConsumerApi", "Modules\Synchronization\src\Synchronization.ConsumerApi\Synchronization.ConsumerApi.csproj", "{0C2FA416-00D3-4E1E-87B1-C7E48E162B01}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tokens.ConsumerApi", "Modules\Tokens\src\Tokens.ConsumerApi\Tokens.ConsumerApi.csproj", "{E57EB47C-41CF-4956-835F-D933A0D97D8A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.ConsumerApi", "Modules\Quotas\src\Quotas.ConsumerApi\Quotas.ConsumerApi.csproj", "{66694B90-62FA-410F-8178-AC1641DB8D11}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devices.ConsumerApi", "Modules\Devices\src\Devices.ConsumerApi\Devices.ConsumerApi.csproj", "{8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AdminApi", "AdminApi", "{285E30DF-68B4-4A13-981E-E8BAB05489F5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ConsumerApi", "ConsumerApi", "{E6BFD37D-335D-4975-B661-BC67FB82F5AA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{B147B99D-3FC7-4D99-A3B7-796AA9FA126C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{AC21BC09-864E-4C35-A8BE-8575A9C14134}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Infrastructure", "Common\src\Common.Infrastructure\Common.Infrastructure.csproj", "{67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsumerApi", "ConsumerApi\ConsumerApi.csproj", "{F2823AB7-4361-437F-A5C7-D06540BCB362}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsumerApi.Tests.Integration", "ConsumerApi.Tests.Integration\ConsumerApi.Tests.Integration.csproj", "{30CFBC0E-D72A-4890-9647-D488273B0F68}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "HealthCheck\HealthCheck.csproj", "{EE910828-296B-45CD-BA01-DCABE27BCC4C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Quotas.Infrastructure.Tests", "Modules\Quotas\test\Quotas.Infrastructure.Tests\Quotas.Infrastructure.Tests.csproj", "{FB38C7C5-9F11-43BB-871F-E2E0360FD993}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Jobs", "Jobs", "{A960F984-B1A3-403E-B2BA-7C4F6287D91F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9599F729-2B1F-4E96-83F4-C20D0CA1C61B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{4F812E23-62EB-4B79-8ECA-5CA72CF5D3BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Job.IdentityDeletion", "Jobs\src\Job.IdentityDeletion\Job.IdentityDeletion.csproj", "{34F64873-2412-4835-BA68-D2B278FD120E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Job.IdentityDeletion.Tests", "Jobs\test\Job.IdentityDeletion.Tests\Job.IdentityDeletion.Tests.csproj", "{B996F6B2-D31E-4312-A98B-AD6D604B6825}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi", "AdminApi\src\AdminApi\AdminApi.csproj", "{5949DB91-5528-4547-B0EA-634FEDCC9904}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4E66D5C4-1EF2-4605-BBA3-F99BF90E973F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{E7576FD6-32FA-4EA7-AFDB-0D74F37044A0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Tests.Integration", "AdminApi\test\AdminApi.Tests.Integration\AdminApi.Tests.Integration.csproj", "{7B42684C-9846-4769-814B-5F96C8A7CE82}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsumerApi.Sdk", "ConsumerApi.Sdk\ConsumerApi.Sdk.csproj", "{76956954-B37E-4055-B5F5-CF2FFD473598}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Infrastructure", "AdminApi\src\AdminApi.Infrastructure\AdminApi.Infrastructure.csproj", "{EC79D227-E181-43D1-8D61-0503AB17B689}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Infrastructure.Database.Postgres", "AdminApi\src\AdminApi.Infrastructure.Database.Postgres\AdminApi.Infrastructure.Database.Postgres.csproj", "{D3DCCA97-80ED-4362-A344-EC0305F356A6}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AdminApi.Infrastructure.Database.SqlServer", "AdminApi\src\AdminApi.Infrastructure.Database.SqlServer\AdminApi.Infrastructure.Database.SqlServer.csproj", "{5EB516C8-510A-437E-8E68-88431717AFC1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdminApi.Sdk", "AdminApi.Sdk\AdminApi.Sdk.csproj", "{AC66AB2F-F55B-4667-85DB-F5A24CCAC502}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildingBlocks.SDK", "BuildingBlocks\src\BuildingBlocks.SDK\BuildingBlocks.SDK.csproj", "{6CCACC81-F9A8-4953-AE1D-62AB01CC7CBA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B9616684-0252-428D-8D64-CAFC8708F7D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9616684-0252-428D-8D64-CAFC8708F7D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9616684-0252-428D-8D64-CAFC8708F7D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9616684-0252-428D-8D64-CAFC8708F7D1}.Release|Any CPU.Build.0 = Release|Any CPU + {2D4AF534-2435-4FD0-88EC-690227F26172}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D4AF534-2435-4FD0-88EC-690227F26172}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D4AF534-2435-4FD0-88EC-690227F26172}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D4AF534-2435-4FD0-88EC-690227F26172}.Release|Any CPU.Build.0 = Release|Any CPU + {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903}.Release|Any CPU.Build.0 = Release|Any CPU + {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15150029-9E3F-4211-9BF4-DEC868BB0F0E}.Release|Any CPU.Build.0 = Release|Any CPU + {37800063-6675-46B2-8C84-B2F35728C5CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {37800063-6675-46B2-8C84-B2F35728C5CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {37800063-6675-46B2-8C84-B2F35728C5CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {37800063-6675-46B2-8C84-B2F35728C5CE}.Release|Any CPU.Build.0 = Release|Any CPU + {8A21954E-99F6-484A-B7C4-32AC71108285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8A21954E-99F6-484A-B7C4-32AC71108285}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8A21954E-99F6-484A-B7C4-32AC71108285}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8A21954E-99F6-484A-B7C4-32AC71108285}.Release|Any CPU.Build.0 = Release|Any CPU + {6275041A-FF15-44C4-8386-4D42A234C890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6275041A-FF15-44C4-8386-4D42A234C890}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6275041A-FF15-44C4-8386-4D42A234C890}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6275041A-FF15-44C4-8386-4D42A234C890}.Release|Any CPU.Build.0 = Release|Any CPU + {F157A154-8E45-443C-8021-29BE9D32325F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F157A154-8E45-443C-8021-29BE9D32325F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F157A154-8E45-443C-8021-29BE9D32325F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F157A154-8E45-443C-8021-29BE9D32325F}.Release|Any CPU.Build.0 = Release|Any CPU + {197F5C0C-A042-42F9-AE83-057640AA4036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {197F5C0C-A042-42F9-AE83-057640AA4036}.Debug|Any CPU.Build.0 = Debug|Any CPU + {197F5C0C-A042-42F9-AE83-057640AA4036}.Release|Any CPU.ActiveCfg = Release|Any CPU + {197F5C0C-A042-42F9-AE83-057640AA4036}.Release|Any CPU.Build.0 = Release|Any CPU + {24644042-C274-4A5F-8F40-463ADC3E7B34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {24644042-C274-4A5F-8F40-463ADC3E7B34}.Debug|Any CPU.Build.0 = Debug|Any CPU + {24644042-C274-4A5F-8F40-463ADC3E7B34}.Release|Any CPU.ActiveCfg = Release|Any CPU + {24644042-C274-4A5F-8F40-463ADC3E7B34}.Release|Any CPU.Build.0 = Release|Any CPU + {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4}.Release|Any CPU.Build.0 = Release|Any CPU + {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F08D7B60-A643-4277-AD67-DBD50F9D4B87}.Release|Any CPU.Build.0 = Release|Any CPU + {70F69EC1-1374-49D2-88AB-111B62664B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {70F69EC1-1374-49D2-88AB-111B62664B27}.Debug|Any CPU.Build.0 = Debug|Any CPU + {70F69EC1-1374-49D2-88AB-111B62664B27}.Release|Any CPU.ActiveCfg = Release|Any CPU + {70F69EC1-1374-49D2-88AB-111B62664B27}.Release|Any CPU.Build.0 = Release|Any CPU + {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48}.Release|Any CPU.Build.0 = Release|Any CPU + {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C}.Release|Any CPU.Build.0 = Release|Any CPU + {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF623BC9-660E-49D1-B215-B2B285F67DA3}.Release|Any CPU.Build.0 = Release|Any CPU + {C880254A-1775-40F7-9E70-D6B627C58D04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C880254A-1775-40F7-9E70-D6B627C58D04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C880254A-1775-40F7-9E70-D6B627C58D04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C880254A-1775-40F7-9E70-D6B627C58D04}.Release|Any CPU.Build.0 = Release|Any CPU + {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1524655C-99D8-41DF-B80B-B7666CBE6B6C}.Release|Any CPU.Build.0 = Release|Any CPU + {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3C60925D-A9CE-4957-9C27-C2043A7A42F0}.Release|Any CPU.Build.0 = Release|Any CPU + {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D}.Release|Any CPU.Build.0 = Release|Any CPU + {2B504170-1CA6-463B-955A-028EABF70B89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2B504170-1CA6-463B-955A-028EABF70B89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2B504170-1CA6-463B-955A-028EABF70B89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2B504170-1CA6-463B-955A-028EABF70B89}.Release|Any CPU.Build.0 = Release|Any CPU + {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93105D4E-D13D-4878-8207-8F6C0CD75D60}.Release|Any CPU.Build.0 = Release|Any CPU + {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E}.Release|Any CPU.Build.0 = Release|Any CPU + {C78F3C29-514E-411B-AB80-B484186EF88E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C78F3C29-514E-411B-AB80-B484186EF88E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C78F3C29-514E-411B-AB80-B484186EF88E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C78F3C29-514E-411B-AB80-B484186EF88E}.Release|Any CPU.Build.0 = Release|Any CPU + {006E287E-E685-43C2-A379-1DB78C06DCD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {006E287E-E685-43C2-A379-1DB78C06DCD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {006E287E-E685-43C2-A379-1DB78C06DCD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {006E287E-E685-43C2-A379-1DB78C06DCD8}.Release|Any CPU.Build.0 = Release|Any CPU + {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B643D89D-A4ED-4C36-9D18-060096C1F37D}.Release|Any CPU.Build.0 = Release|Any CPU + {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE}.Release|Any CPU.Build.0 = Release|Any CPU + {6E326CDD-7992-487E-A840-987929DC79EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E326CDD-7992-487E-A840-987929DC79EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E326CDD-7992-487E-A840-987929DC79EF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E326CDD-7992-487E-A840-987929DC79EF}.Release|Any CPU.Build.0 = Release|Any CPU + {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Debug|Any CPU.Build.0 = Debug|Any CPU + {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Release|Any CPU.ActiveCfg = Release|Any CPU + {35B85FC1-3134-4FE5-815E-F7C4282C6991}.Release|Any CPU.Build.0 = Release|Any CPU + {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6932B4A6-A8D8-4F0B-9338-520F6488925E}.Release|Any CPU.Build.0 = Release|Any CPU + {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4}.Release|Any CPU.Build.0 = Release|Any CPU + {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4}.Release|Any CPU.Build.0 = Release|Any CPU + {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33AF4A60-5E10-4F84-93A5-E724D013CFC3}.Release|Any CPU.Build.0 = Release|Any CPU + {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB4F2036-B4F2-4DEF-838C-480BFF3635E4}.Release|Any CPU.Build.0 = Release|Any CPU + {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F58D49A-BDF4-4599-9584-AC7A4134838E}.Release|Any CPU.Build.0 = Release|Any CPU + {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5BC6269-E1FC-4F91-B1D2-5B4F90571531}.Release|Any CPU.Build.0 = Release|Any CPU + {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BA6342E-C2BE-450C-848B-D4A9898A09F9}.Release|Any CPU.Build.0 = Release|Any CPU + {025B87CC-EDA5-4D82-852E-983A433941FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {025B87CC-EDA5-4D82-852E-983A433941FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {025B87CC-EDA5-4D82-852E-983A433941FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {025B87CC-EDA5-4D82-852E-983A433941FD}.Release|Any CPU.Build.0 = Release|Any CPU + {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4}.Release|Any CPU.Build.0 = Release|Any CPU + {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B9696B7-02BE-44D1-B48F-4A50C11674D6}.Release|Any CPU.Build.0 = Release|Any CPU + {D74436AD-38BD-409F-A36B-A3923206A77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D74436AD-38BD-409F-A36B-A3923206A77A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D74436AD-38BD-409F-A36B-A3923206A77A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D74436AD-38BD-409F-A36B-A3923206A77A}.Release|Any CPU.Build.0 = Release|Any CPU + {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2448ABCE-EE9F-44D4-9217-2403EB16CDA4}.Release|Any CPU.Build.0 = Release|Any CPU + {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4}.Release|Any CPU.Build.0 = Release|Any CPU + {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4CBCD092-484C-4A80-8ACD-5666AC41C6AD}.Release|Any CPU.Build.0 = Release|Any CPU + {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4525765E-C15C-44E8-BE87-D8B06213ACFF}.Release|Any CPU.Build.0 = Release|Any CPU + {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771}.Release|Any CPU.Build.0 = Release|Any CPU + {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E15A31F-57BC-420E-809D-35F7F0B834BC}.Release|Any CPU.Build.0 = Release|Any CPU + {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B81FA22E-957A-45DE-95C6-60B88080B3C0}.Release|Any CPU.Build.0 = Release|Any CPU + {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Debug|Any CPU.Build.0 = Debug|Any CPU + {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Release|Any CPU.ActiveCfg = Release|Any CPU + {49848C95-B8A3-45A4-BF4B-B2C182F58521}.Release|Any CPU.Build.0 = Release|Any CPU + {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE89033E-BB74-43C0-8983-F07E5C75C8AE}.Release|Any CPU.Build.0 = Release|Any CPU + {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E045E08A-4F57-4249-8F13-66BE5F19E1E5}.Release|Any CPU.Build.0 = Release|Any CPU + {77EEA619-2203-427D-A00D-11AA70B6104B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {77EEA619-2203-427D-A00D-11AA70B6104B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {77EEA619-2203-427D-A00D-11AA70B6104B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {77EEA619-2203-427D-A00D-11AA70B6104B}.Release|Any CPU.Build.0 = Release|Any CPU + {EE4AC915-F377-4001-834A-6760B4403415}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE4AC915-F377-4001-834A-6760B4403415}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE4AC915-F377-4001-834A-6760B4403415}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE4AC915-F377-4001-834A-6760B4403415}.Release|Any CPU.Build.0 = Release|Any CPU + {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92D57E34-502F-4CE3-AC43-3E8A53B2FC91}.Release|Any CPU.Build.0 = Release|Any CPU + {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFE78AAC-6275-45EB-9B73-07958BB5AFD1}.Release|Any CPU.Build.0 = Release|Any CPU + {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {225ABDC8-3612-4236-A2D0-19C1C3638BE1}.Release|Any CPU.Build.0 = Release|Any CPU + {05279D11-8B1A-4C97-9F57-750740803C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05279D11-8B1A-4C97-9F57-750740803C28}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05279D11-8B1A-4C97-9F57-750740803C28}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05279D11-8B1A-4C97-9F57-750740803C28}.Release|Any CPU.Build.0 = Release|Any CPU + {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45}.Release|Any CPU.Build.0 = Release|Any CPU + {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E}.Release|Any CPU.Build.0 = Release|Any CPU + {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58706D00-9A53-4CC4-8201-46C3CEDCE8F9}.Release|Any CPU.Build.0 = Release|Any CPU + {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809}.Release|Any CPU.Build.0 = Release|Any CPU + {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {82493577-AB78-4338-BE4D-851EEAF8E1A7}.Release|Any CPU.Build.0 = Release|Any CPU + {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40F14114-44B0-4EE0-A653-6C8205F6F28C}.Release|Any CPU.Build.0 = Release|Any CPU + {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19BE44FE-8852-40DD-AE70-EFA8B1E28730}.Release|Any CPU.Build.0 = Release|Any CPU + {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F}.Release|Any CPU.Build.0 = Release|Any CPU + {1BB56A85-74F8-497F-983C-274D51B25CF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1BB56A85-74F8-497F-983C-274D51B25CF4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1BB56A85-74F8-497F-983C-274D51B25CF4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1BB56A85-74F8-497F-983C-274D51B25CF4}.Release|Any CPU.Build.0 = Release|Any CPU + {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6289332A-DBF2-4B99-BEFB-AC01A4C9D262}.Release|Any CPU.Build.0 = Release|Any CPU + {360430CE-6850-4A67-88ED-E9508B7D2658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {360430CE-6850-4A67-88ED-E9508B7D2658}.Debug|Any CPU.Build.0 = Debug|Any CPU + {360430CE-6850-4A67-88ED-E9508B7D2658}.Release|Any CPU.ActiveCfg = Release|Any CPU + {360430CE-6850-4A67-88ED-E9508B7D2658}.Release|Any CPU.Build.0 = Release|Any CPU + {800B5CBB-4860-42D3-9F6C-293670ED5936}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {800B5CBB-4860-42D3-9F6C-293670ED5936}.Debug|Any CPU.Build.0 = Debug|Any CPU + {800B5CBB-4860-42D3-9F6C-293670ED5936}.Release|Any CPU.ActiveCfg = Release|Any CPU + {800B5CBB-4860-42D3-9F6C-293670ED5936}.Release|Any CPU.Build.0 = Release|Any CPU + {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A}.Release|Any CPU.Build.0 = Release|Any CPU + {A326741C-C030-4535-BA73-2B508E337CF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A326741C-C030-4535-BA73-2B508E337CF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A326741C-C030-4535-BA73-2B508E337CF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A326741C-C030-4535-BA73-2B508E337CF0}.Release|Any CPU.Build.0 = Release|Any CPU + {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B}.Release|Any CPU.Build.0 = Release|Any CPU + {E2262502-F55A-4967-9D09-30F670BBB045}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E2262502-F55A-4967-9D09-30F670BBB045}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2262502-F55A-4967-9D09-30F670BBB045}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E2262502-F55A-4967-9D09-30F670BBB045}.Release|Any CPU.Build.0 = Release|Any CPU + {78711621-A1FE-4868-8BB1-B886E1AB3879}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78711621-A1FE-4868-8BB1-B886E1AB3879}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78711621-A1FE-4868-8BB1-B886E1AB3879}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78711621-A1FE-4868-8BB1-B886E1AB3879}.Release|Any CPU.Build.0 = Release|Any CPU + {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C7DFAE72-C164-43A6-8C81-FCCA4582710B}.Release|Any CPU.Build.0 = Release|Any CPU + {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06C80BAE-3B73-49C0-9420-CDB7EA969058}.Release|Any CPU.Build.0 = Release|Any CPU + {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84BA182A-6E24-4437-A7DB-13D2D675E14B}.Release|Any CPU.Build.0 = Release|Any CPU + {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B301A0EE-BFA9-4268-8DC3-4F5865992543}.Release|Any CPU.Build.0 = Release|Any CPU + {762E3613-2C9D-412B-B17D-9C087E9CF419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {762E3613-2C9D-412B-B17D-9C087E9CF419}.Debug|Any CPU.Build.0 = Debug|Any CPU + {762E3613-2C9D-412B-B17D-9C087E9CF419}.Release|Any CPU.ActiveCfg = Release|Any CPU + {762E3613-2C9D-412B-B17D-9C087E9CF419}.Release|Any CPU.Build.0 = Release|Any CPU + {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60CAE514-B713-4F3F-8B5D-D3BB34E3805F}.Release|Any CPU.Build.0 = Release|Any CPU + {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C2FA416-00D3-4E1E-87B1-C7E48E162B01}.Release|Any CPU.Build.0 = Release|Any CPU + {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E57EB47C-41CF-4956-835F-D933A0D97D8A}.Release|Any CPU.Build.0 = Release|Any CPU + {66694B90-62FA-410F-8178-AC1641DB8D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {66694B90-62FA-410F-8178-AC1641DB8D11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {66694B90-62FA-410F-8178-AC1641DB8D11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {66694B90-62FA-410F-8178-AC1641DB8D11}.Release|Any CPU.Build.0 = Release|Any CPU + {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1}.Release|Any CPU.Build.0 = Release|Any CPU + {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C}.Release|Any CPU.Build.0 = Release|Any CPU + {F2823AB7-4361-437F-A5C7-D06540BCB362}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2823AB7-4361-437F-A5C7-D06540BCB362}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2823AB7-4361-437F-A5C7-D06540BCB362}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2823AB7-4361-437F-A5C7-D06540BCB362}.Release|Any CPU.Build.0 = Release|Any CPU + {30CFBC0E-D72A-4890-9647-D488273B0F68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30CFBC0E-D72A-4890-9647-D488273B0F68}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30CFBC0E-D72A-4890-9647-D488273B0F68}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30CFBC0E-D72A-4890-9647-D488273B0F68}.Release|Any CPU.Build.0 = Release|Any CPU + {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE910828-296B-45CD-BA01-DCABE27BCC4C}.Release|Any CPU.Build.0 = Release|Any CPU + {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB38C7C5-9F11-43BB-871F-E2E0360FD993}.Release|Any CPU.Build.0 = Release|Any CPU + {34F64873-2412-4835-BA68-D2B278FD120E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34F64873-2412-4835-BA68-D2B278FD120E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34F64873-2412-4835-BA68-D2B278FD120E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34F64873-2412-4835-BA68-D2B278FD120E}.Release|Any CPU.Build.0 = Release|Any CPU + {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B996F6B2-D31E-4312-A98B-AD6D604B6825}.Release|Any CPU.Build.0 = Release|Any CPU + {5949DB91-5528-4547-B0EA-634FEDCC9904}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5949DB91-5528-4547-B0EA-634FEDCC9904}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5949DB91-5528-4547-B0EA-634FEDCC9904}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5949DB91-5528-4547-B0EA-634FEDCC9904}.Release|Any CPU.Build.0 = Release|Any CPU + {7B42684C-9846-4769-814B-5F96C8A7CE82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B42684C-9846-4769-814B-5F96C8A7CE82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B42684C-9846-4769-814B-5F96C8A7CE82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B42684C-9846-4769-814B-5F96C8A7CE82}.Release|Any CPU.Build.0 = Release|Any CPU + {76956954-B37E-4055-B5F5-CF2FFD473598}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76956954-B37E-4055-B5F5-CF2FFD473598}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC79D227-E181-43D1-8D61-0503AB17B689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC79D227-E181-43D1-8D61-0503AB17B689}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC79D227-E181-43D1-8D61-0503AB17B689}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC79D227-E181-43D1-8D61-0503AB17B689}.Release|Any CPU.Build.0 = Release|Any CPU + {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3DCCA97-80ED-4362-A344-EC0305F356A6}.Release|Any CPU.Build.0 = Release|Any CPU + {5EB516C8-510A-437E-8E68-88431717AFC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5EB516C8-510A-437E-8E68-88431717AFC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5EB516C8-510A-437E-8E68-88431717AFC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5EB516C8-510A-437E-8E68-88431717AFC1}.Release|Any CPU.Build.0 = Release|Any CPU + {AC66AB2F-F55B-4667-85DB-F5A24CCAC502}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC66AB2F-F55B-4667-85DB-F5A24CCAC502}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CCACC81-F9A8-4953-AE1D-62AB01CC7CBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6CCACC81-F9A8-4953-AE1D-62AB01CC7CBA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CCACC81-F9A8-4953-AE1D-62AB01CC7CBA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6CCACC81-F9A8-4953-AE1D-62AB01CC7CBA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {DF1C4335-5043-4365-B753-6A8698528E4B} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} = {DF1C4335-5043-4365-B753-6A8698528E4B} + {06D714AE-EDF4-421C-9340-EDA6FCDF491F} = {13BA71F8-58D7-45F6-997D-4DE87E7B41F3} + {76F6B614-D605-427C-ADFE-0A6D63A3858B} = {13BA71F8-58D7-45F6-997D-4DE87E7B41F3} + {B9616684-0252-428D-8D64-CAFC8708F7D1} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {2D4AF534-2435-4FD0-88EC-690227F26172} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {9D0E3DF3-BCB4-4C7A-BE3F-FF6BC5E17903} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {15150029-9E3F-4211-9BF4-DEC868BB0F0E} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {37800063-6675-46B2-8C84-B2F35728C5CE} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {8A21954E-99F6-484A-B7C4-32AC71108285} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {6275041A-FF15-44C4-8386-4D42A234C890} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {F157A154-8E45-443C-8021-29BE9D32325F} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {557BD815-AC5A-4880-9455-F0CE4F493EAD} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {1C0A846B-DD6A-426F-99C0-9479FA9B1AD4} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {F08D7B60-A643-4277-AD67-DBD50F9D4B87} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {70F69EC1-1374-49D2-88AB-111B62664B27} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {10FD6076-863A-4197-B7D5-EC91061F8DD2} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {1094EE0F-A767-429C-8A99-1C0D3FFABC52} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {6A9D0121-D0FC-41B8-8BC4-697176646DA7} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {AB0FB8CB-C232-459F-A6C8-01B574E96D70} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {D7FF923F-5D3F-4B58-A92B-BF0A73A42F48} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {7052A7FA-DA11-43DA-B2BF-5C7898A5CA9C} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {CF623BC9-660E-49D1-B215-B2B285F67DA3} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {C880254A-1775-40F7-9E70-D6B627C58D04} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {1524655C-99D8-41DF-B80B-B7666CBE6B6C} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {3C60925D-A9CE-4957-9C27-C2043A7A42F0} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {A7A02EE7-B2FC-4BE6-AB7E-EAE5FE5EB01D} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {2B504170-1CA6-463B-955A-028EABF70B89} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {93105D4E-D13D-4878-8207-8F6C0CD75D60} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} + {C17C02BA-9DA8-496E-BB15-C2E3D66BBF9E} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} + {C78F3C29-514E-411B-AB80-B484186EF88E} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} + {006E287E-E685-43C2-A379-1DB78C06DCD8} = {903C38CB-C2E2-42D2-9277-74CE675551E8} + {B643D89D-A4ED-4C36-9D18-060096C1F37D} = {903C38CB-C2E2-42D2-9277-74CE675551E8} + {4A4F4D8A-B4AA-4938-8FFA-724E1FEF60EE} = {903C38CB-C2E2-42D2-9277-74CE675551E8} + {8D25581A-C9DD-4DED-A1DB-A26CD9239666} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {6E326CDD-7992-487E-A840-987929DC79EF} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} + {35B85FC1-3134-4FE5-815E-F7C4282C6991} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} + {6932B4A6-A8D8-4F0B-9338-520F6488925E} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} + {AF32BAD3-0D93-4B42-B226-D1ABEEE730F4} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} + {49F96E45-9FB2-496A-ABB8-5B5532FA2BF4} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} + {33AF4A60-5E10-4F84-93A5-E724D013CFC3} = {76F6B614-D605-427C-ADFE-0A6D63A3858B} + {EB4F2036-B4F2-4DEF-838C-480BFF3635E4} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {6F58D49A-BDF4-4599-9584-AC7A4134838E} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {A5BC6269-E1FC-4F91-B1D2-5B4F90571531} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {0BA6342E-C2BE-450C-848B-D4A9898A09F9} = {1E437DEA-7657-48AD-ADA0-7B86608E0768} + {1E437DEA-7657-48AD-ADA0-7B86608E0768} = {6A9D0121-D0FC-41B8-8BC4-697176646DA7} + {903C38CB-C2E2-42D2-9277-74CE675551E8} = {6A9D0121-D0FC-41B8-8BC4-697176646DA7} + {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} = {AB0FB8CB-C232-459F-A6C8-01B574E96D70} + {E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46} = {AB0FB8CB-C232-459F-A6C8-01B574E96D70} + {025B87CC-EDA5-4D82-852E-983A433941FD} = {E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46} + {6F28827E-C0D2-4E33-BAFC-F86A1200E4D4} = {E93EFDC6-CB0D-47BA-B9E4-82A273A2FA46} + {C790AF37-65C9-4E9C-A7E1-B57560411EF2} = {1094EE0F-A767-429C-8A99-1C0D3FFABC52} + {9ED99444-B4ED-43AA-852B-BBC6E4D04C23} = {1094EE0F-A767-429C-8A99-1C0D3FFABC52} + {6B9696B7-02BE-44D1-B48F-4A50C11674D6} = {9ED99444-B4ED-43AA-852B-BBC6E4D04C23} + {D74436AD-38BD-409F-A36B-A3923206A77A} = {9ED99444-B4ED-43AA-852B-BBC6E4D04C23} + {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} = {10FD6076-863A-4197-B7D5-EC91061F8DD2} + {BBE908B0-D642-4002-8A88-9F1726BA8CB6} = {10FD6076-863A-4197-B7D5-EC91061F8DD2} + {2448ABCE-EE9F-44D4-9217-2403EB16CDA4} = {BBE908B0-D642-4002-8A88-9F1726BA8CB6} + {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} = {557BD815-AC5A-4880-9455-F0CE4F493EAD} + {2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E} = {557BD815-AC5A-4880-9455-F0CE4F493EAD} + {90F3080D-8FCA-4F80-BDEA-F9AF2BBD41A4} = {2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E} + {AAE79377-8414-4C23-BF0C-678B68A24BC7} = {8D25581A-C9DD-4DED-A1DB-A26CD9239666} + {F31B1655-A11B-4F30-9BC7-7418B8B915D7} = {8D25581A-C9DD-4DED-A1DB-A26CD9239666} + {4CBCD092-484C-4A80-8ACD-5666AC41C6AD} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {EFC1F89E-1C44-4385-A0F6-1F2124260561} = {DF1C4335-5043-4365-B753-6A8698528E4B} + {BE5A5A1C-E356-4A59-A84E-1A90CDA9C771} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {4E15A31F-57BC-420E-809D-35F7F0B834BC} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {B81FA22E-957A-45DE-95C6-60B88080B3C0} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {49848C95-B8A3-45A4-BF4B-B2C182F58521} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {DE89033E-BB74-43C0-8983-F07E5C75C8AE} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {E045E08A-4F57-4249-8F13-66BE5F19E1E5} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {77EEA619-2203-427D-A00D-11AA70B6104B} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {EE4AC915-F377-4001-834A-6760B4403415} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {92D57E34-502F-4CE3-AC43-3E8A53B2FC91} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {BFE78AAC-6275-45EB-9B73-07958BB5AFD1} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} + {225ABDC8-3612-4236-A2D0-19C1C3638BE1} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} + {05279D11-8B1A-4C97-9F57-750740803C28} = {903C38CB-C2E2-42D2-9277-74CE675551E8} + {3749F82D-B5FC-4E1E-BA4E-4A1DA8347F45} = {903C38CB-C2E2-42D2-9277-74CE675551E8} + {5BCBDA68-8CA0-4305-9872-7F4D36BFC10E} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {58706D00-9A53-4CC4-8201-46C3CEDCE8F9} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {7E7E9EFA-5E7A-4DA0-AD16-CFCD60BCC809} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {82493577-AB78-4338-BE4D-851EEAF8E1A7} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {40F14114-44B0-4EE0-A653-6C8205F6F28C} = {F31B1655-A11B-4F30-9BC7-7418B8B915D7} + {19BE44FE-8852-40DD-AE70-EFA8B1E28730} = {F31B1655-A11B-4F30-9BC7-7418B8B915D7} + {E7B3FFFA-3B6B-45F9-BFD0-0D3344AF979F} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {1BB56A85-74F8-497F-983C-274D51B25CF4} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {6289332A-DBF2-4B99-BEFB-AC01A4C9D262} = {2D0BC8E9-ED6B-49D9-937C-1616ED40FB3E} + {360430CE-6850-4A67-88ED-E9508B7D2658} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + {78F88787-78AB-41E5-9A64-6B77B6CCFBCD} = {0EAF57B8-E97C-469E-A74B-596D78C978B2} + {C258DF5B-0AE0-4DDF-9284-60671699C6ED} = {78F88787-78AB-41E5-9A64-6B77B6CCFBCD} + {800B5CBB-4860-42D3-9F6C-293670ED5936} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} + {6DA882B3-0371-4EEB-ACE8-DE7C7EC2134A} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} + {A326741C-C030-4535-BA73-2B508E337CF0} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} + {B3AE103B-619F-4D78-8CB1-8BC5BFFDEB1B} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} + {E2262502-F55A-4967-9D09-30F670BBB045} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} + {4192A28C-45C0-4D20-B880-F417B8AB752F} = {78F88787-78AB-41E5-9A64-6B77B6CCFBCD} + {78711621-A1FE-4868-8BB1-B886E1AB3879} = {4192A28C-45C0-4D20-B880-F417B8AB752F} + {C7DFAE72-C164-43A6-8C81-FCCA4582710B} = {4192A28C-45C0-4D20-B880-F417B8AB752F} + {06C80BAE-3B73-49C0-9420-CDB7EA969058} = {F31B1655-A11B-4F30-9BC7-7418B8B915D7} + {84BA182A-6E24-4437-A7DB-13D2D675E14B} = {C16FE68A-6CDC-4074-A8E7-8CD16EBDDFAA} + {B301A0EE-BFA9-4268-8DC3-4F5865992543} = {3D324161-C287-4DC0-A9FD-FA3B1A6643FD} + {762E3613-2C9D-412B-B17D-9C087E9CF419} = {001D37F5-B3C5-4288-A2EA-F50DEFD8E2C0} + {60CAE514-B713-4F3F-8B5D-D3BB34E3805F} = {C790AF37-65C9-4E9C-A7E1-B57560411EF2} + {0C2FA416-00D3-4E1E-87B1-C7E48E162B01} = {1FEB1A37-59AD-403D-B7EC-50AD796BB25C} + {E57EB47C-41CF-4956-835F-D933A0D97D8A} = {903C38CB-C2E2-42D2-9277-74CE675551E8} + {66694B90-62FA-410F-8178-AC1641DB8D11} = {C258DF5B-0AE0-4DDF-9284-60671699C6ED} + {8FAB83BF-EE83-4FC3-AA4F-3E954C7E7DD1} = {AAE79377-8414-4C23-BF0C-678B68A24BC7} + {AC21BC09-864E-4C35-A8BE-8575A9C14134} = {B147B99D-3FC7-4D99-A3B7-796AA9FA126C} + {67A5BBF4-88FF-49D7-9EAE-5A37BBAE084C} = {AC21BC09-864E-4C35-A8BE-8575A9C14134} + {F2823AB7-4361-437F-A5C7-D06540BCB362} = {E6BFD37D-335D-4975-B661-BC67FB82F5AA} + {30CFBC0E-D72A-4890-9647-D488273B0F68} = {E6BFD37D-335D-4975-B661-BC67FB82F5AA} + {FB38C7C5-9F11-43BB-871F-E2E0360FD993} = {4192A28C-45C0-4D20-B880-F417B8AB752F} + {9599F729-2B1F-4E96-83F4-C20D0CA1C61B} = {A960F984-B1A3-403E-B2BA-7C4F6287D91F} + {4F812E23-62EB-4B79-8ECA-5CA72CF5D3BC} = {A960F984-B1A3-403E-B2BA-7C4F6287D91F} + {34F64873-2412-4835-BA68-D2B278FD120E} = {9599F729-2B1F-4E96-83F4-C20D0CA1C61B} + {B996F6B2-D31E-4312-A98B-AD6D604B6825} = {4F812E23-62EB-4B79-8ECA-5CA72CF5D3BC} + {5949DB91-5528-4547-B0EA-634FEDCC9904} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} + {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} = {285E30DF-68B4-4A13-981E-E8BAB05489F5} + {E7576FD6-32FA-4EA7-AFDB-0D74F37044A0} = {285E30DF-68B4-4A13-981E-E8BAB05489F5} + {7B42684C-9846-4769-814B-5F96C8A7CE82} = {E7576FD6-32FA-4EA7-AFDB-0D74F37044A0} + {EC79D227-E181-43D1-8D61-0503AB17B689} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} + {D3DCCA97-80ED-4362-A344-EC0305F356A6} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} + {5EB516C8-510A-437E-8E68-88431717AFC1} = {4E66D5C4-1EF2-4605-BBA3-F99BF90E973F} + {6CCACC81-F9A8-4953-AE1D-62AB01CC7CBA} = {06D714AE-EDF4-421C-9340-EDA6FCDF491F} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1F3BD2C6-7CB3-450F-A21A-23EA520D5B7A} + EndGlobalSection +EndGlobal diff --git a/BuildingBlocks/src/BuildingBlocks.SDK/BuildingBlocks.SDK.csproj b/BuildingBlocks/src/BuildingBlocks.SDK/BuildingBlocks.SDK.csproj new file mode 100644 index 0000000000..c632161032 --- /dev/null +++ b/BuildingBlocks/src/BuildingBlocks.SDK/BuildingBlocks.SDK.csproj @@ -0,0 +1,3 @@ + + + diff --git a/ConsumerApi.Sdk/Endpoints/Common/Endpoint.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Endpoint.cs similarity index 66% rename from ConsumerApi.Sdk/Endpoints/Common/Endpoint.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Endpoint.cs index 3dc3ba191b..a541f031df 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/Endpoint.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Endpoint.cs @@ -1,4 +1,4 @@ -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common; public abstract class Endpoint(EndpointClient client) { diff --git a/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/EndpointClient.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/EndpointClient.cs new file mode 100644 index 0000000000..3b560a767e --- /dev/null +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/EndpointClient.cs @@ -0,0 +1,244 @@ +using System.Collections.Specialized; +using System.Net; +using System.Net.Http.Json; +using System.Text; +using System.Text.Json; +using System.Web; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common; + +public class EndpointClient +{ + private const string EMPTY_RESULT = """ + { + "result": {} + } + """; + + private readonly IAuthenticator _authenticator; + + private readonly HttpClient _httpClient; + private readonly JsonSerializerOptions _jsonSerializerOptions; + + public EndpointClient(HttpClient httpClient, IAuthenticator authenticator, JsonSerializerOptions jsonSerializerOptions) + { + _httpClient = httpClient; + _authenticator = authenticator; + _jsonSerializerOptions = jsonSerializerOptions; + } + + public async Task> Post(string url, object? requestContent = null) + => await Request(HttpMethod.Post, url) + .Authenticate() + .WithJson(requestContent) + .Execute(); + + public async Task> PostUnauthenticated(string url, object? requestContent = null) + => await Request(HttpMethod.Post, url) + .WithJson(requestContent) + .Execute(); + + public async Task> Get(string url, object? requestContent = null, PaginationFilter? pagination = null) + => await Request(HttpMethod.Get, url) + .Authenticate() + .WithPagination(pagination) + .WithJson(requestContent) + .Execute(); + + public async Task> GetUnauthenticated(string url, object? requestContent = null, PaginationFilter? pagination = null) + => await Request(HttpMethod.Get, url) + .WithPagination(pagination) + .WithJson(requestContent) + .Execute(); + + public async Task> Put(string url, object? requestContent = null) + => await Request(HttpMethod.Put, url) + .Authenticate() + .WithJson(requestContent) + .Execute(); + + public async Task> Patch(string url, object? requestContent = null) => await Request(HttpMethod.Patch, url) + .Authenticate() + .WithJson(requestContent) + .Execute(); + + public async Task> Delete(string url, object? requestContent = null) => await Request(HttpMethod.Delete, url) + .Authenticate() + .WithJson(requestContent) + .Execute(); + + public RequestBuilder Request(HttpMethod method, string url) => new(this, _jsonSerializerOptions, _authenticator, method, url); + + private async Task> Execute(HttpRequestMessage request) + { + var response = await _httpClient.SendAsync(request); + var responseContent = await response.Content.ReadAsStreamAsync(); + var statusCode = response.StatusCode; + + if (statusCode == HttpStatusCode.NoContent || responseContent.Length == 0) + { + responseContent.Close(); + responseContent = new MemoryStream(Encoding.UTF8.GetBytes(EMPTY_RESULT)); + } + + var deserializedResponseContent = JsonSerializer.Deserialize>(responseContent, _jsonSerializerOptions)!; + deserializedResponseContent.Status = statusCode; + + return deserializedResponseContent; + } + + private async Task ExecuteRaw(HttpRequestMessage request) + { + var response = await _httpClient.SendAsync(request); + + if (!response.IsSuccessStatusCode) + { + var deserialized = (await response.Content.ReadFromJsonAsync>(_jsonSerializerOptions))!; + return new RawApiResponse { Error = deserialized.Error, Status = response.StatusCode }; + } + + var responseBytes = await response.Content.ReadAsByteArrayAsync(); + return new RawApiResponse { Content = responseBytes, Status = response.StatusCode }; + } + + public class RequestBuilder + { + private readonly EndpointClient _client; + private readonly NameValueCollection _extraHeaders = []; + private readonly JsonSerializerOptions _jsonSerializerOptions; + private readonly IAuthenticator _authenticator; + private readonly HttpMethod _method; + private readonly NameValueCollection _queryParameters = []; + + private readonly string _url; + private bool _authenticated; + private HttpContent _content; + + public RequestBuilder(EndpointClient client, JsonSerializerOptions jsonSerializerOptions, IAuthenticator authenticator, HttpMethod method, string url) + { + _client = client; + _jsonSerializerOptions = jsonSerializerOptions; + _authenticator = authenticator; + + _url = url; + _method = method; + _authenticated = false; + _content = JsonContent.Create((object?)null); + } + + public RequestBuilder Authenticate(bool authenticate = true) + { + _authenticated = authenticate; + return this; + } + + public RequestBuilder WithJson(object? content) + { + _content = JsonContent.Create(content, null, _jsonSerializerOptions); + return this; + } + + public RequestBuilder WithUrlEncodedForm(Dictionary formContent) + { + _content = new FormUrlEncodedContent(formContent); + return this; + } + + public RequestBuilder WithMultipartForm(MultipartContent content) + { + _content = content; + return this; + } + + public RequestBuilder WithPagination(PaginationFilter? pagination) + { + if (pagination != null) AddQueryParameters(pagination); + return this; + } + + public RequestBuilder AddQueryParameter(string key, string value) + { + _queryParameters.Add(key, value); + return this; + } + + public RequestBuilder AddQueryParameter(string key, TValue? value) where TValue : unmanaged + { + _queryParameters.Add(key, value.ToString()); + return this; + } + + public RequestBuilder AddQueryParameter(string key, IEnumerable values) + { + foreach (var value in values) + _queryParameters.Add(key, value); + + return this; + } + + public RequestBuilder AddQueryParameter(string key, object value) + { + _queryParameters.Add(key, JsonSerializer.SerializeToElement(value, _jsonSerializerOptions).ToString()); + return this; + } + + public RequestBuilder AddQueryParameters(IQueryParameterStorage parameters) + { + _queryParameters.Add(parameters.ToQueryParameters()); + return this; + } + + public RequestBuilder AddExtraHeader(string key, string value) + { + _extraHeaders.Add(key, value); + return this; + } + + public RequestBuilder AddExtraHeader(string key, List value) + { + foreach (var e in value) _extraHeaders.Add(key, e); + return this; + } + + public RequestBuilder AddExtraHeaders(NameValueCollection headers) + { + _extraHeaders.Add(headers); + return this; + } + + public async Task> Execute() => await _client.Execute(await CreateRequestMessage()); + + public async Task ExecuteRaw() => await _client.ExecuteRaw(await CreateRequestMessage()); + + private async Task CreateRequestMessage() + { + var request = new HttpRequestMessage(_method, EncodeParametersInUrl()) + { + Content = _content + }; + + if (_authenticated) await _authenticator.Authenticate(request); + + foreach (var k in _extraHeaders.AllKeys) + { + var values = _extraHeaders.GetValues(k); + if (k != null && values != null) request.Headers.Add(k, values); + } + + return request; + } + + private string EncodeParametersInUrl() + { + if (_queryParameters.Count == 0) return _url; + + var encodedEntries = _queryParameters.AllKeys + .SelectMany(key => _queryParameters.GetValues(key) ?? [], (key, value) => (key, value)) + .Select(kv => $"{HttpUtility.UrlEncode(kv.key)}={HttpUtility.UrlEncode(kv.value)}") + .ToList(); + + return $"{_url}?{string.Join('&', encodedEntries)}"; + } + } +} diff --git a/ConsumerApi.Sdk/Endpoints/Common/IAuthenticator.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/IAuthenticator.cs similarity index 61% rename from ConsumerApi.Sdk/Endpoints/Common/IAuthenticator.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/IAuthenticator.cs index 68acfacfda..fed0de22ec 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/IAuthenticator.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/IAuthenticator.cs @@ -1,4 +1,4 @@ -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common; public interface IAuthenticator { diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiError.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiError.cs similarity index 72% rename from ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiError.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiError.cs index c80fbc8bae..861252dcf0 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiError.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiError.cs @@ -1,6 +1,6 @@ -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; -public class ConsumerApiError +public class ApiError { public required string Id { get; set; } public required string Code { get; set; } diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiResponse.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiResponse.cs similarity index 79% rename from ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiResponse.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiResponse.cs index 71b20fa33b..0267aebc33 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/ConsumerApiResponse.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/ApiResponse.cs @@ -1,9 +1,9 @@ using System.Diagnostics.CodeAnalysis; using System.Net; -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; -public class ConsumerApiResponse +public class ApiResponse { [MemberNotNullWhen(true, nameof(Result))] [MemberNotNullWhen(false, nameof(Error))] @@ -17,7 +17,7 @@ public class ConsumerApiResponse public bool IsPaginated => Pagination != null; public TResult? Result { get; set; } - public ConsumerApiError? Error { get; set; } + public ApiError? Error { get; set; } public PaginationData? Pagination { get; set; } public HttpStatusCode Status { get; set; } } diff --git a/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EmptyResponse.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EmptyResponse.cs new file mode 100644 index 0000000000..91eb1e17e8 --- /dev/null +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EmptyResponse.cs @@ -0,0 +1,3 @@ +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +public class EmptyResponse; diff --git a/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EnumerableResponseBase.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EnumerableResponseBase.cs new file mode 100644 index 0000000000..f5e2609b03 --- /dev/null +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/EnumerableResponseBase.cs @@ -0,0 +1,50 @@ +using System.Collections; + +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +public abstract class EnumerableResponseBase : ICollection +{ + private readonly ICollection _items = new List(); + + #region ICollection + + public IEnumerator GetEnumerator() + { + return _items.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return _items.GetEnumerator(); + } + + public void Add(TItem item) + { + _items.Add(item); + } + + public void Clear() + { + _items.Clear(); + } + + public bool Contains(TItem item) + { + return _items.Contains(item); + } + + public void CopyTo(TItem[] array, int arrayIndex) + { + _items.CopyTo(array, arrayIndex); + } + + public bool Remove(TItem item) + { + return _items.Remove(item); + } + + public int Count => _items.Count; + public bool IsReadOnly => _items.IsReadOnly; + + #endregion +} diff --git a/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/IQueryParameterStorage.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/IQueryParameterStorage.cs new file mode 100644 index 0000000000..bda5341628 --- /dev/null +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/IQueryParameterStorage.cs @@ -0,0 +1,8 @@ +using System.Collections.Specialized; + +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + +public interface IQueryParameterStorage +{ + public NameValueCollection ToQueryParameters(); +} diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/PaginationData.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/PaginationData.cs similarity index 77% rename from ConsumerApi.Sdk/Endpoints/Common/Types/PaginationData.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/PaginationData.cs index af43a19bff..565749ac44 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/PaginationData.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/PaginationData.cs @@ -1,4 +1,5 @@ -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; + public class PaginationData { public required int PageNumber { get; set; } diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/PaginationFilter.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/PaginationFilter.cs similarity index 72% rename from ConsumerApi.Sdk/Endpoints/Common/Types/PaginationFilter.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/PaginationFilter.cs index 65ff25c343..bb1804d4a0 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/PaginationFilter.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/PaginationFilter.cs @@ -1,8 +1,8 @@ using System.Collections.Specialized; -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; -public class PaginationFilter +public class PaginationFilter : IQueryParameterStorage { public required int PageNumber { get; set; } public required int PageSize { get; set; } diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/RawConsumerApiResponse.cs b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/RawApiResponse.cs similarity index 68% rename from ConsumerApi.Sdk/Endpoints/Common/Types/RawConsumerApiResponse.cs rename to BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/RawApiResponse.cs index 735fea9e5a..129fe92a1f 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/RawConsumerApiResponse.cs +++ b/BuildingBlocks/src/BuildingBlocks.SDK/Endpoints/Common/Types/RawApiResponse.cs @@ -1,9 +1,9 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Net; -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +namespace Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; -public class RawConsumerApiResponse +public class RawApiResponse { [MemberNotNullWhen(true, nameof(Content))] [MemberNotNullWhen(false, nameof(Error))] @@ -14,6 +14,6 @@ public class RawConsumerApiResponse public bool IsError => !IsSuccess; public byte[]? Content { get; set; } - public ConsumerApiError? Error { get; set; } + public ApiError? Error { get; set; } public required HttpStatusCode Status { get; set; } } diff --git a/ConsumerApi.Sdk/Client.cs b/ConsumerApi.Sdk/Client.cs index 0dc541e1d3..83fb14221d 100644 --- a/ConsumerApi.Sdk/Client.cs +++ b/ConsumerApi.Sdk/Client.cs @@ -1,4 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Challenges; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.ConsumerApi.Sdk.Endpoints.Challenges; using Backbone.ConsumerApi.Sdk.Endpoints.Common; using Backbone.ConsumerApi.Sdk.Endpoints.Datawallets; using Backbone.ConsumerApi.Sdk.Endpoints.Devices; diff --git a/ConsumerApi.Sdk/ConsumerApi.Sdk.csproj b/ConsumerApi.Sdk/ConsumerApi.Sdk.csproj index 71141681bf..900872d521 100644 --- a/ConsumerApi.Sdk/ConsumerApi.Sdk.csproj +++ b/ConsumerApi.Sdk/ConsumerApi.Sdk.csproj @@ -1,4 +1,4 @@ - + net8.0 @@ -6,6 +6,7 @@ + diff --git a/ConsumerApi.Sdk/Endpoints/Challenges/ChallengesEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Challenges/ChallengesEndpoint.cs index f1e4c86220..373da368d9 100644 --- a/ConsumerApi.Sdk/Endpoints/Challenges/ChallengesEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Challenges/ChallengesEndpoint.cs @@ -1,13 +1,13 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Challenges.Types; -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; +using Backbone.ConsumerApi.Sdk.Endpoints.Challenges.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Challenges; public class ChallengesEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> CreateChallenge() => await _client.Post("Challenges"); - public async Task> CreateChallengeUnauthenticated() => await _client.PostUnauthenticated("Challenges"); + public async Task> CreateChallenge() => await _client.Post("Challenges"); + public async Task> CreateChallengeUnauthenticated() => await _client.PostUnauthenticated("Challenges"); - public async Task> GetChallenge(string id) => await _client.Get($"Challenges/{id}"); + public async Task> GetChallenge(string id) => await _client.Get($"Challenges/{id}"); } diff --git a/ConsumerApi.Sdk/Endpoints/Common/EndpointClient.cs b/ConsumerApi.Sdk/Endpoints/Common/EndpointClient.cs deleted file mode 100644 index 357cf9bb0b..0000000000 --- a/ConsumerApi.Sdk/Endpoints/Common/EndpointClient.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System.Collections.Specialized; -using System.Net; -using System.Net.Http.Json; -using System.Text.Json; -using System.Web; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; - -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common; - -public class EndpointClient -{ - private const string EMPTY_RESULT = """ - { - "result": {} - } - """; - - private readonly IAuthenticator _authenticator; - - private readonly HttpClient _httpClient; - private readonly JsonSerializerOptions _jsonSerializerOptions; - - public EndpointClient(HttpClient httpClient, IAuthenticator authenticator, JsonSerializerOptions jsonSerializerOptions) - { - _httpClient = httpClient; - _authenticator = authenticator; - _jsonSerializerOptions = jsonSerializerOptions; - } - - public async Task> Post(string url, object? requestContent = null) => await Request(HttpMethod.Post, url) - .Authenticate() - .WithJson(requestContent) - .Execute(); - - public async Task> PostUnauthenticated(string url, object? requestContent = null) => await Request(HttpMethod.Post, url) - .WithJson(requestContent) - .Execute(); - - public async Task> Get(string url, object? requestContent = null, PaginationFilter? pagination = null) => await Request(HttpMethod.Get, url) - .Authenticate() - .WithPagination(pagination) - .WithJson(requestContent) - .Execute(); - - public async Task> GetUnauthenticated(string url, object? requestContent = null, PaginationFilter? pagination = null) => await Request(HttpMethod.Get, url) - .WithPagination(pagination) - .WithJson(requestContent) - .Execute(); - - public async Task> Put(string url, object? requestContent = null) => await Request(HttpMethod.Put, url) - .Authenticate() - .WithJson(requestContent) - .Execute(); - - public async Task> PutUnauthenticated(string url, object? requestContent = null) => await Request(HttpMethod.Put, url) - .WithJson(requestContent) - .Execute(); - - public async Task> Delete(string url, object? requestContent = null) => await Request(HttpMethod.Delete, url) - .Authenticate() - .WithJson(requestContent) - .Execute(); - - public async Task> DeleteUnauthenticated(string url, object? requestContent = null) => await Request(HttpMethod.Delete, url) - .WithJson(requestContent) - .Execute(); - - public RequestBuilder Request(HttpMethod method, string url) => RequestBuilder.Create(this, _jsonSerializerOptions, method, url); - - private async Task> Execute(HttpMethod method, string url, HttpContent content, bool authenticate, NameValueCollection extraHeaders) - { - var response = await ExecuteIntern(method, url, content, authenticate, extraHeaders); - - if (response.StatusCode == HttpStatusCode.NoContent) - { - return new ConsumerApiResponse - { - Status = response.StatusCode, - Result = JsonSerializer.Deserialize(EMPTY_RESULT, _jsonSerializerOptions) - }; - } - - var consumerApiResponse = (await response.Content.ReadFromJsonAsync>(_jsonSerializerOptions))!; - - consumerApiResponse.Status = response.StatusCode; - - return consumerApiResponse; - } - - private async Task ExecuteRaw(HttpMethod method, string url, HttpContent content, bool authenticate, NameValueCollection extraHeaders) - { - var response = await ExecuteIntern(method, url, content, authenticate, extraHeaders); - - if (response.StatusCode >= HttpStatusCode.BadRequest) - { - var deserialized = (await response.Content.ReadFromJsonAsync>(_jsonSerializerOptions))!; - return new RawConsumerApiResponse { Error = deserialized.Error, Status = response.StatusCode }; - } - - var responseBytes = await response.Content.ReadAsByteArrayAsync(); - return new RawConsumerApiResponse { Content = responseBytes, Status = response.StatusCode }; - } - - private async Task ExecuteIntern(HttpMethod method, string url, HttpContent content, bool authenticate, NameValueCollection headers) - { - var httpRequest = new HttpRequestMessage(method, url) { Content = content }; - - if (authenticate) - await _authenticator.Authenticate(httpRequest); - - foreach (var headerName in headers.AllKeys) - { - var values = headers.GetValues(headerName); - - if (headerName != null && values != null) - httpRequest.Headers.Add(headerName, values); - } - - var response = await _httpClient.SendAsync(httpRequest); - return response; - } - - public class RequestBuilder - { - private readonly EndpointClient _client; - private readonly NameValueCollection _extraHeaders = []; - private readonly JsonSerializerOptions _jsonSerializerOptions; - private readonly HttpMethod _method; - private readonly NameValueCollection _queryParameters = []; - - private readonly string _url; - private bool _authenticated; - private HttpContent _content; - - private RequestBuilder(EndpointClient client, JsonSerializerOptions jsonSerializerOptions, HttpMethod method, string url) - { - _client = client; - _jsonSerializerOptions = jsonSerializerOptions; - - _url = url; - _method = method; - _authenticated = false; - _content = JsonContent.Create((object?)null); - } - - public static RequestBuilder Create(EndpointClient client, JsonSerializerOptions jsonSerializerOptions, HttpMethod method, string url) - => new(client, jsonSerializerOptions, method, url); - - public RequestBuilder Authenticate(bool authenticate = true) - { - _authenticated = authenticate; - return this; - } - - public RequestBuilder WithJson(object? content) - { - _content = JsonContent.Create(content, null, _jsonSerializerOptions); - return this; - } - - public RequestBuilder WithUrlEncodedForm(Dictionary formContent) - { - _content = new FormUrlEncodedContent(formContent); - return this; - } - - public RequestBuilder WithMultipartForm(MultipartContent content) - { - _content = content; - return this; - } - - public RequestBuilder WithPagination(PaginationFilter? pagination) - { - if (pagination != null) AddQueryParameters(pagination.ToQueryParameters()); - return this; - } - - public RequestBuilder AddQueryParameter(string key, string value) - { - _queryParameters.Add(key, value); - return this; - } - - public RequestBuilder AddQueryParameter(string key, TValue? value) where TValue : unmanaged - { - _queryParameters.Add(key, value.ToString()); - return this; - } - - public RequestBuilder AddQueryParameter(string key, IEnumerable values) - { - foreach (var value in values) - _queryParameters.Add(key, value); - - return this; - } - - public RequestBuilder AddQueryParameter(string key, object value) - { - _queryParameters.Add(key, JsonSerializer.SerializeToElement(value, _jsonSerializerOptions).ToString()); - return this; - } - - public RequestBuilder AddQueryParameters(NameValueCollection parameters) - { - _queryParameters.Add(parameters); - return this; - } - - public RequestBuilder AddHeader(string key, string value) - { - _extraHeaders.Add(key, value); - return this; - } - - public RequestBuilder AddHeader(string key, List value) - { - foreach (var e in value) _extraHeaders.Add(key, e); - return this; - } - - public RequestBuilder AddHeader(NameValueCollection headers) - { - _extraHeaders.Add(headers); - return this; - } - - public async Task> Execute() => await _client.Execute(_method, EncodeParametersInUrl(), _content, _authenticated, _extraHeaders); - - public async Task ExecuteRaw() => await _client.ExecuteRaw(_method, EncodeParametersInUrl(), _content, _authenticated, _extraHeaders); - - private string EncodeParametersInUrl() - { - if (_queryParameters.Count == 0) return _url; - - var encodedEntries = _queryParameters.AllKeys - .SelectMany(key => _queryParameters.GetValues(key) ?? [], (key, value) => (key, value)) - .Select(kv => $"{HttpUtility.UrlEncode(kv.key)}={HttpUtility.UrlEncode(kv.value)}") - .ToList(); - - return $"{_url}?{string.Join('&', encodedEntries)}"; - } - } -} diff --git a/ConsumerApi.Sdk/Endpoints/Common/OAuthAuthenticator.cs b/ConsumerApi.Sdk/Endpoints/Common/OAuthAuthenticator.cs index 7584a3187a..05b306f63c 100644 --- a/ConsumerApi.Sdk/Endpoints/Common/OAuthAuthenticator.cs +++ b/ConsumerApi.Sdk/Endpoints/Common/OAuthAuthenticator.cs @@ -3,6 +3,7 @@ using System.Net.Http.Json; using System.Text.Json; using System.Text.Json.Serialization; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; namespace Backbone.ConsumerApi.Sdk.Endpoints.Common; diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/EmptyResponse.cs b/ConsumerApi.Sdk/Endpoints/Common/Types/EmptyResponse.cs deleted file mode 100644 index 19ee91b127..0000000000 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/EmptyResponse.cs +++ /dev/null @@ -1,5 +0,0 @@ -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; - -public class EmptyResponse -{ -} diff --git a/ConsumerApi.Sdk/Endpoints/Common/Types/EnumerableResponseBase.cs b/ConsumerApi.Sdk/Endpoints/Common/Types/EnumerableResponseBase.cs deleted file mode 100644 index fc8f71b5b8..0000000000 --- a/ConsumerApi.Sdk/Endpoints/Common/Types/EnumerableResponseBase.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections; - -namespace Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; - -public abstract class EnumerableResponseBase : IEnumerable -{ - private readonly IEnumerable _items; - - protected EnumerableResponseBase(IEnumerable items) - { - _items = items; - } - - public IEnumerator GetEnumerator() - { - return _items.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return _items.GetEnumerator(); - } -} diff --git a/ConsumerApi.Sdk/Endpoints/Datawallets/DatawalletEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Datawallets/DatawalletEndpoint.cs index 6423380925..fddf85fe68 100644 --- a/ConsumerApi.Sdk/Endpoints/Datawallets/DatawalletEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Datawallets/DatawalletEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Datawallets.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Datawallets.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Datawallets.Types.Responses; @@ -8,20 +8,20 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Datawallets; public class DatawalletEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> GetDatawallet() => await _client.Get("Datawallet"); + public async Task> GetDatawallet() => await _client.Get("Datawallet"); - public async Task> GetDatawalletModifications(int localIndex, int supportedDatawalletVersion, PaginationFilter? pagination = null) + public async Task> GetDatawalletModifications(int localIndex, int supportedDatawalletVersion, PaginationFilter? pagination = null) => await _client.Request(HttpMethod.Get, "Datawallet/Modifications") .Authenticate() .WithPagination(pagination) .AddQueryParameter("localIndex", localIndex.ToString()) - .AddHeader("x-Supported-Datawallet-Version", supportedDatawalletVersion.ToString()) + .AddExtraHeader("x-Supported-Datawallet-Version", supportedDatawalletVersion.ToString()) .Execute(); - public async Task> PushDatawalletModifications(PushDatawalletModificationsRequest request, int supportedDatawalletVersion) + public async Task> PushDatawalletModifications(PushDatawalletModificationsRequest request, int supportedDatawalletVersion) => await _client.Request(HttpMethod.Post, "Datawallet/Modifications") .Authenticate() .WithJson(request) - .AddHeader("x-Supported-Datawallet-Version", supportedDatawalletVersion.ToString()) + .AddExtraHeader("x-Supported-Datawallet-Version", supportedDatawalletVersion.ToString()) .Execute(); } diff --git a/ConsumerApi.Sdk/Endpoints/Datawallets/Types/Responses/GetDatawalletModificationsResponse.cs b/ConsumerApi.Sdk/Endpoints/Datawallets/Types/Responses/GetDatawalletModificationsResponse.cs index c371b64b3c..4ed6122dbf 100644 --- a/ConsumerApi.Sdk/Endpoints/Datawallets/Types/Responses/GetDatawalletModificationsResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Datawallets/Types/Responses/GetDatawalletModificationsResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Datawallets.Types.Responses; -public class GetDatawalletModificationsResponse(IEnumerable items) : EnumerableResponseBase(items); +public class GetDatawalletModificationsResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/Devices/DevicesEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Devices/DevicesEndpoint.cs index acf34f5417..1b96b94ce6 100644 --- a/ConsumerApi.Sdk/Endpoints/Devices/DevicesEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Devices/DevicesEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Devices.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Devices.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Devices.Types.Responses; @@ -8,23 +8,23 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Devices; public class DevicesEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> ListDevices(PaginationFilter? pagination = null) + public async Task> ListDevices(PaginationFilter? pagination = null) => await _client.Get("Devices", null, pagination); - public async Task> ListDevices(IEnumerable ids, PaginationFilter? pagination = null) => await _client + public async Task> ListDevices(IEnumerable ids, PaginationFilter? pagination = null) => await _client .Request(HttpMethod.Get, "Devices") .Authenticate() .WithPagination(pagination) .AddQueryParameter("ids", ids) .Execute(); - public async Task> RegisterDevice(RegisterDeviceRequest request) + public async Task> RegisterDevice(RegisterDeviceRequest request) => await _client.Post("Devices", request); - public async Task> GetActiveDevice() => await _client.Get("Devices/Self"); + public async Task> GetActiveDevice() => await _client.Get("Devices/Self"); - public async Task> ChangePassword(ChangePasswordRequest request) + public async Task> ChangePassword(ChangePasswordRequest request) => await _client.Put("Devices/Self/Password", request); - public async Task> DeleteDevice(string id) => await _client.Delete($"Devices/{id}"); + public async Task> DeleteDevice(string id) => await _client.Delete($"Devices/{id}"); } diff --git a/ConsumerApi.Sdk/Endpoints/Devices/Types/Responses/ListDevicesResponse.cs b/ConsumerApi.Sdk/Endpoints/Devices/Types/Responses/ListDevicesResponse.cs index 732138adc0..2e0b8825f4 100644 --- a/ConsumerApi.Sdk/Endpoints/Devices/Types/Responses/ListDevicesResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Devices/Types/Responses/ListDevicesResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Devices.Types.Responses; -public class ListDevicesResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListDevicesResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/Files/FilesEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Files/FilesEndpoint.cs index 465c8188c3..45e13f09a9 100644 --- a/ConsumerApi.Sdk/Endpoints/Files/FilesEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Files/FilesEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Files.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Files.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Files.Types.Responses; @@ -8,26 +8,26 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Files; public class FilesEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> UploadFile(CreateFileRequest request) => await _client + public async Task> UploadFile(CreateFileRequest request) => await _client .Request(HttpMethod.Post, "Files") .Authenticate() .WithMultipartForm(request.ToMultipartContent()) .Execute(); - public async Task>> ListFileMetadata(PaginationFilter? pagination = null) + public async Task>> ListFileMetadata(PaginationFilter? pagination = null) => await _client.Get>("Files", null, pagination); - public async Task>> ListFileMetadata(List ids, PaginationFilter? pagination = null) => await _client + public async Task>> ListFileMetadata(List ids, PaginationFilter? pagination = null) => await _client .Request>(HttpMethod.Get, "Files") .Authenticate() .WithPagination(pagination) .AddQueryParameter("ids", ids) .Execute(); - public async Task> GetFileMetadata(string id) => await _client.Get($"Files/{id}/metadata"); + public async Task> GetFileMetadata(string id) => await _client.Get($"Files/{id}/metadata"); - public async Task DownloadFile(string id) => await _client - .Request(HttpMethod.Get, $"Files/{id}") + public async Task DownloadFile(string id) => await _client + .Request(HttpMethod.Get, $"Files/{id}") .Authenticate() .ExecuteRaw(); } diff --git a/ConsumerApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs index 76d02fce33..fee67846bc 100644 --- a/ConsumerApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Identities/IdentitiesEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Identities.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Identities.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Identities.Types.Responses; @@ -8,18 +8,18 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Identities; public class IdentitiesEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> CreateIdentity(CreateIdentityRequest request) + public async Task> CreateIdentity(CreateIdentityRequest request) => await _client.PostUnauthenticated("Identities", request); - public async Task> StartDeletionProcess() + public async Task> StartDeletionProcess() => await _client.Post("Identities/Self/DeletionProcesses"); - public async Task> ListDeletionProcesses() + public async Task> ListDeletionProcesses() => await _client.Get("Identities/Self/DeletionProcesses"); - public async Task> GetDeletionProcess(string id) + public async Task> GetDeletionProcess(string id) => await _client.Get($"Identities/Self/DeletionProcesses/{id}"); - public async Task> ApproveDeletionProcess(string id) + public async Task> ApproveDeletionProcess(string id) => await _client.Put($"Identities/Self/DeletionProcesses/{id}/Approve"); } diff --git a/ConsumerApi.Sdk/Endpoints/Identities/Types/Responses/ListDeletionProcessesResponse.cs b/ConsumerApi.Sdk/Endpoints/Identities/Types/Responses/ListDeletionProcessesResponse.cs index 38d50d8a80..181a4d6575 100644 --- a/ConsumerApi.Sdk/Endpoints/Identities/Types/Responses/ListDeletionProcessesResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Identities/Types/Responses/ListDeletionProcessesResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Identities.Types.Responses; -public class ListDeletionProcessesResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListDeletionProcessesResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/Messages/MessagesEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Messages/MessagesEndpoint.cs index 4d25670b85..7e72e3fb39 100644 --- a/ConsumerApi.Sdk/Endpoints/Messages/MessagesEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Messages/MessagesEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Messages.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Messages.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Messages.Types.Responses; @@ -8,19 +8,19 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Messages; public class MessagesEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> ListMessages(PaginationFilter? pagination = null) + public async Task> ListMessages(PaginationFilter? pagination = null) => await _client.Get("Messages", null, pagination); - public async Task> ListMessages(IEnumerable ids, PaginationFilter? pagination = null) + public async Task> ListMessages(IEnumerable ids, PaginationFilter? pagination = null) => await _client.Request(HttpMethod.Get, "Messages") .Authenticate() .WithPagination(pagination) .AddQueryParameter("ids", ids) .Execute(); - public async Task> GetMessage(string id, bool noBody = false) => await _client.Request(HttpMethod.Get, $"Messages/{id}") + public async Task> GetMessage(string id, bool noBody = false) => await _client.Request(HttpMethod.Get, $"Messages/{id}") .Authenticate() .AddQueryParameter("noBody", noBody) .Execute(); - public async Task> SendMessage(SendMessageRequest request) => await _client.Post("Messages", request); + public async Task> SendMessage(SendMessageRequest request) => await _client.Post("Messages", request); } diff --git a/ConsumerApi.Sdk/Endpoints/Messages/Types/Responses/ListMessagesResponse.cs b/ConsumerApi.Sdk/Endpoints/Messages/Types/Responses/ListMessagesResponse.cs index 49906edc55..14df0ea981 100644 --- a/ConsumerApi.Sdk/Endpoints/Messages/Types/Responses/ListMessagesResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Messages/Types/Responses/ListMessagesResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Messages.Types.Responses; -public class ListMessagesResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListMessagesResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/PushNotifications/PushNotificationsEndpoint.cs b/ConsumerApi.Sdk/Endpoints/PushNotifications/PushNotificationsEndpoint.cs index 490860b57b..eb7e2dd462 100644 --- a/ConsumerApi.Sdk/Endpoints/PushNotifications/PushNotificationsEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/PushNotifications/PushNotificationsEndpoint.cs @@ -1,6 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; -using Backbone.ConsumerApi.Sdk.Endpoints.PushNotifications.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.PushNotifications.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.PushNotifications.Types.Responses; @@ -8,12 +7,12 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.PushNotifications; public class PushNotificationsEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> RegisterForPushNotifications(UpdateDeviceRegistrationRequest request) + public async Task> RegisterForPushNotifications(UpdateDeviceRegistrationRequest request) => await _client.Put("Devices/Self/PushNotifications", request); - public async Task> UnregisterFromPushNotifications() + public async Task> UnregisterFromPushNotifications() => await _client.Delete("Devices/Self/PushNotifications"); - public async Task> SendTestNotification(object data) + public async Task> SendTestNotification(object data) => await _client.Post("Devices/Self/PushNotifications/SendTestNotification", data); } diff --git a/ConsumerApi.Sdk/Endpoints/Quotas/QuotasEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Quotas/QuotasEndpoint.cs index 697853de37..e9bf783ee4 100644 --- a/ConsumerApi.Sdk/Endpoints/Quotas/QuotasEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Quotas/QuotasEndpoint.cs @@ -1,10 +1,10 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Quotas.Types.Responses; namespace Backbone.ConsumerApi.Sdk.Endpoints.Quotas; public class QuotasEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> ListIndividualQuotas() => await _client.Get("Quotas"); + public async Task> ListIndividualQuotas() => await _client.Get("Quotas"); } diff --git a/ConsumerApi.Sdk/Endpoints/Quotas/Types/Responses/ListIndividualQuotasResponse.cs b/ConsumerApi.Sdk/Endpoints/Quotas/Types/Responses/ListIndividualQuotasResponse.cs index 0685dcc672..bc45e1ae1a 100644 --- a/ConsumerApi.Sdk/Endpoints/Quotas/Types/Responses/ListIndividualQuotasResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Quotas/Types/Responses/ListIndividualQuotasResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Quotas.Types.Responses; -public class ListIndividualQuotasResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListIndividualQuotasResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/RelationshipTemplatesEndpoint.cs b/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/RelationshipTemplatesEndpoint.cs index 68614fd89e..d1067a4019 100644 --- a/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/RelationshipTemplatesEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/RelationshipTemplatesEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.RelationshipTemplates.Types; using Backbone.ConsumerApi.Sdk.Endpoints.RelationshipTemplates.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.RelationshipTemplates.Types.Responses; @@ -8,10 +8,10 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.RelationshipTemplates; public class RelationshipTemplatesEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> ListTemplates(PaginationFilter? pagination = null) + public async Task> ListTemplates(PaginationFilter? pagination = null) => await _client.Get("RelationshipTemplates", null, pagination); - public async Task> ListTemplates(IEnumerable ids, PaginationFilter? pagination = null) + public async Task> ListTemplates(IEnumerable ids, PaginationFilter? pagination = null) => await _client .Request(HttpMethod.Get, "RelationshipTemplates") .Authenticate() @@ -19,8 +19,8 @@ public async Task> ListTe .AddQueryParameter("ids", ids) .Execute(); - public async Task> GetTemplate(string id) => await _client.Get($"RelationshipTemplates/{id}"); + public async Task> GetTemplate(string id) => await _client.Get($"RelationshipTemplates/{id}"); - public async Task> CreateTemplate(CreateRelationshipTemplateRequest request) + public async Task> CreateTemplate(CreateRelationshipTemplateRequest request) => await _client.Post("RelationshipTemplates", request); } diff --git a/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/Types/Responses/ListRelationshipTemplatesResponse.cs b/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/Types/Responses/ListRelationshipTemplatesResponse.cs index 28af779d6f..c42726bb2a 100644 --- a/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/Types/Responses/ListRelationshipTemplatesResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/RelationshipTemplates/Types/Responses/ListRelationshipTemplatesResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.RelationshipTemplates.Types.Responses; -public class ListRelationshipTemplatesResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListRelationshipTemplatesResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs index 9f24944e42..d2f4575a56 100644 --- a/ConsumerApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Relationships/RelationshipsEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Relationships.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Relationships.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Relationships.Types.Responses; @@ -8,22 +8,22 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Relationships; public class RelationshipsEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> GetRelationship(string id) => await _client.Get($"Relationships/{id}"); + public async Task> GetRelationship(string id) => await _client.Get($"Relationships/{id}"); - public async Task> ListRelationships(PaginationFilter? pagination = null) + public async Task> ListRelationships(PaginationFilter? pagination = null) => await _client.Get("Relationships", null, pagination); - public async Task> ListRelationships(IEnumerable ids, PaginationFilter? pagination = null) => await _client + public async Task> ListRelationships(IEnumerable ids, PaginationFilter? pagination = null) => await _client .Request(HttpMethod.Get, "Relationships") .Authenticate() .WithPagination(pagination) .AddQueryParameter("ids", ids) .Execute(); - public async Task> CreateRelationship(CreateRelationshipRequest request) + public async Task> CreateRelationship(CreateRelationshipRequest request) => await _client.Post("Relationships", request); - public async Task> ListChanges( + public async Task> ListChanges( PaginationFilter? pagination = null, IEnumerable? ids = null, OptionalDateRange? createdAt = null, OptionalDateRange? completedAt = null, OptionalDateRange? modifiedAt = null, bool? onlyPeerChanges = null, string? createdBy = null, string? completedBy = null, string? status = null, string? type = null @@ -51,14 +51,14 @@ public async Task> ListChan return await builder.Execute(); } - public async Task> GetChange(string id) => await _client.Get($"Relationships/Changes/{id}"); + public async Task> GetChange(string id) => await _client.Get($"Relationships/Changes/{id}"); - public async Task> AcceptChange(string relationshipId, string changeId, CompleteRelationshipChangeRequest request) + public async Task> AcceptChange(string relationshipId, string changeId, CompleteRelationshipChangeRequest request) => await _client.Put($"Relationships/{relationshipId}/Changes/{changeId}/Accept", request); - public async Task> RejectChange(string relationshipId, string changeId, CompleteRelationshipChangeRequest request) + public async Task> RejectChange(string relationshipId, string changeId, CompleteRelationshipChangeRequest request) => await _client.Put($"Relationships/{relationshipId}/Changes/{changeId}/Reject", request); - public async Task> RevokeChange(string relationshipId, string changeId, CompleteRelationshipChangeRequest request) + public async Task> RevokeChange(string relationshipId, string changeId, CompleteRelationshipChangeRequest request) => await _client.Put($"Relationships/{relationshipId}/Changes/{changeId}/Revoke", request); } diff --git a/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipChangesResponse.cs b/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipChangesResponse.cs index 4398e51127..7c1ae92e18 100644 --- a/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipChangesResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipChangesResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Relationships.Types.Responses; -public class ListRelationshipChangesResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListRelationshipChangesResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs b/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs index 42e621d7e4..8d65c64082 100644 --- a/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Relationships/Types/Responses/ListRelationshipsResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Relationships.Types.Responses; -public class ListRelationshipsResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListRelationshipsResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/SyncRuns/SyncRunsEndpoint.cs b/ConsumerApi.Sdk/Endpoints/SyncRuns/SyncRunsEndpoint.cs index dad8a1f67d..dcc0f484c6 100644 --- a/ConsumerApi.Sdk/Endpoints/SyncRuns/SyncRunsEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/SyncRuns/SyncRunsEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.SyncRuns.Types; using Backbone.ConsumerApi.Sdk.Endpoints.SyncRuns.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.SyncRuns.Types.Responses; @@ -8,24 +8,24 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.SyncRuns; public class SyncRunsEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> StartSyncRun(StartSyncRunRequest request, ushort supportedDatawalletVersion) => await _client + public async Task> StartSyncRun(StartSyncRunRequest request, ushort supportedDatawalletVersion) => await _client .Request(HttpMethod.Post, "SyncRuns") .Authenticate() .WithJson(request) - .AddHeader("X-Supported-Datawallet-Version", supportedDatawalletVersion.ToString()) + .AddExtraHeader("X-Supported-Datawallet-Version", supportedDatawalletVersion.ToString()) .Execute(); - public async Task> GetSyncRun(string id) => await _client.Get($"SyncRuns/{id}"); + public async Task> GetSyncRun(string id) => await _client.Get($"SyncRuns/{id}"); - public async Task> ListExternalEventsOfSyncRun(string id, PaginationFilter? pagination = null) + public async Task> ListExternalEventsOfSyncRun(string id, PaginationFilter? pagination = null) => await _client.Get($"SyncRuns/{id}/ExternalEvents", null, pagination); - public async Task> FinalizeExternalEventSync(string id, FinalizeExternalEventSyncRequest request) + public async Task> FinalizeExternalEventSync(string id, FinalizeExternalEventSyncRequest request) => await _client.Put($"SyncRuns/{id}/FinalizeExternalEventSync", request); - public async Task> FinalizeDatawalletVersionUpgrade(string id, FinalizeDatawalletVersionUpgradeRequest request) + public async Task> FinalizeDatawalletVersionUpgrade(string id, FinalizeDatawalletVersionUpgradeRequest request) => await _client.Put($"SyncRuns/{id}/FinalizeDatawalletVersionUpgrade", request); - public async Task> RefreshExpirationTime(string id) + public async Task> RefreshExpirationTime(string id) => await _client.Put($"SyncRuns/{id}/RefreshExpirationTime"); } diff --git a/ConsumerApi.Sdk/Endpoints/SyncRuns/Types/Responses/ListExternalEventsResponse.cs b/ConsumerApi.Sdk/Endpoints/SyncRuns/Types/Responses/ListExternalEventsResponse.cs index f43a1988ad..09fadf7f03 100644 --- a/ConsumerApi.Sdk/Endpoints/SyncRuns/Types/Responses/ListExternalEventsResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/SyncRuns/Types/Responses/ListExternalEventsResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.SyncRuns.Types.Responses; -public class ListExternalEventsResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListExternalEventsResponse : EnumerableResponseBase; diff --git a/ConsumerApi.Sdk/Endpoints/Tokens/TokensEndpoint.cs b/ConsumerApi.Sdk/Endpoints/Tokens/TokensEndpoint.cs index 6265d68b61..111b573911 100644 --- a/ConsumerApi.Sdk/Endpoints/Tokens/TokensEndpoint.cs +++ b/ConsumerApi.Sdk/Endpoints/Tokens/TokensEndpoint.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common; -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Tokens.Types; using Backbone.ConsumerApi.Sdk.Endpoints.Tokens.Types.Requests; using Backbone.ConsumerApi.Sdk.Endpoints.Tokens.Types.Responses; @@ -8,18 +8,18 @@ namespace Backbone.ConsumerApi.Sdk.Endpoints.Tokens; public class TokensEndpoint(EndpointClient client) : Endpoint(client) { - public async Task> CreateToken(CreateTokenRequest request) + public async Task> CreateToken(CreateTokenRequest request) => await _client.Post("Tokens", request); - public async Task> ListTokens(PaginationFilter? pagination = null) + public async Task> ListTokens(PaginationFilter? pagination = null) => await _client.Get("Tokens", null, pagination); - public async Task> ListTokens(IEnumerable ids, PaginationFilter? pagination = null) => await _client + public async Task> ListTokens(IEnumerable ids, PaginationFilter? pagination = null) => await _client .Request(HttpMethod.Get, "Tokens") .Authenticate() .WithPagination(pagination) .AddQueryParameter("ids", ids) .Execute(); - public async Task> GetToken(string id) => await _client.GetUnauthenticated($"Tokens/{id}"); + public async Task> GetToken(string id) => await _client.GetUnauthenticated($"Tokens/{id}"); } diff --git a/ConsumerApi.Sdk/Endpoints/Tokens/Types/Responses/ListTokensResponse.cs b/ConsumerApi.Sdk/Endpoints/Tokens/Types/Responses/ListTokensResponse.cs index 88643292d9..90ffefad97 100644 --- a/ConsumerApi.Sdk/Endpoints/Tokens/Types/Responses/ListTokensResponse.cs +++ b/ConsumerApi.Sdk/Endpoints/Tokens/Types/Responses/ListTokensResponse.cs @@ -1,5 +1,5 @@ -using Backbone.ConsumerApi.Sdk.Endpoints.Common.Types; +using Backbone.BuildingBlocks.SDK.Endpoints.Common.Types; namespace Backbone.ConsumerApi.Sdk.Endpoints.Tokens.Types.Responses; -public class ListTokensResponse(IEnumerable items) : EnumerableResponseBase(items); +public class ListTokensResponse : EnumerableResponseBase; From f150b8682af6b56de565f512d47ec8187ccafe80 Mon Sep 17 00:00:00 2001 From: Daniel Almeida <115644988+daniel-almeida-konkconsulting@users.noreply.github.com> Date: Wed, 3 Apr 2024 15:49:37 +0100 Subject: [PATCH 7/7] Remove unnecessary database indexes (#586) * feat: remove unnecessary indexes * feat: add postgres migrations * feat: add sqlserver migrations --- ...35431_RemoveUnnecessaryIndexes.Designer.cs | 117 ++++++ ...20240403135431_RemoveUnnecessaryIndexes.cs | 27 ++ .../Migrations/FilesDbContextModelSnapshot.cs | 6 +- ...42030_RemoveUnnecessaryIndexes.Designer.cs | 117 ++++++ ...20240403142030_RemoveUnnecessaryIndexes.cs | 27 ++ .../ApplicationDbContextModelSnapshot.cs | 6 +- .../FileEntityTypeConfiguration.cs | 2 - ...41258_RemoveUnnecessaryIndexes.Designer.cs | 205 ++++++++++ ...20240403141258_RemoveUnnecessaryIndexes.cs | 27 ++ .../MessagesDbContextModelSnapshot.cs | 2 - ...42422_RemoveUnnecessaryIndexes.Designer.cs | 205 ++++++++++ ...20240403142422_RemoveUnnecessaryIndexes.cs | 27 ++ .../ApplicationDbContextModelSnapshot.cs | 2 - .../MessageEntityTypeConfiguration.cs | 2 +- ...pientInformationEntityTypeConfiguration.cs | 3 +- ...40107_RemoveUnnecessaryIndexes.Designer.cs | 357 ++++++++++++++++++ ...20240403140107_RemoveUnnecessaryIndexes.cs | 144 +++++++ .../RelationshipsDbContextModelSnapshot.cs | 28 -- ...42320_RemoveUnnecessaryIndexes.Designer.cs | 357 ++++++++++++++++++ ...20240403142320_RemoveUnnecessaryIndexes.cs | 144 +++++++ .../ApplicationDbContextModelSnapshot.cs | 28 -- ...lationshipChangeEntityTypeConfiguration.cs | 6 +- ...hipChangeRequestEntityTypeConfiguration.cs | 4 - ...ipChangeResponseEntityTypeConfiguration.cs | 4 - .../RelationshipEntityTypeConfiguration.cs | 3 +- ...tionshipTemplateEntityTypeConfiguration.cs | 4 - ...35219_RemoveUnnecessaryIndexes.Designer.cs | 320 ++++++++++++++++ ...20240403135219_RemoveUnnecessaryIndexes.cs | 36 ++ .../SynchronizationDbContextModelSnapshot.cs | 8 +- ...42341_RemoveUnnecessaryIndexes.Designer.cs | 320 ++++++++++++++++ ...20240403142341_RemoveUnnecessaryIndexes.cs | 36 ++ .../ApplicationDbContextModelSnapshot.cs | 8 +- ...lletModificationEntityTypeConfiguration.cs | 1 - .../SyncRunEntityTypeConfiguration.cs | 2 - ...35120_RemoveUnnecessaryIndexes.Designer.cs | 66 ++++ ...20240403135120_RemoveUnnecessaryIndexes.cs | 27 ++ .../TokensDbContextModelSnapshot.cs | 6 +- ...42406_RemoveUnnecessaryIndexes.Designer.cs | 66 ++++ ...20240403142406_RemoveUnnecessaryIndexes.cs | 27 ++ .../ApplicationDbContextModelSnapshot.cs | 6 +- .../TokenEntityTypeConfiguration.cs | 2 - 41 files changed, 2670 insertions(+), 115 deletions(-) create mode 100644 Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.cs create mode 100644 Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.Designer.cs create mode 100644 Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.cs diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..08dbeb5072 --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,117 @@ +// +using System; +using Backbone.Modules.Files.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(FilesDbContext))] + [Migration("20240403135431_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Files.Domain.Entities.File", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CipherHash") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("CipherSize") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("DeletedBy") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("EncryptedProperties") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ModifiedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ModifiedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("ModifiedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("OwnerSignature") + .IsRequired() + .HasColumnType("bytea"); + + b.HasKey("Id"); + + b.ToTable("FileMetadata", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.cs b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..a2563014ae --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/20240403135431_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_FileMetadata_CreatedBy", + table: "FileMetadata"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_FileMetadata_CreatedBy", + table: "FileMetadata", + column: "CreatedBy"); + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs index 0592c7de59..b4c13deda0 100644 --- a/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs +++ b/Modules/Files/src/Files.Infrastructure.Database.Postgres/Migrations/FilesDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Files.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -106,8 +106,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.ToTable("FileMetadata", (string)null); }); #pragma warning restore 612, 618 diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..c76d6d0fcf --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,117 @@ +// +using System; +using Backbone.Modules.Files.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(FilesDbContext))] + [Migration("20240403142030_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Files.Domain.Entities.File", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CipherHash") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("CipherSize") + .HasColumnType("bigint"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("datetime2"); + + b.Property("DeletedBy") + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("DeletedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("EncryptedProperties") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("ModifiedAt") + .HasColumnType("datetime2"); + + b.Property("ModifiedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("ModifiedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("OwnerSignature") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.HasKey("Id"); + + b.ToTable("FileMetadata", (string)null); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.cs b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..4f8a74f5cb --- /dev/null +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/20240403142030_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Files.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_FileMetadata_CreatedBy", + table: "FileMetadata"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_FileMetadata_CreatedBy", + table: "FileMetadata", + column: "CreatedBy"); + } + } +} diff --git a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index ba51e47cae..635c3681ea 100644 --- a/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Files/src/Files.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Files.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -106,8 +106,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.ToTable("FileMetadata", (string)null); }); #pragma warning restore 612, 618 diff --git a/Modules/Files/src/Files.Infrastructure/Persistence/Database/EntityTypeConfigurations/FileEntityTypeConfiguration.cs b/Modules/Files/src/Files.Infrastructure/Persistence/Database/EntityTypeConfigurations/FileEntityTypeConfiguration.cs index b775c6eabe..5ab7592677 100644 --- a/Modules/Files/src/Files.Infrastructure/Persistence/Database/EntityTypeConfigurations/FileEntityTypeConfiguration.cs +++ b/Modules/Files/src/Files.Infrastructure/Persistence/Database/EntityTypeConfigurations/FileEntityTypeConfiguration.cs @@ -10,8 +10,6 @@ public void Configure(EntityTypeBuilder builder) { builder.ToTable("FileMetadata"); - builder.HasIndex(m => m.CreatedBy); - builder.Property(m => m.CipherHash).IsRequired(); builder.Ignore(m => m.Content); diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..84fa4a3c39 --- /dev/null +++ b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,205 @@ +// +using System; +using Backbone.Modules.Messages.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Messages.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(MessagesDbContext))] + [Migration("20240403141258_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Attachment", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("MessageId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id", "MessageId"); + + b.HasIndex("MessageId"); + + b.ToTable("Attachments", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Message", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Body") + .HasColumnType("bytea"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.ToTable("Messages"); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.RecipientInformation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("EncryptedKey") + .IsRequired() + .HasColumnType("bytea"); + + b.Property("MessageId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ReceivedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ReceivedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("RelationshipId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.HasIndex("ReceivedAt"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("Address", "MessageId"); + + b.ToTable("RecipientInformation"); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Relationship", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("From") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("To") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("Relationships", "Relationships", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Attachment", b => + { + b.HasOne("Backbone.Modules.Messages.Domain.Entities.Message", null) + .WithMany("Attachments") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.RecipientInformation", b => + { + b.HasOne("Backbone.Modules.Messages.Domain.Entities.Message", null) + .WithMany("Recipients") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Messages.Domain.Entities.Relationship", null) + .WithMany() + .HasForeignKey("RelationshipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Message", b => + { + b.Navigation("Attachments"); + + b.Navigation("Recipients"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.cs b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..669a2ce582 --- /dev/null +++ b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/20240403141258_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Messages.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Messages_CreatedAt", + table: "Messages"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_Messages_CreatedAt", + table: "Messages", + column: "CreatedAt"); + } + } +} diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/MessagesDbContextModelSnapshot.cs b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/MessagesDbContextModelSnapshot.cs index c646555be9..f6bb000b1d 100644 --- a/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/MessagesDbContextModelSnapshot.cs +++ b/Modules/Messages/src/Messages.Infrastructure.Database.Postgres/Migrations/MessagesDbContextModelSnapshot.cs @@ -73,8 +73,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - b.HasIndex("CreatedBy"); b.ToTable("Messages"); diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..b04b04a5a5 --- /dev/null +++ b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,205 @@ +// +using System; +using Backbone.Modules.Messages.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Messages.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(MessagesDbContext))] + [Migration("20240403142422_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Attachment", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("MessageId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id", "MessageId"); + + b.HasIndex("MessageId"); + + b.ToTable("Attachments", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Message", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Body") + .HasColumnType("varbinary(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy"); + + b.ToTable("Messages"); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.RecipientInformation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("EncryptedKey") + .IsRequired() + .HasColumnType("varbinary(max)"); + + b.Property("MessageId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ReceivedAt") + .HasColumnType("datetime2"); + + b.Property("ReceivedByDevice") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("RelationshipId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("MessageId"); + + b.HasIndex("ReceivedAt"); + + b.HasIndex("RelationshipId"); + + b.HasIndex("Address", "MessageId"); + + b.ToTable("RecipientInformation"); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Relationship", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("From") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("To") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("Relationships", "Relationships", t => + { + t.ExcludeFromMigrations(); + }); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Attachment", b => + { + b.HasOne("Backbone.Modules.Messages.Domain.Entities.Message", null) + .WithMany("Attachments") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.RecipientInformation", b => + { + b.HasOne("Backbone.Modules.Messages.Domain.Entities.Message", null) + .WithMany("Recipients") + .HasForeignKey("MessageId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Messages.Domain.Entities.Relationship", null) + .WithMany() + .HasForeignKey("RelationshipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Messages.Domain.Entities.Message", b => + { + b.Navigation("Attachments"); + + b.Navigation("Recipients"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.cs b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..b3ea29d2c2 --- /dev/null +++ b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/20240403142422_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Messages.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Messages_CreatedAt", + table: "Messages"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_Messages_CreatedAt", + table: "Messages", + column: "CreatedAt"); + } + } +} diff --git a/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index fce70e189b..ef5a1a4b4e 100644 --- a/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Messages/src/Messages.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -73,8 +73,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - b.HasIndex("CreatedBy"); b.ToTable("Messages"); diff --git a/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/MessageEntityTypeConfiguration.cs b/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/MessageEntityTypeConfiguration.cs index d158f47657..e55760c242 100644 --- a/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/MessageEntityTypeConfiguration.cs +++ b/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/MessageEntityTypeConfiguration.cs @@ -9,10 +9,10 @@ public class MessageEntityTypeConfiguration : IEntityTypeConfiguration public void Configure(EntityTypeBuilder builder) { builder.HasIndex(m => m.CreatedBy); - builder.HasIndex(m => m.CreatedAt); builder.Property(m => m.Body).IsRequired(false); builder.Property(x => x.CreatedByDevice); + builder.Property(x => x.CreatedAt); builder.HasKey(m => m.Id); } diff --git a/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/RecipientInformationEntityTypeConfiguration.cs b/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/RecipientInformationEntityTypeConfiguration.cs index 7bac46ddcf..4cc20f518e 100644 --- a/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/RecipientInformationEntityTypeConfiguration.cs +++ b/Modules/Messages/src/Messages.Infrastructure/Persistence/Database/EntityConfigurations/RecipientInformationEntityTypeConfiguration.cs @@ -11,9 +11,10 @@ public void Configure(EntityTypeBuilder builder) builder.HasKey(r => r.Id); builder.HasIndex(m => m.ReceivedAt); - builder.HasIndex(m => m.RelationshipId); builder.HasIndex(r => new { r.Address, r.MessageId }); + builder.Property(r => r.RelationshipId); + builder .Property(r => r.EncryptedKey) .IsRequired(); diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..8fe1232863 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,357 @@ +// +using System; +using Backbone.Modules.Relationships.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(RelationshipsDbContext))] + [Migration("20240403140107_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("From") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("To") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("From"); + + b.HasIndex("RelationshipTemplateId"); + + b.HasIndex("To"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("character varying(20)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Discriminator") + .IsRequired() + .HasMaxLength(34) + .HasColumnType("character varying(34)"); + + b.Property("RelationshipId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("integer"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("RelationshipId"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("RelationshipChange"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("character varying(20)"); + + b.Property("Content") + .HasColumnType("bytea") + .HasColumnName("Req_Content"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("Req_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .HasColumnName("Req_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .HasColumnName("Req_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("character varying(20)"); + + b.Property("Content") + .HasColumnType("bytea") + .HasColumnName("Res_Content"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone") + .HasColumnName("Res_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .HasColumnName("Res_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .HasColumnName("Res_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") + .HasAnnotation("SqlServer:Include", new[] { "Content" }); + + NpgsqlIndexBuilderExtensions.IncludeProperties(b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice"), new[] { "Content" }); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Content") + .HasColumnType("bytea"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.Property("MaxNumberOfAllocations") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.ToTable("RelationshipTemplates"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("AllocatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("AllocatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("AllocatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("RelationshipTemplateId", "AllocatedBy"); + + b.ToTable("RelationshipTemplateAllocations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipCreationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipCreationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTerminationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipTerminationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", "RelationshipTemplate") + .WithMany("Relationships") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("RelationshipTemplate"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.Relationship", "Relationship") + .WithMany("Changes") + .HasForeignKey("RelationshipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Relationship"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Request") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Response") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", null) + .WithMany("Allocations") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Navigation("Changes"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Navigation("Request") + .IsRequired(); + + b.Navigation("Response"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Navigation("Allocations"); + + b.Navigation("Relationships"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..a4c98c4e4e --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/20240403140107_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,144 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_RelationshipTemplates_CreatedBy", + table: "RelationshipTemplates"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipTemplates_DeletedAt", + table: "RelationshipTemplates"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipTemplates_ExpiresAt", + table: "RelationshipTemplates"); + + migrationBuilder.DropIndex( + name: "IX_Relationships_CreatedAt", + table: "Relationships"); + + migrationBuilder.DropIndex( + name: "IX_Relationships_Status", + table: "Relationships"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_CreatedAt", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Req_CreatedAt", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Req_CreatedBy", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Req_CreatedByDevice", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedAt", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedBy", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedByDevice", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Status", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Type", + table: "RelationshipChanges"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_RelationshipTemplates_CreatedBy", + table: "RelationshipTemplates", + column: "CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipTemplates_DeletedAt", + table: "RelationshipTemplates", + column: "DeletedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipTemplates_ExpiresAt", + table: "RelationshipTemplates", + column: "ExpiresAt"); + + migrationBuilder.CreateIndex( + name: "IX_Relationships_CreatedAt", + table: "Relationships", + column: "CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_Relationships_Status", + table: "Relationships", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_CreatedAt", + table: "RelationshipChanges", + column: "CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Req_CreatedAt", + table: "RelationshipChanges", + column: "Req_CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Req_CreatedBy", + table: "RelationshipChanges", + column: "Req_CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Req_CreatedByDevice", + table: "RelationshipChanges", + column: "Req_CreatedByDevice"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedAt", + table: "RelationshipChanges", + column: "Res_CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedBy", + table: "RelationshipChanges", + column: "Res_CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedByDevice", + table: "RelationshipChanges", + column: "Res_CreatedByDevice"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Status", + table: "RelationshipChanges", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Type", + table: "RelationshipChanges", + column: "Type"); + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs index 226f59f363..30f0327ca6 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.Postgres/Migrations/RelationshipsDbContextModelSnapshot.cs @@ -59,14 +59,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - b.HasIndex("From"); b.HasIndex("RelationshipTemplateId"); - b.HasIndex("Status"); - b.HasIndex("To"); b.ToTable("Relationships"); @@ -101,14 +97,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - b.HasIndex("RelationshipId"); - b.HasIndex("Status"); - - b.HasIndex("Type"); - b.ToTable("RelationshipChanges", (string)null); b.HasDiscriminator("Discriminator").HasValue("RelationshipChange"); @@ -148,12 +138,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - - b.HasIndex("CreatedBy"); - - b.HasIndex("CreatedByDevice"); - b.ToTable("RelationshipChanges", (string)null); }); @@ -189,12 +173,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - - b.HasIndex("CreatedBy"); - - b.HasIndex("CreatedByDevice"); - b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") .HasAnnotation("SqlServer:Include", new[] { "Content" }); @@ -242,12 +220,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - - b.HasIndex("DeletedAt"); - - b.HasIndex("ExpiresAt"); - b.ToTable("RelationshipTemplates"); }); diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..b3404b0ca6 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,357 @@ +// +using System; +using Backbone.Modules.Relationships.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(RelationshipsDbContext))] + [Migration("20240403142320_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("From") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("To") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("From"); + + b.HasIndex("RelationshipTemplateId"); + + b.HasIndex("To"); + + b.ToTable("Relationships"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Discriminator") + .IsRequired() + .HasMaxLength(34) + .HasColumnType("nvarchar(34)"); + + b.Property("RelationshipId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("RelationshipId"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator("Discriminator").HasValue("RelationshipChange"); + + b.UseTphMappingStrategy(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Content") + .HasColumnType("varbinary(max)") + .HasColumnName("Req_Content"); + + b.Property("CreatedAt") + .HasColumnType("datetime2") + .HasColumnName("Req_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .HasColumnName("Req_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .HasColumnName("Req_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.Property("Id") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Content") + .HasColumnType("varbinary(max)") + .HasColumnName("Res_Content"); + + b.Property("CreatedAt") + .HasColumnType("datetime2") + .HasColumnName("Res_CreatedAt"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .HasColumnName("Res_CreatedBy") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .HasColumnName("Res_CreatedByDevice") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") + .HasAnnotation("Npgsql:IndexInclude", new[] { "Content" }); + + SqlServerIndexBuilderExtensions.IncludeProperties(b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice"), new[] { "Content" }); + + b.ToTable("RelationshipChanges", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Content") + .HasColumnType("varbinary(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DeletedAt") + .HasColumnType("datetime2"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("MaxNumberOfAllocations") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("RelationshipTemplates"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AllocatedAt") + .HasColumnType("datetime2"); + + b.Property("AllocatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("AllocatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("RelationshipTemplateId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("RelationshipTemplateId", "AllocatedBy"); + + b.ToTable("RelationshipTemplateAllocations", (string)null); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipCreationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipCreationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTerminationChange", b => + { + b.HasBaseType("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange"); + + b.ToTable("RelationshipChanges", (string)null); + + b.HasDiscriminator().HasValue("RelationshipTerminationChange"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", "RelationshipTemplate") + .WithMany("Relationships") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("RelationshipTemplate"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.Relationship", "Relationship") + .WithMany("Changes") + .HasForeignKey("RelationshipId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Relationship"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Request") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeRequest", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", null) + .WithOne("Response") + .HasForeignKey("Backbone.Modules.Relationships.Domain.Entities.RelationshipChangeResponse", "Id") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplateAllocation", b => + { + b.HasOne("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", null) + .WithMany("Allocations") + .HasForeignKey("RelationshipTemplateId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.Relationship", b => + { + b.Navigation("Changes"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipChange", b => + { + b.Navigation("Request") + .IsRequired(); + + b.Navigation("Response"); + }); + + modelBuilder.Entity("Backbone.Modules.Relationships.Domain.Entities.RelationshipTemplate", b => + { + b.Navigation("Allocations"); + + b.Navigation("Relationships"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..84535124a8 --- /dev/null +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/20240403142320_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,144 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Relationships.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_RelationshipTemplates_CreatedBy", + table: "RelationshipTemplates"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipTemplates_DeletedAt", + table: "RelationshipTemplates"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipTemplates_ExpiresAt", + table: "RelationshipTemplates"); + + migrationBuilder.DropIndex( + name: "IX_Relationships_CreatedAt", + table: "Relationships"); + + migrationBuilder.DropIndex( + name: "IX_Relationships_Status", + table: "Relationships"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_CreatedAt", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Req_CreatedAt", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Req_CreatedBy", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Req_CreatedByDevice", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedAt", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedBy", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Res_CreatedByDevice", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Status", + table: "RelationshipChanges"); + + migrationBuilder.DropIndex( + name: "IX_RelationshipChanges_Type", + table: "RelationshipChanges"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_RelationshipTemplates_CreatedBy", + table: "RelationshipTemplates", + column: "CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipTemplates_DeletedAt", + table: "RelationshipTemplates", + column: "DeletedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipTemplates_ExpiresAt", + table: "RelationshipTemplates", + column: "ExpiresAt"); + + migrationBuilder.CreateIndex( + name: "IX_Relationships_CreatedAt", + table: "Relationships", + column: "CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_Relationships_Status", + table: "Relationships", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_CreatedAt", + table: "RelationshipChanges", + column: "CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Req_CreatedAt", + table: "RelationshipChanges", + column: "Req_CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Req_CreatedBy", + table: "RelationshipChanges", + column: "Req_CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Req_CreatedByDevice", + table: "RelationshipChanges", + column: "Req_CreatedByDevice"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedAt", + table: "RelationshipChanges", + column: "Res_CreatedAt"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedBy", + table: "RelationshipChanges", + column: "Res_CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Res_CreatedByDevice", + table: "RelationshipChanges", + column: "Res_CreatedByDevice"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Status", + table: "RelationshipChanges", + column: "Status"); + + migrationBuilder.CreateIndex( + name: "IX_RelationshipChanges_Type", + table: "RelationshipChanges", + column: "Type"); + } + } +} diff --git a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index d3b17c2345..d5d5fca1a1 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -59,14 +59,10 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - b.HasIndex("From"); b.HasIndex("RelationshipTemplateId"); - b.HasIndex("Status"); - b.HasIndex("To"); b.ToTable("Relationships"); @@ -101,14 +97,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - b.HasIndex("RelationshipId"); - b.HasIndex("Status"); - - b.HasIndex("Type"); - b.ToTable("RelationshipChanges", (string)null); b.HasDiscriminator("Discriminator").HasValue("RelationshipChange"); @@ -148,12 +138,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - - b.HasIndex("CreatedBy"); - - b.HasIndex("CreatedByDevice"); - b.ToTable("RelationshipChanges", (string)null); }); @@ -189,12 +173,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedAt"); - - b.HasIndex("CreatedBy"); - - b.HasIndex("CreatedByDevice"); - b.HasIndex("CreatedAt", "CreatedBy", "CreatedByDevice") .HasAnnotation("Npgsql:IndexInclude", new[] { "Content" }); @@ -242,12 +220,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - - b.HasIndex("DeletedAt"); - - b.HasIndex("ExpiresAt"); - b.ToTable("RelationshipTemplates"); }); diff --git a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeEntityTypeConfiguration.cs b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeEntityTypeConfiguration.cs index a1cb276c6a..824cd81d2c 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeEntityTypeConfiguration.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeEntityTypeConfiguration.cs @@ -10,10 +10,6 @@ public void Configure(EntityTypeBuilder builder) { builder.ToTable("RelationshipChanges"); - builder.HasIndex(x => x.Status); - builder.HasIndex(x => x.Type); - builder.HasIndex(x => x.CreatedAt); - builder.Ignore(x => x.IsCompleted); builder.Ignore(x => x.Request); builder.Ignore(x => x.Response); @@ -21,6 +17,8 @@ public void Configure(EntityTypeBuilder builder) builder.HasKey(x => x.Id); builder.Property(x => x.RelationshipId); + builder.Property(x => x.CreatedAt); + builder.Property(x => x.Type); builder.HasOne(x => x.Relationship).WithMany(x => x.Changes); diff --git a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeRequestEntityTypeConfiguration.cs b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeRequestEntityTypeConfiguration.cs index 12ccc17d19..e724db53c2 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeRequestEntityTypeConfiguration.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeRequestEntityTypeConfiguration.cs @@ -10,10 +10,6 @@ public void Configure(EntityTypeBuilder builder) { builder.ToTable("RelationshipChanges"); - builder.HasIndex(x => x.CreatedAt); - builder.HasIndex(x => x.CreatedBy); - builder.HasIndex(x => x.CreatedByDevice); - builder.Property(x => x.CreatedBy) .HasColumnName("Req_CreatedBy"); diff --git a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs index 472f2363cc..33b1461edd 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipChangeResponseEntityTypeConfiguration.cs @@ -10,10 +10,6 @@ public void Configure(EntityTypeBuilder builder) { builder.ToTable("RelationshipChanges"); - builder.HasIndex(x => x.CreatedAt); - builder.HasIndex(x => x.CreatedBy); - builder.HasIndex(x => x.CreatedByDevice); - var indexBuilder = builder.HasIndex(x => new { x.CreatedAt, x.CreatedBy, x.CreatedByDevice }); NpgsqlIndexBuilderExtensions.IncludeProperties(indexBuilder, x => x.Content!); SqlServerIndexBuilderExtensions.IncludeProperties(indexBuilder, x => x.Content); diff --git a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipEntityTypeConfiguration.cs b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipEntityTypeConfiguration.cs index 3e0c39269a..4a4355ede7 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipEntityTypeConfiguration.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipEntityTypeConfiguration.cs @@ -10,12 +10,11 @@ public void Configure(EntityTypeBuilder builder) { builder.HasIndex(x => x.From); builder.HasIndex(x => x.To); - builder.HasIndex(x => x.CreatedAt); - builder.HasIndex(x => x.Status); builder.HasKey(x => x.Id); builder.Property(x => x.RelationshipTemplateId); + builder.Property(x => x.CreatedAt); builder.Metadata.FindNavigation(nameof(Relationship.Changes))!.SetPropertyAccessMode(PropertyAccessMode.Field); } diff --git a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipTemplateEntityTypeConfiguration.cs b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipTemplateEntityTypeConfiguration.cs index e592b47f3b..833b1c2dfe 100644 --- a/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipTemplateEntityTypeConfiguration.cs +++ b/Modules/Relationships/src/Relationships.Infrastructure/Persistence/Database/EntityTypeConfigurations/RelationshipTemplateEntityTypeConfiguration.cs @@ -8,10 +8,6 @@ public class RelationshipTemplateEntityTypeConfiguration : IEntityTypeConfigurat { public void Configure(EntityTypeBuilder builder) { - builder.HasIndex(x => x.CreatedBy); - builder.HasIndex(x => x.DeletedAt); - builder.HasIndex(x => x.ExpiresAt); - builder .HasMany(x => x.Relationships) .WithOne(x => x.RelationshipTemplate) diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..1cc7336402 --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,320 @@ +// +using System; +using Backbone.Modules.Synchronization.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Synchronization.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(SynchronizationDbContext))] + [Migration("20240403135219_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Datawallet", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("Version") + .IsUnicode(false) + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("Owner") + .IsUnique(); + + b.ToTable("Datawallets"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.DatawalletModification", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("BlobReference") + .IsRequired() + .HasMaxLength(32) + .IsUnicode(false) + .HasColumnType("character(32)") + .IsFixedLength(); + + b.Property("Collection") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DatawalletId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("DatawalletVersion") + .IsUnicode(false) + .HasColumnType("integer"); + + b.Property("EncryptedPayload") + .HasColumnType("bytea"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("ObjectIdentifier") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("character varying(100)"); + + b.Property("PayloadCategory") + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("DatawalletId"); + + b.HasIndex("CreatedBy", "Index") + .IsUnique(); + + b.ToTable("DatawalletModifications"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("Payload") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("character varying(200)"); + + b.Property("SyncErrorCount") + .HasColumnType("smallint"); + + b.Property("SyncRunId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("SyncRunId"); + + b.HasIndex("Owner", "Index") + .IsUnique(); + + b.HasIndex("Owner", "SyncRunId"); + + b.ToTable("ExternalEvents"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncError", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ErrorCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)"); + + b.Property("ExternalEventId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("SyncRunId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ExternalEventId"); + + b.HasIndex("SyncRunId", "ExternalEventId") + .IsUnique(); + + b.ToTable("SyncErrors"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("EventCount") + .HasColumnType("integer"); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.Property("FinalizedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("Type") + .HasColumnType("integer"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy", "FinalizedAt"); + + b.HasIndex("CreatedBy", "Index") + .IsUnique(); + + b.ToTable("SyncRuns"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.DatawalletModification", b => + { + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Datawallet", "Datawallet") + .WithMany("Modifications") + .HasForeignKey("DatawalletId"); + + b.Navigation("Datawallet"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", b => + { + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", "SyncRun") + .WithMany("ExternalEvents") + .HasForeignKey("SyncRunId"); + + b.Navigation("SyncRun"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncError", b => + { + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", null) + .WithMany("Errors") + .HasForeignKey("ExternalEventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", null) + .WithMany("Errors") + .HasForeignKey("SyncRunId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Datawallet", b => + { + b.Navigation("Modifications"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", b => + { + b.Navigation("Errors"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", b => + { + b.Navigation("Errors"); + + b.Navigation("ExternalEvents"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.cs b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..80c0f2bce5 --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/20240403135219_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Synchronization.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_SyncRuns_CreatedBy", + table: "SyncRuns"); + + migrationBuilder.DropIndex( + name: "IX_DatawalletModifications_CreatedBy", + table: "DatawalletModifications"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_SyncRuns_CreatedBy", + table: "SyncRuns", + column: "CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_DatawalletModifications_CreatedBy", + table: "DatawalletModifications", + column: "CreatedBy"); + } + } +} diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/SynchronizationDbContextModelSnapshot.cs b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/SynchronizationDbContextModelSnapshot.cs index 606576ac13..06d9b867f4 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/SynchronizationDbContextModelSnapshot.cs +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.Postgres/Migrations/SynchronizationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Synchronization.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -116,8 +116,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.HasIndex("DatawalletId"); b.HasIndex("CreatedBy", "Index") @@ -256,8 +254,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.HasIndex("CreatedBy", "FinalizedAt"); b.HasIndex("CreatedBy", "Index") diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..2f4c937d5d --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,320 @@ +// +using System; +using Backbone.Modules.Synchronization.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Synchronization.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(SynchronizationDbContext))] + [Migration("20240403142341_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Datawallet", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("Version") + .IsUnicode(false) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("Owner") + .IsUnique(); + + b.ToTable("Datawallets"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.DatawalletModification", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("BlobReference") + .IsRequired() + .HasMaxLength(32) + .IsUnicode(false) + .HasColumnType("char(32)") + .IsFixedLength(); + + b.Property("Collection") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DatawalletId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("DatawalletVersion") + .IsUnicode(false) + .HasColumnType("int"); + + b.Property("EncryptedPayload") + .HasColumnType("varbinary(max)"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("ObjectIdentifier") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("PayloadCategory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("DatawalletId"); + + b.HasIndex("CreatedBy", "Index") + .IsUnique(); + + b.ToTable("DatawalletModifications"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("Owner") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("Payload") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("SyncErrorCount") + .HasColumnType("tinyint"); + + b.Property("SyncRunId") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("SyncRunId"); + + b.HasIndex("Owner", "Index") + .IsUnique(); + + b.HasIndex("Owner", "SyncRunId"); + + b.ToTable("ExternalEvents"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncError", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ErrorCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ExternalEventId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("SyncRunId") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.HasKey("Id"); + + b.HasIndex("ExternalEventId"); + + b.HasIndex("SyncRunId", "ExternalEventId") + .IsUnique(); + + b.ToTable("SyncErrors"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("EventCount") + .HasColumnType("int"); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.Property("FinalizedAt") + .HasColumnType("datetime2"); + + b.Property("Index") + .HasColumnType("bigint"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreatedBy", "FinalizedAt"); + + b.HasIndex("CreatedBy", "Index") + .IsUnique(); + + b.ToTable("SyncRuns"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.DatawalletModification", b => + { + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Datawallet", "Datawallet") + .WithMany("Modifications") + .HasForeignKey("DatawalletId"); + + b.Navigation("Datawallet"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", b => + { + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", "SyncRun") + .WithMany("ExternalEvents") + .HasForeignKey("SyncRunId"); + + b.Navigation("SyncRun"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncError", b => + { + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", null) + .WithMany("Errors") + .HasForeignKey("ExternalEventId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", null) + .WithMany("Errors") + .HasForeignKey("SyncRunId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Datawallet", b => + { + b.Navigation("Modifications"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.ExternalEvent", b => + { + b.Navigation("Errors"); + }); + + modelBuilder.Entity("Backbone.Modules.Synchronization.Domain.Entities.Sync.SyncRun", b => + { + b.Navigation("Errors"); + + b.Navigation("ExternalEvents"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.cs b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..a457474a6e --- /dev/null +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/20240403142341_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,36 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Synchronization.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_SyncRuns_CreatedBy", + table: "SyncRuns"); + + migrationBuilder.DropIndex( + name: "IX_DatawalletModifications_CreatedBy", + table: "DatawalletModifications"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_SyncRuns_CreatedBy", + table: "SyncRuns", + column: "CreatedBy"); + + migrationBuilder.CreateIndex( + name: "IX_DatawalletModifications_CreatedBy", + table: "DatawalletModifications", + column: "CreatedBy"); + } + } +} diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index 188b2b5cda..4e7d14754a 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Synchronization/src/Synchronization.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Synchronization.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -116,8 +116,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.HasIndex("DatawalletId"); b.HasIndex("CreatedBy", "Index") @@ -256,8 +254,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.HasIndex("CreatedBy", "FinalizedAt"); b.HasIndex("CreatedBy", "Index") diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/DatawalletModificationEntityTypeConfiguration.cs b/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/DatawalletModificationEntityTypeConfiguration.cs index 507f938910..712414e183 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/DatawalletModificationEntityTypeConfiguration.cs +++ b/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/DatawalletModificationEntityTypeConfiguration.cs @@ -9,7 +9,6 @@ public class DatawalletModificationEntityTypeConfiguration : IEntityTypeConfigur public void Configure(EntityTypeBuilder builder) { builder.HasIndex(p => new { p.CreatedBy, p.Index }).IsUnique(); - builder.HasIndex(p => p.CreatedBy); builder.HasKey(x => x.Id); diff --git a/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/SyncRunEntityTypeConfiguration.cs b/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/SyncRunEntityTypeConfiguration.cs index e8773c80c7..f8c50e2bbf 100644 --- a/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/SyncRunEntityTypeConfiguration.cs +++ b/Modules/Synchronization/src/Synchronization.Infrastructure/Persistence/Database/Configurations/SyncRunEntityTypeConfiguration.cs @@ -10,7 +10,6 @@ public void Configure(EntityTypeBuilder builder) { builder.HasIndex(x => new { x.CreatedBy, x.Index }).IsUnique(); builder.HasIndex(x => new { x.CreatedBy, x.FinalizedAt }); - builder.HasIndex(x => x.CreatedBy); builder.Ignore(x => x.IsFinalized); @@ -20,6 +19,5 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.EventCount); builder.Property(x => x.CreatedBy); builder.Property(x => x.CreatedByDevice); - } } diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..9f3567ac1d --- /dev/null +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,66 @@ +// +using System; +using Backbone.Modules.Tokens.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Backbone.Modules.Tokens.Infrastructure.Database.Postgres.Migrations +{ + [DbContext(typeof(TokensDbContext))] + [Migration("20240403135120_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Tokens.Domain.Entities.Token", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("Content") + .HasColumnType("bytea"); + + b.Property("CreatedAt") + .HasColumnType("timestamp with time zone"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("character(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("character(20)") + .IsFixedLength(); + + b.Property("ExpiresAt") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id"); + + b.ToTable("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.cs b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..261ccffeb4 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/20240403135120_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Tokens.Infrastructure.Database.Postgres.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Tokens_CreatedBy", + table: "Tokens"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_Tokens_CreatedBy", + table: "Tokens", + column: "CreatedBy"); + } + } +} diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/TokensDbContextModelSnapshot.cs b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/TokensDbContextModelSnapshot.cs index 45464a0ae4..a1ad46e3d1 100644 --- a/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/TokensDbContextModelSnapshot.cs +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.Postgres/Migrations/TokensDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Tokens.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.13") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -55,8 +55,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.ToTable("Tokens"); }); #pragma warning restore 612, 618 diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.Designer.cs b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.Designer.cs new file mode 100644 index 0000000000..401399f13f --- /dev/null +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.Designer.cs @@ -0,0 +1,66 @@ +// +using System; +using Backbone.Modules.Tokens.Infrastructure.Persistence.Database; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Backbone.Modules.Tokens.Infrastructure.Database.SqlServer.Migrations +{ + [DbContext(typeof(TokensDbContext))] + [Migration("20240403142406_RemoveUnnecessaryIndexes")] + partial class RemoveUnnecessaryIndexes + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.3") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Backbone.Modules.Tokens.Domain.Entities.Token", b => + { + b.Property("Id") + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("Content") + .HasColumnType("varbinary(max)"); + + b.Property("CreatedAt") + .HasColumnType("datetime2"); + + b.Property("CreatedBy") + .IsRequired() + .HasMaxLength(36) + .IsUnicode(false) + .HasColumnType("char(36)") + .IsFixedLength(); + + b.Property("CreatedByDevice") + .IsRequired() + .HasMaxLength(20) + .IsUnicode(false) + .HasColumnType("char(20)") + .IsFixedLength(); + + b.Property("ExpiresAt") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.ToTable("Tokens"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.cs b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.cs new file mode 100644 index 0000000000..41f499f8a1 --- /dev/null +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/20240403142406_RemoveUnnecessaryIndexes.cs @@ -0,0 +1,27 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Backbone.Modules.Tokens.Infrastructure.Database.SqlServer.Migrations +{ + /// + public partial class RemoveUnnecessaryIndexes : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropIndex( + name: "IX_Tokens_CreatedBy", + table: "Tokens"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateIndex( + name: "IX_Tokens_CreatedBy", + table: "Tokens", + column: "CreatedBy"); + } + } +} diff --git a/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs index 6ed15e8e6c..56d4b4248d 100644 --- a/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Modules/Tokens/src/Tokens.Infrastructure.Database.SqlServer/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Backbone.Modules.Tokens.Infrastructure.Persistence.Database; using Microsoft.EntityFrameworkCore; @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "7.0.13") + .HasAnnotation("ProductVersion", "8.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); @@ -55,8 +55,6 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasKey("Id"); - b.HasIndex("CreatedBy"); - b.ToTable("Tokens"); }); #pragma warning restore 612, 618 diff --git a/Modules/Tokens/src/Tokens.Infrastructure/Persistence/Database/EntityConfigurations/TokenEntityTypeConfiguration.cs b/Modules/Tokens/src/Tokens.Infrastructure/Persistence/Database/EntityConfigurations/TokenEntityTypeConfiguration.cs index 6670caa265..ac6c2419cd 100644 --- a/Modules/Tokens/src/Tokens.Infrastructure/Persistence/Database/EntityConfigurations/TokenEntityTypeConfiguration.cs +++ b/Modules/Tokens/src/Tokens.Infrastructure/Persistence/Database/EntityConfigurations/TokenEntityTypeConfiguration.cs @@ -8,8 +8,6 @@ public class TokenEntityTypeConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { - builder.HasIndex(r => r.CreatedBy); - builder.Property(r => r.Content).IsRequired(false); } }