using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using GTANetworkAPI; using ReallifeGamemode.Server.Core.API; using ReallifeGamemode.Server.Core.RageMP; namespace ReallifeGamemode.Database.Entities { public partial class House { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string Type { get; set; } public int Price { get; set; } public float X { get; set; } public float Y { get; set; } public float Z { get; set; } public int RentalFee { get; set; } public bool CanRentIn { get; set; } public DateTime LastRentSetTime { get; set; } [NotMapped] public Vector3 Position => new Vector3(X, Y, Z); [NotMapped] public Position NewPosition => new Position(X, Y, Z); [ForeignKey("Owner")] public int? OwnerId { get; set; } public User Owner { get; set; } [NotMapped] public Player User => Owner?.Player; [NotMapped] public IPlayer OwnerPlayer => new RagePlayer(User); } }