package com.xkrs.model.entity; import javax.persistence.*; /** * @author XinYi Song * 全国省市区 */ @Entity @Table(name = "nationwide") public class Nationwide { /** * 主键id */ @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "nationwide_seq_gen") @SequenceGenerator(name = "nationwide_seq_gen", sequenceName = "nationwide_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 countyName; /** * 区县编码 */ @Column(length = 65, columnDefinition = "varchar(65)") private String countyCode; public Nationwide() { } public Nationwide(Integer id, String proName, String proCode, String cityName, String cityCode, String countyName, String countyCode) { this.id = id; this.proName = proName; this.proCode = proCode; this.cityName = cityName; this.cityCode = cityCode; this.countyName = countyName; this.countyCode = countyCode; } 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 getCountyName() { return countyName; } public void setCountyName(String countyName) { this.countyName = countyName; } public String getCountyCode() { return countyCode; } public void setCountyCode(String countyCode) { this.countyCode = countyCode; } @Override public String toString() { return "Nationwide{" + "id=" + id + ", proName='" + proName + '\'' + ", proCode='" + proCode + '\'' + ", cityName='" + cityName + '\'' + ", cityCode='" + cityCode + '\'' + ", countyName='" + countyName + '\'' + ", countyCode='" + countyCode + '\'' + '}'; } }