//
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace Content.Server.Database.Migrations.Postgres
{
[DbContext(typeof(PostgresPreferencesDbContext))]
partial class PostgresPreferencesDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "3.1.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("Content.Server.Database.Antag", b =>
{
b.Property("AntagId")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("AntagName")
.IsRequired()
.HasColumnType("text");
b.Property("HumanoidProfileId")
.HasColumnType("integer");
b.HasKey("AntagId");
b.HasIndex("HumanoidProfileId", "AntagName")
.IsUnique();
b.ToTable("Antag");
});
modelBuilder.Entity("Content.Server.Database.HumanoidProfile", b =>
{
b.Property("HumanoidProfileId")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("Age")
.HasColumnType("integer");
b.Property("CharacterName")
.IsRequired()
.HasColumnType("text");
b.Property("EyeColor")
.IsRequired()
.HasColumnType("text");
b.Property("FacialHairColor")
.IsRequired()
.HasColumnType("text");
b.Property("FacialHairName")
.IsRequired()
.HasColumnType("text");
b.Property("HairColor")
.IsRequired()
.HasColumnType("text");
b.Property("HairName")
.IsRequired()
.HasColumnType("text");
b.Property("PreferenceUnavailable")
.HasColumnType("integer");
b.Property("PrefsId")
.HasColumnType("integer");
b.Property("Sex")
.IsRequired()
.HasColumnType("text");
b.Property("SkinColor")
.IsRequired()
.HasColumnType("text");
b.Property("Slot")
.HasColumnType("integer");
b.Property("SlotName")
.IsRequired()
.HasColumnType("text");
b.HasKey("HumanoidProfileId");
b.HasIndex("PrefsId");
b.HasIndex("Slot", "PrefsId")
.IsUnique();
b.ToTable("HumanoidProfile");
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.Property("JobId")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("JobName")
.IsRequired()
.HasColumnType("text");
b.Property("Priority")
.HasColumnType("integer");
b.Property("ProfileHumanoidProfileId")
.HasColumnType("integer");
b.HasKey("JobId");
b.HasIndex("ProfileHumanoidProfileId");
b.ToTable("Job");
});
modelBuilder.Entity("Content.Server.Database.Prefs", b =>
{
b.Property("PrefsId")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property("SelectedCharacterSlot")
.HasColumnType("integer");
b.Property("Username")
.IsRequired()
.HasColumnType("text");
b.HasKey("PrefsId");
b.HasIndex("Username")
.IsUnique();
b.ToTable("Preferences");
});
modelBuilder.Entity("Content.Server.Database.Antag", b =>
{
b.HasOne("Content.Server.Database.HumanoidProfile", "Profile")
.WithMany("Antags")
.HasForeignKey("HumanoidProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Content.Server.Database.HumanoidProfile", b =>
{
b.HasOne("Content.Server.Database.Prefs", "Prefs")
.WithMany("HumanoidProfiles")
.HasForeignKey("PrefsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.HasOne("Content.Server.Database.HumanoidProfile", "Profile")
.WithMany("Jobs")
.HasForeignKey("ProfileHumanoidProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}