|
|
|
|
@@ -0,0 +1,80 @@
|
|
|
|
|
package com.kamco.cd.kamcoback.postgres.entity;
|
|
|
|
|
|
|
|
|
|
import jakarta.persistence.Column;
|
|
|
|
|
import jakarta.persistence.Entity;
|
|
|
|
|
import jakarta.persistence.GeneratedValue;
|
|
|
|
|
import jakarta.persistence.GenerationType;
|
|
|
|
|
import jakarta.persistence.Id;
|
|
|
|
|
import jakarta.persistence.SequenceGenerator;
|
|
|
|
|
import jakarta.persistence.Table;
|
|
|
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
|
|
import jakarta.validation.constraints.Size;
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.time.Instant;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import lombok.Getter;
|
|
|
|
|
import lombok.Setter;
|
|
|
|
|
import org.hibernate.annotations.ColumnDefault;
|
|
|
|
|
import org.hibernate.annotations.JdbcTypeCode;
|
|
|
|
|
import org.hibernate.type.SqlTypes;
|
|
|
|
|
|
|
|
|
|
@Getter
|
|
|
|
|
@Setter
|
|
|
|
|
@Entity
|
|
|
|
|
@Table(name = "tb_map_layer")
|
|
|
|
|
public class MapLayerEntity {
|
|
|
|
|
|
|
|
|
|
@Id
|
|
|
|
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tb_map_layer_id_gen")
|
|
|
|
|
@SequenceGenerator(
|
|
|
|
|
name = "tb_map_layer_id_gen",
|
|
|
|
|
sequenceName = "tb_map_layer_seq",
|
|
|
|
|
allocationSize = 1)
|
|
|
|
|
@Column(name = "id", nullable = false)
|
|
|
|
|
private Long id;
|
|
|
|
|
|
|
|
|
|
@Size(max = 20)
|
|
|
|
|
@NotNull
|
|
|
|
|
@Column(name = "layer_type", nullable = false, length = 20)
|
|
|
|
|
private String layerType;
|
|
|
|
|
|
|
|
|
|
@Size(max = 200)
|
|
|
|
|
@Column(name = "title", length = 200)
|
|
|
|
|
private String title;
|
|
|
|
|
|
|
|
|
|
@Column(name = "description", length = Integer.MAX_VALUE)
|
|
|
|
|
private String description;
|
|
|
|
|
|
|
|
|
|
@Column(name = "url", length = Integer.MAX_VALUE)
|
|
|
|
|
private String url;
|
|
|
|
|
|
|
|
|
|
@Column(name = "min_lon", precision = 10, scale = 7)
|
|
|
|
|
private BigDecimal minLon;
|
|
|
|
|
|
|
|
|
|
@Column(name = "min_lat", precision = 10, scale = 7)
|
|
|
|
|
private BigDecimal minLat;
|
|
|
|
|
|
|
|
|
|
@Column(name = "max_lon", precision = 10, scale = 7)
|
|
|
|
|
private BigDecimal maxLon;
|
|
|
|
|
|
|
|
|
|
@Column(name = "max_lat", precision = 10, scale = 7)
|
|
|
|
|
private BigDecimal maxLat;
|
|
|
|
|
|
|
|
|
|
@Column(name = "min_zoom")
|
|
|
|
|
private Short minZoom;
|
|
|
|
|
|
|
|
|
|
@Column(name = "max_zoom")
|
|
|
|
|
private Short maxZoom;
|
|
|
|
|
|
|
|
|
|
@Column(name = "raw_json")
|
|
|
|
|
@JdbcTypeCode(SqlTypes.JSON)
|
|
|
|
|
private Map<String, Object> rawJson;
|
|
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
|
@ColumnDefault("now()")
|
|
|
|
|
@Column(name = "created_at", nullable = false)
|
|
|
|
|
private Instant createdAt;
|
|
|
|
|
|
|
|
|
|
@Column(name = "updated_at")
|
|
|
|
|
private Instant updatedAt;
|
|
|
|
|
}
|