﻿using Nest;
using Quest.Common.Messages.Index;
using System;

namespace Quest.Common.Messages.Audit
{

    [Serializable, ElasticsearchType(Name = "AuditDocument")]
    public class AuditDocument : QuestDocument
    {
        [Date]
        public DateTime Timestamp { get; set; }

        [Number(NumberType.Long)]
        public long Duration { get; set; }

        [Text(Index = false)]
        public string User { get; set; }

        [Keyword]
        public string Type { get; set; }

        [Keyword]
        public string Source { get; set; }

        [Text]
        public string indextext { get; set; }

        [Text(Index = false)]
        public string Description { get; set; }

        [Date(Index = false)]
        public DateTime Created { get; set; }

        public GeoLocation Location { get; set; }

        [GeoShape]
        public PolygonGeoShape Poly { get; set; }
    }
}
