diff --git a/src/main/java/com/xkrs/model/entity/CityEntity.java b/src/main/java/com/xkrs/model/entity/CityEntity.java new file mode 100644 index 0000000..8739fc3 --- /dev/null +++ b/src/main/java/com/xkrs/model/entity/CityEntity.java @@ -0,0 +1,137 @@ +package com.xkrs.model.entity; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @author xkrs + */ +@Entity +@Table(name = "city") +public class CityEntity implements Serializable { + /** + * 主键id + */ + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "city_seq_gen") + @SequenceGenerator(name = "city_seq_gen", sequenceName = "city_id_seq",allocationSize = 1) + private Integer id; + + /** + * 省名称 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String proName; + + /** + * 省编码 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String proCode; + + /** + * 市名称 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String cityName; + + /** + * 市编码 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String cityCode; + + /** + * 市纬度 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String cityLatitude; + + /** + * 市经度 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String cityLongitude; + + public CityEntity() { + } + + public CityEntity(Integer id, String proName, String proCode, String cityName, String cityCode, String cityLatitude, String cityLongitude) { + this.id = id; + this.proName = proName; + this.proCode = proCode; + this.cityName = cityName; + this.cityCode = cityCode; + this.cityLatitude = cityLatitude; + this.cityLongitude = cityLongitude; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProName() { + return proName; + } + + public void setProName(String proName) { + this.proName = proName; + } + + public String getProCode() { + return proCode; + } + + public void setProCode(String proCode) { + this.proCode = proCode; + } + + public String getCityName() { + return cityName; + } + + public void setCityName(String cityName) { + this.cityName = cityName; + } + + public String getCityCode() { + return cityCode; + } + + public void setCityCode(String cityCode) { + this.cityCode = cityCode; + } + + public String getCityLatitude() { + return cityLatitude; + } + + public void setCityLatitude(String cityLatitude) { + this.cityLatitude = cityLatitude; + } + + public String getCityLongitude() { + return cityLongitude; + } + + public void setCityLongitude(String cityLongitude) { + this.cityLongitude = cityLongitude; + } + + @Override + public String toString() { + return "City{" + + "id=" + id + + ", proName='" + proName + '\'' + + ", proCode='" + proCode + '\'' + + ", cityName='" + cityName + '\'' + + ", cityCode='" + cityCode + '\'' + + ", cityLatitude='" + cityLatitude + '\'' + + ", cityLongitude='" + cityLongitude + '\'' + + '}'; + } +} diff --git a/src/main/java/com/xkrs/model/entity/FirePointEntity.java b/src/main/java/com/xkrs/model/entity/FirePointEntity.java index 8a3717b..fe79a01 100644 --- a/src/main/java/com/xkrs/model/entity/FirePointEntity.java +++ b/src/main/java/com/xkrs/model/entity/FirePointEntity.java @@ -14,8 +14,8 @@ public class FirePointEntity implements Serializable { * 指定主键,建立自增序列,主键值取自序列 */ @Id - @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sys_user_seq_gen") - @SequenceGenerator(name = "sys_user_seq_gen", sequenceName = "sys_user_id_seq",allocationSize = 1) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fire_point_seq_gen") + @SequenceGenerator(name = "fire_point_seq_gen", sequenceName = "fire_point_id_seq",allocationSize = 1) private Integer id; /**