package com.xiaopeng.api.model.map;
|
|
import lombok.Data;
|
import org.springframework.data.annotation.Id;
|
import org.springframework.data.mongodb.core.geo.GeoJsonPolygon;
|
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;
|
|
/**
|
* 地理围栏-多边形
|
* @author zhibing.pu
|
* @date 2023/4/29 23:53
|
*/
|
@Data
|
@Document(collection = "operating_area")
|
@CompoundIndexes({
|
@CompoundIndex(name = "fenceId_id_areaId_id", def = "{'fenceId': 1, 'areaId': 1}"),
|
@CompoundIndex(name = "location_index", def = "{'points': '2dsphere'}")
|
}
|
)
|
public class XpGeoFencingPolygon implements Serializable {
|
private static final long serialVersionUID = 4508868382007529971L;
|
|
@Id
|
private String id;
|
|
/**
|
* 围栏id
|
*/
|
private String fenceId;
|
|
|
/**
|
* 围栏区域id
|
*/
|
private String areaId;
|
|
/**
|
* 城市code
|
*/
|
private String cityCode;
|
|
/**
|
* 围栏名称
|
*/
|
private String name;
|
|
|
|
/**
|
* 运营策略
|
*/
|
private String operationStrategy;
|
|
/**
|
* 多边形经纬度
|
*/
|
private GeoJsonPolygon points;
|
|
}
|