using PARR.Domain.Entities.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace PARR.Domain.Entities
{
    /// <summary>
    /// История работы агентов
    /// </summary>
    [Table("AgentHistories")]
    public class AgentHistory : IBaseEntity
    {
        [Key]
        public Guid Id { get; set; }

        public DateTimeOffset DateCreated { get; set; }

        [NotMapped]
        public DateTimeOffset? DateModified { get; set; }

        public string? Message { get; set; }

        public int HistoryLevelId { get; set; }

        public Guid TemplateId { get; set; }

        public Guid? OrderId { get; set; }

        [ForeignKey(nameof(TemplateId))]
        public Template? Template { get; set; }

        [ForeignKey(nameof(HistoryLevelId))]
        public AgentHistoryLevel? AgentHistoryLevel { get; set; }

        public Order? Order { get; set; }
    }
}
