fix user -> house relation

This commit is contained in:
hydrant
2019-06-27 18:28:28 +02:00
parent f2cf7464d0
commit f2b1788939
4 changed files with 1223 additions and 5 deletions

View File

@@ -423,8 +423,7 @@ namespace ReallifeGamemode.Migrations
b.HasKey("Id");
b.HasIndex("UserId")
.IsUnique();
b.HasIndex("UserId");
b.ToTable("Houses");
});
@@ -846,6 +845,8 @@ namespace ReallifeGamemode.Migrations
b.HasIndex("GroupId");
b.HasIndex("HouseId");
b.ToTable("Users");
});
@@ -1055,8 +1056,8 @@ namespace ReallifeGamemode.Migrations
modelBuilder.Entity("ReallifeGamemode.Server.Entities.House", b =>
{
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
.WithOne("House")
.HasForeignKey("ReallifeGamemode.Server.Entities.House", "UserId");
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Logs.Death", b =>
@@ -1099,6 +1100,10 @@ namespace ReallifeGamemode.Migrations
b.HasOne("ReallifeGamemode.Server.Entities.Group", "Group")
.WithMany()
.HasForeignKey("GroupId");
b.HasOne("ReallifeGamemode.Server.Entities.House", "House")
.WithMany()
.HasForeignKey("HouseId");
});
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserBankAccount", b =>