using MessagePack;

namespace PMSLogProduce.Models
{
    public class Root
    {
        public List<DataItem> data { get; set; }
    }
    public class DataItem
    {
        /// <summary>
        /// 
        /// </summary>
        public string ExtendedLocation { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string OriginQuery { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string appinfo { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int disp_type { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string fetchkey { get; set; }
        /// <summary>
        /// 本地局域网
        /// </summary>
        public string location { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string origip { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string origipquery { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string resourceid { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int role_id { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int shareImage { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int showLikeShare { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string showlamp { get; set; }
        /// <summary>
        /// IP地址查询
        /// </summary>
        public string titlecont { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string tplt { get; set; }
    }


    [MessagePackObject()]
    public class CheckInYuanShidata
    {
        [Key(0)]
        public string? CommandType { get; set; }

        [Key(1)]
        public double Step { get; set; }

        [Key(2)]
        public string? IP { get; set; }

        [Key(3)]
        public string? RequestId { get; set; }

        [Key(4)]
        public ZhiJie? ZhiJieData { get; set; }

        [Key(5)]
        public JianJie? JianJieData { get; set; }

        [Key(6)]
        public DateTime CurrentTime { get; set; }
    }

    [MessagePackObject()]
    public class ZhiJie
    {
        [Key(0)]
        public CheckInData? CheckInData { get; set; }

        [Key(1)]
        public CheckOutData? CheckOutData { get; set; }

        [Key(2)]
        public RentData? RentData { get; set; }
    }

    [MessagePackObject()]
    public class JianJie
    {
        [Key(0)]
        public string? OriginallData { get; set; }
    }

    [MessagePackObject()]
    public class CheckInData
    {
        [Key(0)]
        public string? key { get; set; }

        [Key(1)]
        public string? code { get; set; }

        [Key(2)]
        public string? roomNumber { get; set; }

        [Key(3)]
        public DateTime checkInDate;

        [Key(4)]
        public string? xmlString { get; set; }

        [Key(5)]
        public string? phoneNumber { get; set; }

        [Key(6)]
        public string? idNumber { get; set; }
    }

    [MessagePackObject()]
    public class CheckOutData
    {

        [Key(0)]
        public string? key { get; set; }

        [Key(1)]
        public string? code { get; set; }

        [Key(2)]
        public string? roomNumber { get; set; }

        [Key(3)]
        public DateTime checkOutDate { get; set; }
    }

    [MessagePackObject()]
    public class RentData
    {
        [Key(0)]
        public string? key { get; set; }

        [Key(1)]
        public string? code { get; set; }

        [Key(2)]
        public string? roomNumber { get; set; }

        [Key(3)]
        public DateTime rentDate { get; set; }
    }

    //public class CheckInYuanShidata
    //{
    //    public string CommandType { get; set; }
    //    public double Step { get; set; }
    //    public string IP { get; set; }

    //    public string RequestId { get; set; }
    //    public JianJie JianJieData { get; set; }
    //    public ZhiJie ZhiJieData { get; set; }
    //    public DateTime CurrentTime { get; set; }
    //}
    //public class JianJie
    //{
    //    public string OriginallData { get; set; }
    //}
    //public class ZhiJie
    //{
    //    public CheckInData CheckInData { get; set; }
    //    public CheckOutData CheckOutData { get; set; }
    //    public RentData RentData { get; set; }
    //}
    //public class CheckInData
    //{
    //    public string key { get; set; }
    //    public string code { get; set; }
    //    public string roomNumber { get; set; }
    //    public DateTime checkInDate;
    //    public string xmlString { get; set; }
    //    public string phoneNumber { get; set; }
    //    public string idNumber { get; set; }
    //}
    //public class CheckOutData
    //{
    //    public string key { get; set; }
    //    public string code { get; set; }
    //    public string roomNumber { get; set; }
    //    public DateTime checkOutDate { get; set; }
    //}
    //public class RentData
    //{
    //    public string key { get; set; }
    //    public string code { get; set; }
    //    public string roomNumber { get; set; }
    //    public DateTime rentDate { get; set; }
    //}
}
