using System;

namespace XYY.Data.Model.Standard.Tracking
{
    public enum TrackingEventType
    {
        InStock = 1,
        OutStock = 2,
        Traffic = 3,
        Departure = 4,
        Arrive = 5,
        Clearance = 6,
        Online = 7,
        Sign = 8
    }

    public static class StepName
    {
        public static string InsertMQError = "InsertMQError";
        public static string SendUser = "SendUser";
    }

    public class XikeTraceMessage : TracekingTraceMessage
    {

    }

    public class TrackingTraceMeessageSendResult
    {
        public string Key
        {
            get; set;
        }

        public bool IsSuccess
        {
            get; set;
        }

        public string ErrorMessage
        {
            get; set;
        }

        public DateTime SendTime
        {
            get; set;
        }
    }


    public class TracekingTraceMessage
    {
        public string Key
        {
            get; set;
        }

        /// <summary>
        /// 事件位置
        /// </summary>
        public string EventLoaction
        {
            get; set;
        }

        /// <summary>
        /// 事件内容
        /// </summary>
        public string EventContent
        {
            get; set;
        }

        /// <summary>
        /// 事件时间
        /// </summary>
        public DateTime EventTime
        {
            get; set;
        }

        /// <summary>
        /// 系统单号
        /// </summary>
        public string CustomerNo
        {
            get; set;
        }

        /// <summary>
        /// 事件
        /// </summary>
        public TrackingEventType TrackingEventType
        {
            get; set;
        }

    }


    /// <summary>
    /// 物流轨迹日志
    /// </summary>
    public class TrackingTraceLog
    {

        public TrackingTraceLog()
        {

        }

        public TrackingTraceLog(string systeno, TrackingEventType eventType)
        {
            Key = CustomerNo + "_" + (int)TrackingEventType;
        }

        public string Key
        {
            get; set;
        }

        public string ApiName
        {
            get; set;
        }

        /// <summary>
        /// 系统单号
        /// </summary>
        public string CustomerNo
        {
            get; set;
        }

        /// <summary>
        /// 事件类型
        /// </summary>
        public TrackingEventType TrackingEventType
        {
            get; set;
        }

        /// <summary>
        /// 事件位置
        /// </summary>
        public string EventLoaction
        {
            get; set;
        }

        /// <summary>
        /// 事件内容
        /// </summary>
        public string EventContent
        {
            get; set;
        }

        /// <summary>
        /// 事件时间
        /// </summary>
        public DateTime EventTime
        {
            get; set;
        }

        /// <summary>
        /// 抓取时间
        /// </summary>
        public DateTime GetTime
        {
            get; set;
        }

        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTime? SendTime
        {
            get; set;
        }

        public string StepName
        {
            get; set;
        }

        /// <summary>
        /// 发送结果
        /// </summary>
        public string SendMessage
        {
            get; set;
        }
    }
}
