- add: database for genitals

This commit is contained in:
2024-02-16 21:21:19 +03:00
parent 52628d0393
commit c3e8e64fb8
14 changed files with 3907 additions and 14 deletions

View File

@@ -564,6 +564,38 @@ namespace Content.Server.Database.Migrations.Postgres
});
});
modelBuilder.Entity("Content.Server.Database.Genital", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasColumnName("genital_id");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Color")
.IsRequired()
.HasColumnType("text")
.HasColumnName("color");
b.Property<string>("GenitalPrototype")
.IsRequired()
.HasColumnType("text")
.HasColumnName("genital_prototype");
b.Property<int>("ProfileId")
.HasColumnType("integer")
.HasColumnName("profile_id");
b.HasKey("Id")
.HasName("PK_genital");
b.HasIndex("ProfileId", "GenitalPrototype")
.IsUnique();
b.ToTable("genital", (string)null);
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.Property<int>("Id")
@@ -1545,6 +1577,18 @@ namespace Content.Server.Database.Migrations.Postgres
b.Navigation("Server");
});
modelBuilder.Entity("Content.Server.Database.Genital", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
.WithMany("Genitals")
.HasForeignKey("ProfileId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("FK_genital_profile_profile_id");
b.Navigation("Profile");
});
modelBuilder.Entity("Content.Server.Database.Job", b =>
{
b.HasOne("Content.Server.Database.Profile", "Profile")
@@ -1779,6 +1823,8 @@ namespace Content.Server.Database.Migrations.Postgres
{
b.Navigation("Antags");
b.Navigation("Genitals");
b.Navigation("Jobs");
b.Navigation("Traits");