package com.xiaopeng.api.vo.automaticPilot;
|
|
|
import lombok.Data;
|
import org.springframework.data.annotation.Id;
|
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
|
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
import org.springframework.data.mongodb.core.index.CompoundIndexes;
|
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
|
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
|
import org.springframework.data.mongodb.core.mapping.Document;
|
|
import java.io.Serializable;
|
|
/**
|
* 车辆实时位置信息
|
*/
|
@Data
|
@Document(collection = "vehicle_position")
|
@CompoundIndexes({
|
@CompoundIndex(name = "vehicle_id_electronic_id", def = "{'vehicle_id': 1, 'electronic_id': 1}"),
|
@CompoundIndex(name = "location_index", def = "{'point': '2dsphere'}")
|
}
|
)
|
public class VehiclePosition implements Serializable {
|
/**
|
* 车辆VIN
|
*/
|
private String vin;
|
/**
|
* 车辆所属围栏id
|
*/
|
private Long electronic_id;
|
/**
|
* 车辆实时位置信息
|
*/
|
@GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
|
private GeoJsonPoint point;
|
/**
|
* 航向,单位:度,北零顺时针。范围:[0-360)。0 => 北, 90 => 东, 180 => 南, 270 => 西
|
*/
|
private Double course;
|
/**
|
* 海拔 单位米
|
*/
|
private Float alt;
|
/**
|
* 当前速度
|
*/
|
private Float speed;
|
/**
|
* 当前电量
|
*/
|
private Integer currentElectricity;
|
/**
|
* 综合续航
|
*/
|
private Float mileageRange;
|
|
/**
|
* 是否有巡游单子 1有 0否
|
*/
|
private Integer hasOrder;
|
|
/**
|
* 订单id
|
*/
|
private Long orderId;
|
/**
|
* 总里程
|
*/
|
private Long totalOdometer;
|
/**
|
* 添加时间
|
*/
|
private Long addTime;
|
}
|