Umstrukturierung

This commit is contained in:
hydrant
2019-09-17 20:45:54 +02:00
parent 76ebab53d5
commit 331141d6bb
140 changed files with 455 additions and 444 deletions

View File

@@ -0,0 +1,36 @@
using GTANetworkAPI;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ReallifeGamemode.Database.Entities
{
public abstract class ServerVehicle
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public VehicleHash Model { get; set; }
public float PositionX { get; set; }
public float PositionY { get; set; }
public float PositionZ { get; set; }
public float Heading { get; set; }
[StringLength(8)]
public string NumberPlate { get; set; }
public int PrimaryColor { get; set; }
public int SecondaryColor { get; set; }
public bool Locked { get; set; }
public bool Active { get; set; }
public float DistanceDriven { get; set; }
public float TankAmount { get; set; }
public int Livery { get; set; }
[NotMapped]
public Vector3 Position => new Vector3(PositionX, PositionY, PositionZ);
public new virtual string ToString()
{
return $"{Model}";
}
}
}