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.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 {
|
/**
|
* 车辆id
|
*/
|
@Id
|
private Long vehicle_id;
|
/**
|
* 车辆VIN
|
*/
|
private String vin;
|
/**
|
* 车辆所属围栏id
|
*/
|
private Long electronic_id;
|
/**
|
* 车辆实时位置信息
|
*/
|
private GeoJsonPoint point;
|
/**
|
* 运营状态 1运营中 2维修中 3已收车 4车辆异常
|
*/
|
private Integer status;
|
|
/**
|
* 车辆状态 1接单中 0空闲 巡游单不做处理 还是空闲
|
*/
|
private Integer state;
|
|
/**
|
* 当前电量
|
*/
|
private Integer currentElectricity;
|
|
/**
|
* 是否有巡游单子 1有 0否
|
*/
|
private Integer hasOrder;
|
|
/**
|
* 订单id
|
*/
|
private Long orderId;
|
|
|
|
|
|
}
|