You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

149 lines
3.5 KiB

using MongoDB.Bson.Serialization.Attributes;
using Pursue.Extension.MongoDB;
using System;
namespace Znyc.Admin.MongoDb.Core.Collection
{
public class GpsRealTime : MongoEntityPrimaryKey
{
/// <summary>
/// 车辆ID
/// </summary>
public long VehicleId { get; set; }
/// <summary>
/// 车辆编号
/// </summary>
public string VehicleCode { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string VehiclePlate { get; set; }
/// <summary>
/// 司机
/// </summary>
public long VehicleDriver { get; set; }
/// <summary>
/// 司机联系电话
/// </summary>
public string DriverPhone { get; set; }
/// <summary>
/// 状态
/// </summary>
public int Status { get; set; }
/// <summary>
/// Gps状态
/// </summary>
public int GpsState { get; set; }
/// <summary>
/// Gps数据产生时间
/// </summary>
[BsonDateTimeOptions(Kind = DateTimeKind.Unspecified)]
public DateTime GpsTime { get; set; }
/// <summary>
/// Gps服务器接收时间
/// </summary>
[BsonDateTimeOptions(Kind = DateTimeKind.Unspecified)]
public DateTime RecTime { get; set; }
/// <summary>
/// 经度
/// </summary>
public decimal Longitude { get; set; }
/// <summary>
/// 纬度
/// </summary>
public decimal Latitude { get; set; }
/// <summary>
/// 方向
/// </summary>
public int Direct { get; set; }
/// <summary>
/// 速度
/// </summary>
public int Speed { get; set; }
/// <summary>
/// 静止时间
/// </summary>
public string DurationTime { get; set; }
private int _acc;
/// <summary>
/// 打火状态
/// </summary>
public int Acc
{
get => GpsState == 0 ? 0 : _acc;
set => _acc = value;
}
private string _accDurationTime;
/// <summary>
/// ACC持续时间
/// </summary>
public string AccDurationTime
{
get => GpsState == 0 ? DurationTime : _accDurationTime;
set => _accDurationTime = value;
}
/// <summary>
/// 地址
/// </summary>
public string Address { get; set; }
/// <summary>
/// SIM卡号
/// </summary>
public string SimNo { get; set; }
/// <summary>
/// 公司ID
/// </summary>
public long CompanyId { get; set; }
/// <summary>
/// 修改时间
/// </summary>
[BsonDateTimeOptions(Kind = DateTimeKind.Unspecified)]
public DateTime ModifiedTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[BsonDateTimeOptions(Kind = DateTimeKind.Unspecified)]
public DateTime CreatedTime { get; set; }
/// <summary>
/// 设备号
/// </summary>
public string TerminalNo { get; set; }
/// <summary>
/// 是否工作
/// </summary>
public int Work { get; set; }
/// <summary>
/// 工作时长
/// </summary>
public string WorkDurationTime { get; set; }
/// <summary>
/// Gps信号模式 1 GPS,2 基站
/// </summary>
//public int GpsMode { get; set; }
}
}