Files
2019-09-17 20:45:54 +02:00

37 lines
1.0 KiB
C#

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}";
}
}
}