// using System; using Bit.Infrastructure.EntityFramework.Repositories; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Bit.SqliteMigrations.Migrations { [DbContext(typeof(DatabaseContext))] [Migration("20240112180610_AddAuthTableIndexes")] partial class AddAuthTableIndexes { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "7.0.14"); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AllowAdminAccessToAllCollectionItems") .HasColumnType("INTEGER") .HasDefaultValue(true); b.Property("BillingEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("BusinessAddress1") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("BusinessAddress2") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("BusinessAddress3") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("BusinessCountry") .HasMaxLength(2) .HasColumnType("TEXT"); b.Property("BusinessName") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("BusinessTaxNumber") .HasMaxLength(30) .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Enabled") .HasColumnType("INTEGER"); b.Property("ExpirationDate") .HasColumnType("TEXT"); b.Property("FlexibleCollections") .HasColumnType("INTEGER"); b.Property("Gateway") .HasColumnType("INTEGER"); b.Property("GatewayCustomerId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("GatewaySubscriptionId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Identifier") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("LicenseKey") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("LimitCollectionCreationDeletion") .HasColumnType("INTEGER") .HasDefaultValue(true); b.Property("MaxAutoscaleSeats") .HasColumnType("INTEGER"); b.Property("MaxAutoscaleSmSeats") .HasColumnType("INTEGER"); b.Property("MaxAutoscaleSmServiceAccounts") .HasColumnType("INTEGER"); b.Property("MaxCollections") .HasColumnType("INTEGER"); b.Property("MaxStorageGb") .HasColumnType("INTEGER"); b.Property("Name") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("OwnersNotifiedOfAutoscaling") .HasColumnType("TEXT"); b.Property("Plan") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("PlanType") .HasColumnType("INTEGER"); b.Property("PrivateKey") .HasColumnType("TEXT"); b.Property("PublicKey") .HasColumnType("TEXT"); b.Property("ReferenceData") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Seats") .HasColumnType("INTEGER"); b.Property("SecretsManagerBeta") .HasColumnType("INTEGER"); b.Property("SelfHost") .HasColumnType("INTEGER"); b.Property("SmSeats") .HasColumnType("INTEGER"); b.Property("SmServiceAccounts") .HasColumnType("INTEGER"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("Storage") .HasColumnType("INTEGER"); b.Property("TwoFactorProviders") .HasColumnType("TEXT"); b.Property("Use2fa") .HasColumnType("INTEGER"); b.Property("UseApi") .HasColumnType("INTEGER"); b.Property("UseCustomPermissions") .HasColumnType("INTEGER"); b.Property("UseDirectory") .HasColumnType("INTEGER"); b.Property("UseEvents") .HasColumnType("INTEGER"); b.Property("UseGroups") .HasColumnType("INTEGER"); b.Property("UseKeyConnector") .HasColumnType("INTEGER"); b.Property("UsePasswordManager") .HasColumnType("INTEGER"); b.Property("UsePolicies") .HasColumnType("INTEGER"); b.Property("UseResetPassword") .HasColumnType("INTEGER"); b.Property("UseScim") .HasColumnType("INTEGER"); b.Property("UseSecretsManager") .HasColumnType("INTEGER"); b.Property("UseSso") .HasColumnType("INTEGER"); b.Property("UseTotp") .HasColumnType("INTEGER"); b.Property("UsersGetPremium") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("Id", "Enabled") .HasAnnotation("Npgsql:IndexInclude", new[] { "UseTotp" }); b.ToTable("Organization", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Policy", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Data") .HasColumnType("TEXT"); b.Property("Enabled") .HasColumnType("INTEGER"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("OrganizationId", "Type") .IsUnique() .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Policy", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.Provider", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("BillingEmail") .HasColumnType("TEXT"); b.Property("BillingPhone") .HasColumnType("TEXT"); b.Property("BusinessAddress1") .HasColumnType("TEXT"); b.Property("BusinessAddress2") .HasColumnType("TEXT"); b.Property("BusinessAddress3") .HasColumnType("TEXT"); b.Property("BusinessCountry") .HasColumnType("TEXT"); b.Property("BusinessName") .HasColumnType("TEXT"); b.Property("BusinessTaxNumber") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Enabled") .HasColumnType("INTEGER"); b.Property("Name") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UseEvents") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Provider", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.ProviderOrganization", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("ProviderId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Settings") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.HasIndex("ProviderId"); b.ToTable("ProviderOrganization", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.ProviderUser", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Email") .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("Permissions") .HasColumnType("TEXT"); b.Property("ProviderId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ProviderId"); b.HasIndex("UserId"); b.ToTable("ProviderUser", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.AuthRequest", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessCode") .HasMaxLength(25) .HasColumnType("TEXT"); b.Property("Approved") .HasColumnType("INTEGER"); b.Property("AuthenticationDate") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("MasterPasswordHash") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("PublicKey") .HasColumnType("TEXT"); b.Property("RequestDeviceIdentifier") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("RequestDeviceType") .HasColumnType("INTEGER"); b.Property("RequestIpAddress") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("ResponseDate") .HasColumnType("TEXT"); b.Property("ResponseDeviceId") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.HasIndex("ResponseDeviceId"); b.HasIndex("UserId"); b.ToTable("AuthRequest", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.EmergencyAccess", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("GranteeId") .HasColumnType("TEXT"); b.Property("GrantorId") .HasColumnType("TEXT"); b.Property("KeyEncrypted") .HasColumnType("TEXT"); b.Property("LastNotificationDate") .HasColumnType("TEXT"); b.Property("RecoveryInitiatedDate") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("WaitTimeDays") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("GranteeId"); b.HasIndex("GrantorId"); b.ToTable("EmergencyAccess", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.Grant", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn); b.Property("ClientId") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("ConsumedDate") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Data") .IsRequired() .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("ExpirationDate") .HasColumnType("TEXT"); b.Property("Key") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("SessionId") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("SubjectId") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("Type") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.HasKey("Id") .HasAnnotation("SqlServer:Clustered", true); b.HasIndex("ExpirationDate") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("Key") .IsUnique(); b.ToTable("Grant", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.SsoConfig", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Data") .HasColumnType("TEXT"); b.Property("Enabled") .HasColumnType("INTEGER"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.ToTable("SsoConfig", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.SsoUser", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("ExternalId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId"); b.HasIndex("OrganizationId", "ExternalId") .IsUnique() .HasAnnotation("Npgsql:IndexInclude", new[] { "UserId" }) .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("OrganizationId", "UserId") .IsUnique() .HasAnnotation("SqlServer:Clustered", false); b.ToTable("SsoUser", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.WebAuthnCredential", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AaGuid") .HasColumnType("TEXT"); b.Property("Counter") .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("CredentialId") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EncryptedPrivateKey") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("EncryptedPublicKey") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("EncryptedUserKey") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("PublicKey") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("SupportsPrf") .HasColumnType("INTEGER"); b.Property("Type") .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("WebAuthnCredential", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("ExternalId") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.ToTable("Collection", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => { b.Property("CollectionId") .HasColumnType("TEXT"); b.Property("CipherId") .HasColumnType("TEXT"); b.HasKey("CollectionId", "CipherId"); b.HasIndex("CipherId"); b.ToTable("CollectionCipher", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b => { b.Property("CollectionId") .HasColumnType("TEXT"); b.Property("GroupId") .HasColumnType("TEXT"); b.Property("HidePasswords") .HasColumnType("INTEGER"); b.Property("Manage") .HasColumnType("INTEGER"); b.Property("ReadOnly") .HasColumnType("INTEGER"); b.HasKey("CollectionId", "GroupId"); b.HasIndex("GroupId"); b.ToTable("CollectionGroups"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionUser", b => { b.Property("CollectionId") .HasColumnType("TEXT"); b.Property("OrganizationUserId") .HasColumnType("TEXT"); b.Property("HidePasswords") .HasColumnType("INTEGER"); b.Property("Manage") .HasColumnType("INTEGER"); b.Property("ReadOnly") .HasColumnType("INTEGER"); b.HasKey("CollectionId", "OrganizationUserId"); b.HasIndex("OrganizationUserId"); b.ToTable("CollectionUsers"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Device", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("EncryptedPrivateKey") .HasColumnType("TEXT"); b.Property("EncryptedPublicKey") .HasColumnType("TEXT"); b.Property("EncryptedUserKey") .HasColumnType("TEXT"); b.Property("Identifier") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("PushToken") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Identifier") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId", "Identifier") .IsUnique() .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Device", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Event", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ActingUserId") .HasColumnType("TEXT"); b.Property("CipherId") .HasColumnType("TEXT"); b.Property("CollectionId") .HasColumnType("TEXT"); b.Property("Date") .HasColumnType("TEXT"); b.Property("DeviceType") .HasColumnType("INTEGER"); b.Property("DomainName") .HasColumnType("TEXT"); b.Property("GroupId") .HasColumnType("TEXT"); b.Property("InstallationId") .HasColumnType("TEXT"); b.Property("IpAddress") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("OrganizationUserId") .HasColumnType("TEXT"); b.Property("PolicyId") .HasColumnType("TEXT"); b.Property("ProviderId") .HasColumnType("TEXT"); b.Property("ProviderOrganizationId") .HasColumnType("TEXT"); b.Property("ProviderUserId") .HasColumnType("TEXT"); b.Property("SecretId") .HasColumnType("TEXT"); b.Property("ServiceAccountId") .HasColumnType("TEXT"); b.Property("SystemUser") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("Date", "OrganizationId", "ActingUserId", "CipherId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Event", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessAll") .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("ExternalId") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.ToTable("Group", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b => { b.Property("GroupId") .HasColumnType("TEXT"); b.Property("OrganizationUserId") .HasColumnType("TEXT"); b.HasKey("GroupId", "OrganizationUserId"); b.HasIndex("OrganizationUserId"); b.ToTable("GroupUser", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Installation", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("Enabled") .HasColumnType("INTEGER"); b.Property("Key") .HasMaxLength(150) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Installation", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ApiKey") .HasMaxLength(30) .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.ToTable("OrganizationApiKey", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Config") .HasColumnType("TEXT"); b.Property("Enabled") .HasColumnType("INTEGER"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.ToTable("OrganizationConnection", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationDomain", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("DomainName") .HasMaxLength(255) .HasColumnType("TEXT"); b.Property("JobRunCount") .HasColumnType("INTEGER"); b.Property("LastCheckedDate") .HasColumnType("TEXT"); b.Property("NextRunDate") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("Txt") .HasColumnType("TEXT"); b.Property("VerifiedDate") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.ToTable("OrganizationDomain", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("FriendlyName") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("LastSyncDate") .HasColumnType("TEXT"); b.Property("OfferedToEmail") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("PlanSponsorshipType") .HasColumnType("INTEGER"); b.Property("SponsoredOrganizationId") .HasColumnType("TEXT"); b.Property("SponsoringOrganizationId") .HasColumnType("TEXT"); b.Property("SponsoringOrganizationUserId") .HasColumnType("TEXT"); b.Property("ToDelete") .HasColumnType("INTEGER"); b.Property("ValidUntil") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("SponsoredOrganizationId"); b.HasIndex("SponsoringOrganizationId"); b.HasIndex("SponsoringOrganizationUserId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("OrganizationSponsorship", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessAll") .HasColumnType("INTEGER"); b.Property("AccessSecretsManager") .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Email") .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("ExternalId") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("Permissions") .HasColumnType("TEXT"); b.Property("ResetPasswordKey") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Status") .HasColumnType("INTEGER"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId", "OrganizationId", "Status") .HasAnnotation("Npgsql:IndexInclude", new[] { "AccessAll" }) .HasAnnotation("SqlServer:Clustered", false); b.ToTable("OrganizationUser", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccessCount") .HasColumnType("INTEGER"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Data") .HasColumnType("TEXT"); b.Property("DeletionDate") .HasColumnType("TEXT"); b.Property("Disabled") .HasColumnType("INTEGER"); b.Property("ExpirationDate") .HasColumnType("TEXT"); b.Property("HideEmail") .HasColumnType("INTEGER"); b.Property("Key") .HasColumnType("TEXT"); b.Property("MaxAccessCount") .HasColumnType("INTEGER"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("Password") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("DeletionDate") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("OrganizationId"); b.HasIndex("UserId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId", "OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Send", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.TaxRate", b => { b.Property("Id") .HasMaxLength(40) .HasColumnType("TEXT"); b.Property("Active") .HasColumnType("INTEGER"); b.Property("Country") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("PostalCode") .HasMaxLength(10) .HasColumnType("TEXT"); b.Property("Rate") .HasColumnType("TEXT"); b.Property("State") .HasMaxLength(2) .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("TaxRate", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Amount") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Details") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Gateway") .HasColumnType("INTEGER"); b.Property("GatewayId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("PaymentMethodType") .HasColumnType("INTEGER"); b.Property("Refunded") .HasColumnType("INTEGER"); b.Property("RefundedAmount") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.HasIndex("UserId") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("UserId", "OrganizationId", "CreationDate") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Transaction", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("AccountRevisionDate") .HasColumnType("TEXT"); b.Property("ApiKey") .IsRequired() .HasMaxLength(30) .HasColumnType("TEXT"); b.Property("AvatarColor") .HasMaxLength(7) .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Culture") .HasMaxLength(10) .HasColumnType("TEXT"); b.Property("Email") .IsRequired() .HasMaxLength(256) .HasColumnType("TEXT"); b.Property("EmailVerified") .HasColumnType("INTEGER"); b.Property("EquivalentDomains") .HasColumnType("TEXT"); b.Property("ExcludedGlobalEquivalentDomains") .HasColumnType("TEXT"); b.Property("FailedLoginCount") .HasColumnType("INTEGER"); b.Property("ForcePasswordReset") .HasColumnType("INTEGER"); b.Property("Gateway") .HasColumnType("INTEGER"); b.Property("GatewayCustomerId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("GatewaySubscriptionId") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Kdf") .HasColumnType("INTEGER"); b.Property("KdfIterations") .HasColumnType("INTEGER"); b.Property("KdfMemory") .HasColumnType("INTEGER"); b.Property("KdfParallelism") .HasColumnType("INTEGER"); b.Property("Key") .HasColumnType("TEXT"); b.Property("LastEmailChangeDate") .HasColumnType("TEXT"); b.Property("LastFailedLoginDate") .HasColumnType("TEXT"); b.Property("LastKdfChangeDate") .HasColumnType("TEXT"); b.Property("LastKeyRotationDate") .HasColumnType("TEXT"); b.Property("LastPasswordChangeDate") .HasColumnType("TEXT"); b.Property("LicenseKey") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("MasterPassword") .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("MasterPasswordHint") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("MaxStorageGb") .HasColumnType("INTEGER"); b.Property("Name") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Premium") .HasColumnType("INTEGER"); b.Property("PremiumExpirationDate") .HasColumnType("TEXT"); b.Property("PrivateKey") .HasColumnType("TEXT"); b.Property("PublicKey") .HasColumnType("TEXT"); b.Property("ReferenceData") .HasColumnType("TEXT"); b.Property("RenewalReminderDate") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("SecurityStamp") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("Storage") .HasColumnType("INTEGER"); b.Property("TwoFactorProviders") .HasColumnType("TEXT"); b.Property("TwoFactorRecoveryCode") .HasMaxLength(32) .HasColumnType("TEXT"); b.Property("UsesKeyConnector") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("Email") .IsUnique() .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("Premium", "PremiumExpirationDate", "RenewalReminderDate") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("User", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Discriminator") .IsRequired() .HasColumnType("TEXT"); b.Property("Read") .HasColumnType("INTEGER"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Write") .HasColumnType("INTEGER"); b.HasKey("Id") .HasAnnotation("SqlServer:Clustered", true); b.ToTable("AccessPolicy", (string)null); b.HasDiscriminator("Discriminator").HasValue("AccessPolicy"); b.UseTphMappingStrategy(); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("ClientSecretHash") .HasMaxLength(128) .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("EncryptedPayload") .HasMaxLength(4000) .HasColumnType("TEXT"); b.Property("ExpireAt") .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("Name") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Scope") .HasMaxLength(4000) .HasColumnType("TEXT"); b.Property("ServiceAccountId") .HasColumnType("TEXT"); b.HasKey("Id") .HasAnnotation("SqlServer:Clustered", true); b.HasIndex("ServiceAccountId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("ApiKey", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("DeletedDate") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.HasKey("Id") .HasAnnotation("SqlServer:Clustered", true); b.HasIndex("DeletedDate") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Project", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("DeletedDate") .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("Note") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Value") .HasColumnType("TEXT"); b.HasKey("Id") .HasAnnotation("SqlServer:Clustered", true); b.HasIndex("DeletedDate") .HasAnnotation("SqlServer:Clustered", false); b.HasIndex("OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("Secret", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.HasKey("Id") .HasAnnotation("SqlServer:Clustered", true); b.HasIndex("OrganizationId") .HasAnnotation("SqlServer:Clustered", false); b.ToTable("ServiceAccount", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Attachments") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Data") .HasColumnType("TEXT"); b.Property("DeletedDate") .HasColumnType("TEXT"); b.Property("Favorites") .HasColumnType("TEXT"); b.Property("Folders") .HasColumnType("TEXT"); b.Property("Key") .HasColumnType("TEXT"); b.Property("OrganizationId") .HasColumnType("TEXT"); b.Property("Reprompt") .HasColumnType("INTEGER"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("Type") .HasColumnType("INTEGER"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OrganizationId"); b.HasIndex("UserId"); b.ToTable("Cipher", (string)null); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("CreationDate") .HasColumnType("TEXT"); b.Property("Name") .HasColumnType("TEXT"); b.Property("RevisionDate") .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Folder", (string)null); }); modelBuilder.Entity("ProjectSecret", b => { b.Property("ProjectsId") .HasColumnType("TEXT"); b.Property("SecretsId") .HasColumnType("TEXT"); b.HasKey("ProjectsId", "SecretsId"); b.HasIndex("SecretsId"); b.ToTable("ProjectSecret"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupProjectAccessPolicy", b => { b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); b.Property("GrantedProjectId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GrantedProjectId"); b.Property("GroupId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GroupId"); b.HasIndex("GrantedProjectId"); b.HasIndex("GroupId"); b.HasDiscriminator().HasValue("group_project"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupServiceAccountAccessPolicy", b => { b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); b.Property("GrantedServiceAccountId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GrantedServiceAccountId"); b.Property("GroupId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GroupId"); b.HasIndex("GrantedServiceAccountId"); b.HasIndex("GroupId"); b.HasDiscriminator().HasValue("group_service_account"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccountProjectAccessPolicy", b => { b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); b.Property("GrantedProjectId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GrantedProjectId"); b.Property("ServiceAccountId") .HasColumnType("TEXT") .HasColumnName("ServiceAccountId"); b.HasIndex("GrantedProjectId"); b.HasIndex("ServiceAccountId"); b.HasDiscriminator().HasValue("service_account_project"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserProjectAccessPolicy", b => { b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); b.Property("GrantedProjectId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GrantedProjectId"); b.Property("OrganizationUserId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("OrganizationUserId"); b.HasIndex("GrantedProjectId"); b.HasIndex("OrganizationUserId"); b.HasDiscriminator().HasValue("user_project"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserServiceAccountAccessPolicy", b => { b.HasBaseType("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy"); b.Property("GrantedServiceAccountId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("GrantedServiceAccountId"); b.Property("OrganizationUserId") .ValueGeneratedOnUpdateSometimes() .HasColumnType("TEXT") .HasColumnName("OrganizationUserId"); b.HasIndex("GrantedServiceAccountId"); b.HasIndex("OrganizationUserId"); b.HasDiscriminator().HasValue("user_service_account"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Policy", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Policies") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.ProviderOrganization", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany() .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.Provider", "Provider") .WithMany() .HasForeignKey("ProviderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); b.Navigation("Provider"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.ProviderUser", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Provider.Provider", "Provider") .WithMany() .HasForeignKey("ProviderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany() .HasForeignKey("UserId"); b.Navigation("Provider"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.AuthRequest", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany() .HasForeignKey("OrganizationId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.Device", "ResponseDevice") .WithMany() .HasForeignKey("ResponseDeviceId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); b.Navigation("ResponseDevice"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.EmergencyAccess", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "Grantee") .WithMany() .HasForeignKey("GranteeId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "Grantor") .WithMany() .HasForeignKey("GrantorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Grantee"); b.Navigation("Grantor"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.SsoConfig", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("SsoConfigs") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.SsoUser", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("SsoUsers") .HasForeignKey("OrganizationId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany("SsoUsers") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Auth.Models.WebAuthnCredential", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Collections") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionCipher", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher") .WithMany("CollectionCiphers") .HasForeignKey("CipherId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") .WithMany("CollectionCiphers") .HasForeignKey("CollectionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Cipher"); b.Navigation("Collection"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionGroup", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") .WithMany("CollectionGroups") .HasForeignKey("CollectionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") .WithMany() .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Collection"); b.Navigation("Group"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.CollectionUser", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Collection", "Collection") .WithMany("CollectionUsers") .HasForeignKey("CollectionId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") .WithMany("CollectionUsers") .HasForeignKey("OrganizationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Collection"); b.Navigation("OrganizationUser"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Device", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Groups") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.GroupUser", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") .WithMany("GroupUsers") .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") .WithMany("GroupUsers") .HasForeignKey("OrganizationUserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Group"); b.Navigation("OrganizationUser"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("ApiKeys") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationConnection", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Connections") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationDomain", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Domains") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationSponsorship", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "SponsoredOrganization") .WithMany() .HasForeignKey("SponsoredOrganizationId"); b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "SponsoringOrganization") .WithMany() .HasForeignKey("SponsoringOrganizationId"); b.Navigation("SponsoredOrganization"); b.Navigation("SponsoringOrganization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("OrganizationUsers") .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany("OrganizationUsers") .HasForeignKey("UserId"); b.Navigation("Organization"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Send", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany() .HasForeignKey("OrganizationId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany() .HasForeignKey("UserId"); b.Navigation("Organization"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Transaction", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Transactions") .HasForeignKey("OrganizationId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany("Transactions") .HasForeignKey("UserId"); b.Navigation("Organization"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ApiKey", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "ServiceAccount") .WithMany() .HasForeignKey("ServiceAccountId"); b.Navigation("ServiceAccount"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany() .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany() .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany() .HasForeignKey("OrganizationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Organization"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") .WithMany("Ciphers") .HasForeignKey("OrganizationId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany("Ciphers") .HasForeignKey("UserId"); b.Navigation("Organization"); b.Navigation("User"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b => { b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") .WithMany("Folders") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("ProjectSecret", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", null) .WithMany() .HasForeignKey("ProjectsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", null) .WithMany() .HasForeignKey("SecretsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupProjectAccessPolicy", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") .WithMany("GroupAccessPolicies") .HasForeignKey("GrantedProjectId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") .WithMany() .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("GrantedProject"); b.Navigation("Group"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.GroupServiceAccountAccessPolicy", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "GrantedServiceAccount") .WithMany("GroupAccessPolicies") .HasForeignKey("GrantedServiceAccountId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.Group", "Group") .WithMany() .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade); b.Navigation("GrantedServiceAccount"); b.Navigation("Group"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccountProjectAccessPolicy", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") .WithMany("ServiceAccountAccessPolicies") .HasForeignKey("GrantedProjectId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "ServiceAccount") .WithMany() .HasForeignKey("ServiceAccountId"); b.Navigation("GrantedProject"); b.Navigation("ServiceAccount"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserProjectAccessPolicy", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", "GrantedProject") .WithMany("UserAccessPolicies") .HasForeignKey("GrantedProjectId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") .WithMany() .HasForeignKey("OrganizationUserId"); b.Navigation("GrantedProject"); b.Navigation("OrganizationUser"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.UserServiceAccountAccessPolicy", b => { b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "GrantedServiceAccount") .WithMany("UserAccessPolicies") .HasForeignKey("GrantedServiceAccountId"); b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser") .WithMany() .HasForeignKey("OrganizationUserId"); b.Navigation("GrantedServiceAccount"); b.Navigation("OrganizationUser"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b => { b.Navigation("ApiKeys"); b.Navigation("Ciphers"); b.Navigation("Collections"); b.Navigation("Connections"); b.Navigation("Domains"); b.Navigation("Groups"); b.Navigation("OrganizationUsers"); b.Navigation("Policies"); b.Navigation("SsoConfigs"); b.Navigation("SsoUsers"); b.Navigation("Transactions"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Collection", b => { b.Navigation("CollectionCiphers"); b.Navigation("CollectionGroups"); b.Navigation("CollectionUsers"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Group", b => { b.Navigation("GroupUsers"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", b => { b.Navigation("CollectionUsers"); b.Navigation("GroupUsers"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.User", b => { b.Navigation("Ciphers"); b.Navigation("Folders"); b.Navigation("OrganizationUsers"); b.Navigation("SsoUsers"); b.Navigation("Transactions"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Project", b => { b.Navigation("GroupAccessPolicies"); b.Navigation("ServiceAccountAccessPolicies"); b.Navigation("UserAccessPolicies"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.Navigation("GroupAccessPolicies"); b.Navigation("UserAccessPolicies"); }); modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", b => { b.Navigation("CollectionCiphers"); }); #pragma warning restore 612, 618 } } }