mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2024-11-22 08:42:44 +01:00
397 lines
14 KiB
C#
397 lines
14 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using System.Text.Json;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using Phantom.Server.Database;
|
|
|
|
#nullable disable
|
|
|
|
namespace Phantom.Server.Database.Postgres.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20221018231328_AgentVersion")]
|
|
partial class AgentVersion
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "7.0.0-rc.1.22426.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex");
|
|
|
|
b.ToTable("Roles", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("RoleId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("RoleClaims", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("character varying(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex");
|
|
|
|
b.ToTable("Users", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<string>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserClaims", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("UserLogins", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("RoleId")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("UserRoles", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("UserTokens", "identity");
|
|
});
|
|
|
|
modelBuilder.Entity("Phantom.Server.Database.Entities.AgentEntity", b =>
|
|
{
|
|
b.Property<Guid>("AgentGuid")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("BuildVersion")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("MaxInstances")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<ushort>("MaxMemory")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("ProtocolVersion")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("AgentGuid");
|
|
|
|
b.ToTable("Agents", "agents");
|
|
});
|
|
|
|
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
|
|
|
b.Property<JsonDocument>("Data")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<string>("EventType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("SubjectId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("SubjectType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("UserId")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTime>("UtcTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AuditEvents", "system");
|
|
});
|
|
|
|
modelBuilder.Entity("Phantom.Server.Database.Entities.InstanceEntity", b =>
|
|
{
|
|
b.Property<Guid>("InstanceGuid")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid>("AgentGuid")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("InstanceName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid>("JavaRuntimeGuid")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("JvmArguments")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("LaunchAutomatically")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<ushort>("MemoryAllocation")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("MinecraftServerKind")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("MinecraftVersion")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("RconPort")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ServerPort")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("InstanceGuid");
|
|
|
|
b.ToTable("Instances", "agents");
|
|
});
|
|
|
|
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("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", 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("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<string>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Phantom.Server.Database.Entities.AuditEventEntity", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User")
|
|
.WithMany()
|
|
.HasForeignKey("UserId");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|