Umstrukturierung
This commit is contained in:
36
ReallifeGamemode.Database/Entities/ServerVehicle.cs
Normal file
36
ReallifeGamemode.Database/Entities/ServerVehicle.cs
Normal 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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user