80 lines
2.4 KiB
C#
80 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace VECV_WebApi.Common
|
|
{
|
|
public class Root
|
|
{
|
|
public List<Document> docs { get; set; }
|
|
}
|
|
public class Document
|
|
{
|
|
public string _id { get; set; }
|
|
public string _rev { get; set; }
|
|
public string type { get; set; }
|
|
public string value { get; set; }
|
|
public string eDateTime { get; set; }
|
|
public string eDate { get; set; }
|
|
public string cDateTime { get; set; }
|
|
public string cDate { get; set; }
|
|
public string vc_pdatetime { get; set; }
|
|
public string ac_pdatetime { get; set; }
|
|
public string kinesis_arrival_time { get; set; }
|
|
public DateTime? ParsedEDateTime
|
|
{
|
|
get
|
|
{
|
|
DateTime parsedDateTime;
|
|
if (DateTime.TryParse(eDateTime, out parsedDateTime))
|
|
{
|
|
return parsedDateTime;
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
public List<string> ParsedValue
|
|
{
|
|
get
|
|
{
|
|
return string.IsNullOrEmpty(value)
|
|
? new List<string>()
|
|
: value.Split(',').ToList();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class DocumentValue
|
|
{
|
|
public string _deviceid { get; set; }
|
|
public float _latitude { get; set; }
|
|
public float _longitude { get; set; }
|
|
public Int32 _utc { get; set; }
|
|
public float _speed { get; set; }
|
|
public Int32 _mainPower { get; set; }
|
|
public Int32 _ignition { get; set; }
|
|
public Int32 _live { get; set; }
|
|
public float _heading { get; set; }
|
|
public string _driver_id { get; set; }
|
|
public string _sequence_number { get; set; }
|
|
public Int32 _digital_input_1 { get; set; }
|
|
public Int32 _digital_input_2 { get; set; }
|
|
public Int32 _digital_input_3 { get; set; }
|
|
public Int32 _digital_input_4 { get; set; }
|
|
public Int32 _digital_input_5 { get; set; }
|
|
public float _analog_input_1 { get; set; }
|
|
|
|
public float _analog_input_2 { get; set; }
|
|
public float _analog_input_3 { get; set; }
|
|
public float _vehicle_battery { get; set; }
|
|
public float _internal_battery { get; set; }
|
|
public float _gps_odometer { get; set; }
|
|
|
|
}
|
|
}
|
|
|