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