|  | @@ -0,0 +1,46 @@
 | 
	
		
			
				|  |  | +package com.sysu.admin.controller.city;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import com.alibaba.fastjson.annotation.JSONField;
 | 
	
		
			
				|  |  | +import lombok.Data;
 | 
	
		
			
				|  |  | +import lombok.EqualsAndHashCode;
 | 
	
		
			
				|  |  | +import lombok.experimental.Accessors;
 | 
	
		
			
				|  |  | +import lombok.experimental.FieldNameConstants;
 | 
	
		
			
				|  |  | +import org.hibernate.annotations.DynamicInsert;
 | 
	
		
			
				|  |  | +import org.hibernate.annotations.DynamicUpdate;
 | 
	
		
			
				|  |  | +import org.locationtech.jts.geom.MultiPolygon;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import javax.persistence.*;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +@Data
 | 
	
		
			
				|  |  | +@Accessors(chain = true)
 | 
	
		
			
				|  |  | +@EqualsAndHashCode(callSuper = false)
 | 
	
		
			
				|  |  | +@FieldNameConstants(innerTypeName = "FIELDS")
 | 
	
		
			
				|  |  | +@Table(name = "p_town")
 | 
	
		
			
				|  |  | +@Entity
 | 
	
		
			
				|  |  | +@DynamicInsert
 | 
	
		
			
				|  |  | +@DynamicUpdate
 | 
	
		
			
				|  |  | +public class Town {
 | 
	
		
			
				|  |  | +    public Town(){}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    public Town(String name, Integer id) {
 | 
	
		
			
				|  |  | +        this.name = name;
 | 
	
		
			
				|  |  | +        this.id = id;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Id
 | 
	
		
			
				|  |  | +    @GeneratedValue(strategy = GenerationType.IDENTITY)
 | 
	
		
			
				|  |  | +    private Integer id;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @JSONField(serialize = false)
 | 
	
		
			
				|  |  | +    @Column(columnDefinition = "geom")
 | 
	
		
			
				|  |  | +    private MultiPolygon geom;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Transient
 | 
	
		
			
				|  |  | +    private String wkt;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Column()
 | 
	
		
			
				|  |  | +    private String name;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    @Column()
 | 
	
		
			
				|  |  | +    private String districtCode;
 | 
	
		
			
				|  |  | +}
 |