|
|
@@ -1,87 +0,0 @@
|
|
|
-package org.jetlinks.community.device.entity;
|
|
|
-
|
|
|
-import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
-import lombok.Data;
|
|
|
-import org.hswebframework.ezorm.rdb.mapping.annotation.ColumnType;
|
|
|
-import org.hswebframework.web.api.crud.entity.GenericEntity;
|
|
|
-import org.hswebframework.web.validator.CreateGroup;
|
|
|
-import org.jetlinks.community.device.enums.GeoType;
|
|
|
-
|
|
|
-import javax.persistence.Column;
|
|
|
-import javax.persistence.Index;
|
|
|
-import javax.persistence.Table;
|
|
|
-import javax.validation.constraints.NotBlank;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
-import java.io.Serializable;
|
|
|
-import java.sql.JDBCType;
|
|
|
-import java.util.*;
|
|
|
-/**
|
|
|
- * @author lifang
|
|
|
- * @version 1.0.0
|
|
|
- * @ClassName GeoFeature.java
|
|
|
- * @Description TODO
|
|
|
- * @createTime 2021年09月27日 10:54:00
|
|
|
- */
|
|
|
-@Data
|
|
|
-@Table(name = "geo")
|
|
|
-public class GeoEntity implements Serializable{
|
|
|
-
|
|
|
- @Column(name = "type")
|
|
|
- @NotNull(message = "类型不为空", groups = CreateGroup.class)
|
|
|
- @Schema(description = "类型")
|
|
|
- private String type;
|
|
|
-
|
|
|
- @Column(name = "gemoetry")
|
|
|
- @NotNull(message = "地图信息不为空", groups = CreateGroup.class)
|
|
|
- @ColumnType(jdbcType = JDBCType.VARCHAR,javaType = Geometry.class)
|
|
|
- @Schema(description = "地图信息")
|
|
|
- private Geometry geometry;
|
|
|
-
|
|
|
- @Column(name="properties")
|
|
|
- @NotNull(message = "实体属性不能为空", groups = CreateGroup.class)
|
|
|
- @ColumnType(jdbcType = JDBCType.VARCHAR,javaType = Property.class)
|
|
|
- @Schema(description = "实体属性")
|
|
|
- private Property properties;
|
|
|
-
|
|
|
-
|
|
|
- @Data
|
|
|
- public static class Geometry implements Serializable {
|
|
|
- private String type;
|
|
|
- private List<Object> coordinates;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @Data
|
|
|
- public static class Property implements Serializable{
|
|
|
-
|
|
|
- private String id;
|
|
|
-
|
|
|
- private String name;
|
|
|
-
|
|
|
- private String objectId;
|
|
|
-
|
|
|
- private String objectType;
|
|
|
-
|
|
|
- private List<String > acroutes;
|
|
|
-
|
|
|
- private String adcode;
|
|
|
-
|
|
|
- private List<String > center;
|
|
|
-
|
|
|
- private List<String > centroid;
|
|
|
-
|
|
|
- private int childrenNum;
|
|
|
-
|
|
|
- private Map<String,Object> parent;
|
|
|
-
|
|
|
- private String parentId;
|
|
|
-
|
|
|
- private String deviceName;
|
|
|
-
|
|
|
- private String from;
|
|
|
-
|
|
|
- private String productId;
|
|
|
-
|
|
|
- private String productName;
|
|
|
- }
|
|
|
-}
|