1928 lines
67 KiB
C#
1928 lines
67 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using EntKube.Web.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace EntKube.Web.Data.Migrations.SqlServer
|
|
{
|
|
[DbContext(typeof(SqlServerApplicationDbContext))]
|
|
[Migration("20260518082355_AddMongoEntities")]
|
|
partial class AddMongoEntities
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.8")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.App", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("CustomerId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CustomerId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Apps");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.AppDeployment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("AppId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("EnvironmentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("HealthStatus")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("HelmChartName")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("HelmChartVersion")
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)");
|
|
|
|
b.Property<string>("HelmRepoUrl")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("nvarchar(500)");
|
|
|
|
b.Property<string>("HelmValues")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("LastSyncedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("Namespace")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("StatusMessage")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SyncStatus")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClusterId");
|
|
|
|
b.HasIndex("EnvironmentId");
|
|
|
|
b.HasIndex("AppId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("AppDeployments");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.AppEnvironment", b =>
|
|
{
|
|
b.Property<Guid>("AppId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("EnvironmentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("LinkedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.HasKey("AppId", "EnvironmentId");
|
|
|
|
b.HasIndex("EnvironmentId");
|
|
|
|
b.ToTable("AppEnvironments");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.ApplicationUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex")
|
|
.HasFilter("[NormalizedUserName] IS NOT NULL");
|
|
|
|
b.ToTable("AspNetUsers", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.ClusterComponent", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("ClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("ComponentType")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("nvarchar(50)");
|
|
|
|
b.Property<string>("Configuration")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("HelmChartName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("HelmChartVersion")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("HelmRepoUrl")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("HelmValues")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime?>("InstalledAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("LastError")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("Namespace")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ReleaseName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClusterId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("ClusterComponents");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgBackup", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("CnpgClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("LastError")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<long?>("SizeBytes")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<DateTime>("StartedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CnpgClusterId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("CnpgBackups");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgCluster", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("BackupSchedule")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("Instances")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("KubernetesClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("LastError")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("Namespace")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("PostgresVersion")
|
|
.IsRequired()
|
|
.HasMaxLength(10)
|
|
.HasColumnType("nvarchar(10)");
|
|
|
|
b.Property<int>("RetentionDays")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid?>("StorageLinkId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("StorageSize")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("StorageLinkId");
|
|
|
|
b.HasIndex("TenantId");
|
|
|
|
b.HasIndex("KubernetesClusterId", "Name", "Namespace")
|
|
.IsUnique();
|
|
|
|
b.ToTable("CnpgClusters");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgDatabase", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid>("CnpgClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("Owner")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CnpgClusterId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("CnpgDatabases");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Customer", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Customers");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CustomerAccess", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<Guid>("CustomerId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("GrantedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Role")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.HasKey("UserId", "CustomerId");
|
|
|
|
b.HasIndex("CustomerId");
|
|
|
|
b.ToTable("CustomerAccesses");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.DeploymentManifest", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("DeploymentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Kind")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<int>("SortOrder")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("YamlContent")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DeploymentId");
|
|
|
|
b.ToTable("DeploymentManifests");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.DeploymentResource", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("DeploymentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Group")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<string>("HealthStatus")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("Kind")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<DateTime>("LastUpdatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<string>("Namespace")
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<Guid?>("ParentResourceId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("StatusMessage")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("SyncStatus")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("Version")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DeploymentId");
|
|
|
|
b.HasIndex("ParentResourceId");
|
|
|
|
b.ToTable("DeploymentResources");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Environment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Environments");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.ExternalRoute", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("ClusterIssuerName")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<Guid>("ComponentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("GatewayName")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("GatewayNamespace")
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("Hostname")
|
|
.IsRequired()
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<string>("PathPrefix")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("ServiceName")
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<int>("ServicePort")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("TlsCertificate")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("TlsMode")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("TlsPrivateKey")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ComponentId");
|
|
|
|
b.ToTable("ExternalRoutes");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Group", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Groups");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.GroupMembership", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<Guid>("GroupId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("JoinedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.HasKey("UserId", "GroupId");
|
|
|
|
b.HasIndex("GroupId");
|
|
|
|
b.ToTable("GroupMemberships");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.KubernetesCluster", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("ApiServerUrl")
|
|
.IsRequired()
|
|
.HasMaxLength(500)
|
|
.HasColumnType("nvarchar(500)");
|
|
|
|
b.Property<string>("ContextName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("EnvironmentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Kubeconfig")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("EnvironmentId");
|
|
|
|
b.HasIndex("TenantId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("KubernetesClusters");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoBackup", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime?>("CompletedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("MongoClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<long?>("SizeBytes")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<DateTime>("StartedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Type")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MongoClusterId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("MongoBackups");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoCluster", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("BackupSchedule")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("KubernetesClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("LastError")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Members")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("MongoVersion")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("Namespace")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<int>("RetentionDays")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid?>("StorageLinkId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("StorageSize")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("nvarchar(20)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("StorageLinkId");
|
|
|
|
b.HasIndex("TenantId");
|
|
|
|
b.HasIndex("KubernetesClusterId", "Name", "Namespace")
|
|
.IsUnique();
|
|
|
|
b.ToTable("MongoClusters");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoDatabase", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("MongoClusterId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("Owner")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MongoClusterId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("MongoDatabases");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.OpenStackConnection", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("AuthUrl")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ProjectDomainName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ProjectId")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ProjectName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Region")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("UserDomainName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Username")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId");
|
|
|
|
b.ToTable("OpenStackConnections");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.SecretVault", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<byte[]>("EncryptedDataKey")
|
|
.IsRequired()
|
|
.HasColumnType("varbinary(max)");
|
|
|
|
b.Property<byte[]>("Nonce")
|
|
.IsRequired()
|
|
.HasColumnType("varbinary(max)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("SecretVaults");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.StorageBinding", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("AppDeploymentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("ComponentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("KubernetesSecretName")
|
|
.IsRequired()
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<DateTime?>("LastSyncedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("StorageLinkId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("SyncEnabled")
|
|
.HasColumnType("bit");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AppDeploymentId");
|
|
|
|
b.HasIndex("ComponentId");
|
|
|
|
b.HasIndex("StorageLinkId");
|
|
|
|
b.ToTable("StorageBindings");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.StorageLink", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("BucketName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<Guid?>("ComponentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Endpoint")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<Guid>("EnvironmentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Notes")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<Guid?>("OpenStackConnectionId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<int>("Provider")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Region")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ComponentId");
|
|
|
|
b.HasIndex("EnvironmentId");
|
|
|
|
b.HasIndex("OpenStackConnectionId");
|
|
|
|
b.HasIndex("TenantId");
|
|
|
|
b.ToTable("StorageLinks");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Tenant", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Slug")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Tenants");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.TenantMembership", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("JoinedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("UserId", "TenantId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.HasIndex("TenantId");
|
|
|
|
b.ToTable("TenantMemberships");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.TenantRole", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("TenantRoles");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.VaultSecret", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("AppId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("CnpgDatabaseId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("ComponentId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<byte[]>("EncryptedValue")
|
|
.IsRequired()
|
|
.HasColumnType("varbinary(max)");
|
|
|
|
b.Property<string>("KubernetesNamespace")
|
|
.HasMaxLength(63)
|
|
.HasColumnType("nvarchar(63)");
|
|
|
|
b.Property<string>("KubernetesSecretName")
|
|
.HasMaxLength(253)
|
|
.HasColumnType("nvarchar(253)");
|
|
|
|
b.Property<Guid?>("MongoDatabaseId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(200)
|
|
.HasColumnType("nvarchar(200)");
|
|
|
|
b.Property<byte[]>("Nonce")
|
|
.IsRequired()
|
|
.HasColumnType("varbinary(max)");
|
|
|
|
b.Property<Guid?>("OpenStackConnectionId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<Guid?>("StorageLinkId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<bool>("SyncToKubernetes")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<Guid>("VaultId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AppId");
|
|
|
|
b.HasIndex("CnpgDatabaseId");
|
|
|
|
b.HasIndex("ComponentId");
|
|
|
|
b.HasIndex("MongoDatabaseId");
|
|
|
|
b.HasIndex("StorageLinkId");
|
|
|
|
b.HasIndex("VaultId", "AppId", "Name")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("VaultId", "ComponentId", "Name")
|
|
.IsUnique();
|
|
|
|
b.ToTable("VaultSecrets");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("nvarchar(256)");
|
|
|
|
b.Property<string>("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<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("RoleId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetRoleClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserLogins", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("RoleId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetUserRoles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("AspNetUserTokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.App", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Customer", "Customer")
|
|
.WithMany("Apps")
|
|
.HasForeignKey("CustomerId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Customer");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.AppDeployment", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.App", "App")
|
|
.WithMany("Deployments")
|
|
.HasForeignKey("AppId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.KubernetesCluster", "Cluster")
|
|
.WithMany()
|
|
.HasForeignKey("ClusterId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.Environment", "Environment")
|
|
.WithMany()
|
|
.HasForeignKey("EnvironmentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("App");
|
|
|
|
b.Navigation("Cluster");
|
|
|
|
b.Navigation("Environment");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.AppEnvironment", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.App", "App")
|
|
.WithMany("AppEnvironments")
|
|
.HasForeignKey("AppId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.Environment", "Environment")
|
|
.WithMany("AppEnvironments")
|
|
.HasForeignKey("EnvironmentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("App");
|
|
|
|
b.Navigation("Environment");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.ClusterComponent", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.KubernetesCluster", "Cluster")
|
|
.WithMany("Components")
|
|
.HasForeignKey("ClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Cluster");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgBackup", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.CnpgCluster", "CnpgCluster")
|
|
.WithMany("Backups")
|
|
.HasForeignKey("CnpgClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CnpgCluster");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgCluster", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.KubernetesCluster", "KubernetesCluster")
|
|
.WithMany()
|
|
.HasForeignKey("KubernetesClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.StorageLink", "StorageLink")
|
|
.WithMany()
|
|
.HasForeignKey("StorageLinkId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany()
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("KubernetesCluster");
|
|
|
|
b.Navigation("StorageLink");
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgDatabase", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.CnpgCluster", "CnpgCluster")
|
|
.WithMany("Databases")
|
|
.HasForeignKey("CnpgClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("CnpgCluster");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Customer", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany("Customers")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CustomerAccess", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Customer", "Customer")
|
|
.WithMany()
|
|
.HasForeignKey("CustomerId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Customer");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.DeploymentManifest", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.AppDeployment", "Deployment")
|
|
.WithMany("Manifests")
|
|
.HasForeignKey("DeploymentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Deployment");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.DeploymentResource", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.AppDeployment", "Deployment")
|
|
.WithMany("Resources")
|
|
.HasForeignKey("DeploymentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.DeploymentResource", "ParentResource")
|
|
.WithMany("ChildResources")
|
|
.HasForeignKey("ParentResourceId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
b.Navigation("Deployment");
|
|
|
|
b.Navigation("ParentResource");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Environment", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany("Environments")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.ExternalRoute", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.ClusterComponent", "Component")
|
|
.WithMany("ExternalRoutes")
|
|
.HasForeignKey("ComponentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Component");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Group", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany("Groups")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.GroupMembership", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Group", "Group")
|
|
.WithMany("Memberships")
|
|
.HasForeignKey("GroupId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Group");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.KubernetesCluster", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Environment", "Environment")
|
|
.WithMany("KubernetesClusters")
|
|
.HasForeignKey("EnvironmentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany("KubernetesClusters")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Environment");
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoBackup", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.MongoCluster", "MongoCluster")
|
|
.WithMany("Backups")
|
|
.HasForeignKey("MongoClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MongoCluster");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoCluster", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.KubernetesCluster", "KubernetesCluster")
|
|
.WithMany()
|
|
.HasForeignKey("KubernetesClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.StorageLink", "StorageLink")
|
|
.WithMany()
|
|
.HasForeignKey("StorageLinkId")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany()
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("KubernetesCluster");
|
|
|
|
b.Navigation("StorageLink");
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoDatabase", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.MongoCluster", "MongoCluster")
|
|
.WithMany("Databases")
|
|
.HasForeignKey("MongoClusterId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("MongoCluster");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.OpenStackConnection", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany()
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.SecretVault", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithOne("Vault")
|
|
.HasForeignKey("EntKube.Web.Data.SecretVault", "TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.StorageBinding", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.AppDeployment", "AppDeployment")
|
|
.WithMany("StorageBindings")
|
|
.HasForeignKey("AppDeploymentId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("EntKube.Web.Data.ClusterComponent", "Component")
|
|
.WithMany("StorageBindings")
|
|
.HasForeignKey("ComponentId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("EntKube.Web.Data.StorageLink", "StorageLink")
|
|
.WithMany("StorageBindings")
|
|
.HasForeignKey("StorageLinkId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("AppDeployment");
|
|
|
|
b.Navigation("Component");
|
|
|
|
b.Navigation("StorageLink");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.StorageLink", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.ClusterComponent", "Component")
|
|
.WithMany()
|
|
.HasForeignKey("ComponentId");
|
|
|
|
b.HasOne("EntKube.Web.Data.Environment", "Environment")
|
|
.WithMany()
|
|
.HasForeignKey("EnvironmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.OpenStackConnection", "OpenStackConnection")
|
|
.WithMany("StorageLinks")
|
|
.HasForeignKey("OpenStackConnectionId");
|
|
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany()
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Component");
|
|
|
|
b.Navigation("Environment");
|
|
|
|
b.Navigation("OpenStackConnection");
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.TenantMembership", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.TenantRole", "Role")
|
|
.WithMany("Memberships")
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany("Memberships")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Role");
|
|
|
|
b.Navigation("Tenant");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.TenantRole", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
|
|
.WithMany("Roles")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.VaultSecret", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.App", "App")
|
|
.WithMany("Secrets")
|
|
.HasForeignKey("AppId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("EntKube.Web.Data.CnpgDatabase", "CnpgDatabase")
|
|
.WithMany()
|
|
.HasForeignKey("CnpgDatabaseId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("EntKube.Web.Data.ClusterComponent", "Component")
|
|
.WithMany("Secrets")
|
|
.HasForeignKey("ComponentId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("EntKube.Web.Data.MongoDatabase", "MongoDatabase")
|
|
.WithMany()
|
|
.HasForeignKey("MongoDatabaseId")
|
|
.OnDelete(DeleteBehavior.Cascade);
|
|
|
|
b.HasOne("EntKube.Web.Data.StorageLink", "StorageLink")
|
|
.WithMany()
|
|
.HasForeignKey("StorageLinkId");
|
|
|
|
b.HasOne("EntKube.Web.Data.SecretVault", "Vault")
|
|
.WithMany("Secrets")
|
|
.HasForeignKey("VaultId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("App");
|
|
|
|
b.Navigation("CnpgDatabase");
|
|
|
|
b.Navigation("Component");
|
|
|
|
b.Navigation("MongoDatabase");
|
|
|
|
b.Navigation("StorageLink");
|
|
|
|
b.Navigation("Vault");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.HasOne("EntKube.Web.Data.ApplicationUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.App", b =>
|
|
{
|
|
b.Navigation("AppEnvironments");
|
|
|
|
b.Navigation("Deployments");
|
|
|
|
b.Navigation("Secrets");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.AppDeployment", b =>
|
|
{
|
|
b.Navigation("Manifests");
|
|
|
|
b.Navigation("Resources");
|
|
|
|
b.Navigation("StorageBindings");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.ClusterComponent", b =>
|
|
{
|
|
b.Navigation("ExternalRoutes");
|
|
|
|
b.Navigation("Secrets");
|
|
|
|
b.Navigation("StorageBindings");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.CnpgCluster", b =>
|
|
{
|
|
b.Navigation("Backups");
|
|
|
|
b.Navigation("Databases");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Customer", b =>
|
|
{
|
|
b.Navigation("Apps");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.DeploymentResource", b =>
|
|
{
|
|
b.Navigation("ChildResources");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Environment", b =>
|
|
{
|
|
b.Navigation("AppEnvironments");
|
|
|
|
b.Navigation("KubernetesClusters");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Group", b =>
|
|
{
|
|
b.Navigation("Memberships");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.KubernetesCluster", b =>
|
|
{
|
|
b.Navigation("Components");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.MongoCluster", b =>
|
|
{
|
|
b.Navigation("Backups");
|
|
|
|
b.Navigation("Databases");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.OpenStackConnection", b =>
|
|
{
|
|
b.Navigation("StorageLinks");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.SecretVault", b =>
|
|
{
|
|
b.Navigation("Secrets");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.StorageLink", b =>
|
|
{
|
|
b.Navigation("StorageBindings");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.Tenant", b =>
|
|
{
|
|
b.Navigation("Customers");
|
|
|
|
b.Navigation("Environments");
|
|
|
|
b.Navigation("Groups");
|
|
|
|
b.Navigation("KubernetesClusters");
|
|
|
|
b.Navigation("Memberships");
|
|
|
|
b.Navigation("Roles");
|
|
|
|
b.Navigation("Vault");
|
|
});
|
|
|
|
modelBuilder.Entity("EntKube.Web.Data.TenantRole", b =>
|
|
{
|
|
b.Navigation("Memberships");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|