创建了山东省各市信息的表
This commit is contained in:
parent
219780c1d1
commit
406909d422
137
src/main/java/com/xkrs/model/entity/CityEntity.java
Normal file
137
src/main/java/com/xkrs/model/entity/CityEntity.java
Normal file
@ -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 + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user