using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ReallifeGamemode.Server.Entities;

/**
* @overview Life of German Reallife - Logs Death (Death.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/

namespace ReallifeGamemode.Server.Entities.Logs
{
    public class Death
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [ForeignKey("Victim")]
        public int VictimId { get; set; }
        public User Victim { get; set; }

        [ForeignKey("Killer")]
        public int? KillerId { get; set; }
        public User Killer { get; set; }

        public float VictimPositionX { get; set; }
        public float VictimPositionY { get; set; }
        public float VictimPositionZ { get; set; }
        public float VictimHeading { get; set; }

        public float KillerPositionX { get; set; }
        public float KillerPositionY { get; set; }
        public float KillerPositionZ { get; set; }
        public float KillerHeading { get; set; }

        [StringLength(64)]
        public string CauseOfDeath { get; set; }
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public DateTime Timestamp { get; set; }
    }
}
