Add House Menu
This commit is contained in:
1269
ReallifeGamemode.Server/Migrations/20190728142431_HouseEnhancments.Designer.cs
generated
Normal file
1269
ReallifeGamemode.Server/Migrations/20190728142431_HouseEnhancments.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Migrations
|
||||
{
|
||||
public partial class HouseEnhancments : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "CanRentIn",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "RentalFee",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "HouseRentals",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
HouseId = table.Column<int>(nullable: true),
|
||||
UserId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_HouseRentals", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_HouseRentals_Houses_HouseId",
|
||||
column: x => x.HouseId,
|
||||
principalTable: "Houses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_HouseRentals_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_HouseRentals_HouseId",
|
||||
table: "HouseRentals",
|
||||
column: "HouseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_HouseRentals_UserId",
|
||||
table: "HouseRentals",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "HouseRentals");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CanRentIn",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RentalFee",
|
||||
table: "Houses");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -463,10 +463,14 @@ namespace ReallifeGamemode.Migrations
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<bool>("CanRentIn");
|
||||
|
||||
b.Property<int?>("OwnerId");
|
||||
|
||||
b.Property<int>("Price");
|
||||
|
||||
b.Property<int>("RentalFee");
|
||||
|
||||
b.Property<string>("Type");
|
||||
|
||||
b.Property<float>("X");
|
||||
@@ -482,6 +486,24 @@ namespace ReallifeGamemode.Migrations
|
||||
b.ToTable("Houses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.HouseRentals", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("HouseId");
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("HouseId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("HouseRentals");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Interior", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1137,6 +1159,17 @@ namespace ReallifeGamemode.Migrations
|
||||
.HasForeignKey("OwnerId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.HouseRentals", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.House", "House")
|
||||
.WithMany()
|
||||
.HasForeignKey("HouseId");
|
||||
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Logs.Death", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Server.Entities.User", "Killer")
|
||||
|
||||
Reference in New Issue
Block a user