add house position
This commit is contained in:
@@ -19,6 +19,13 @@ namespace ReallifeGamemode.Server.Entities
|
||||
|
||||
public int Price { get; set; }
|
||||
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
public float Z { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(X, Y, Z);
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int? UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
1154
ReallifeGamemode.Server/Migrations/20190626202159_HousePosition.Designer.cs
generated
Normal file
1154
ReallifeGamemode.Server/Migrations/20190626202159_HousePosition.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Migrations
|
||||
{
|
||||
public partial class HousePosition : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "X",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Y",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
|
||||
migrationBuilder.AddColumn<float>(
|
||||
name: "Z",
|
||||
table: "Houses",
|
||||
nullable: false,
|
||||
defaultValue: 0f);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "X",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Y",
|
||||
table: "Houses");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Z",
|
||||
table: "Houses");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -415,6 +415,12 @@ namespace ReallifeGamemode.Migrations
|
||||
|
||||
b.Property<int?>("UserId");
|
||||
|
||||
b.Property<float>("X");
|
||||
|
||||
b.Property<float>("Y");
|
||||
|
||||
b.Property<float>("Z");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId")
|
||||
|
||||
Reference in New Issue
Block a user