[+] Add SchoolVehicle Class for Driving and Flight School

[*] Fixed and Improved Flight School
This commit is contained in:
Lukas Moungos
2019-11-01 18:24:02 +01:00
parent 1ec473a2d1
commit a211e23d37
12 changed files with 1550 additions and 54 deletions

View File

@@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using ReallifeGamemode.Database.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ReallifeGamemode.Database.Models;
namespace ReallifeGamemode.Database.Entities
{
public class SchoolVehicle : ServerVehicle
{
public int SchoolId { get; set; }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace ReallifeGamemode.Database.Migrations
{
public partial class SchoolId : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "SchoolId",
table: "ServerVehicles",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "SchoolId",
table: "ServerVehicles");
}
}
}

View File

@@ -1118,6 +1118,17 @@ namespace ReallifeGamemode.Database.Migrations
b.HasDiscriminator().HasValue("SavedVehicle");
});
modelBuilder.Entity("ReallifeGamemode.Database.Entities.SchoolVehicle", b =>
{
b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle");
b.Property<int>("SchoolId");
b.ToTable("SchoolVehicle");
b.HasDiscriminator().HasValue("SchoolVehicle");
});
modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopVehicle", b =>
{
b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle");

View File

@@ -118,5 +118,9 @@ namespace ReallifeGamemode.Database.Models
// Bus Routes
public DbSet<Entities.BusRoute> BusRoutes { get; set; }
public DbSet<Entities.BusRoutePoint> BusRoutesPoints { get; set; }
//Driving/Bike/Flight School
public DbSet<Entities.SchoolVehicle> SchoolVehicles { get; set; }
}
}