diff --git a/src/main/java/com/xkrs/model/entity/ForestRanger.java b/src/main/java/com/xkrs/model/entity/ForestRanger.java new file mode 100644 index 0000000..7ebfb2b --- /dev/null +++ b/src/main/java/com/xkrs/model/entity/ForestRanger.java @@ -0,0 +1,155 @@ +package com.xkrs.model.entity; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @author xkrs + * 护林员信息 + */ +@Entity +@Table(name = "forest_ranger") +public class ForestRanger implements Serializable { + + /** + * 主键 + */ + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "forest_ranger_seq_gen") + @SequenceGenerator(name = "forest_ranger_seq_gen", sequenceName = "forest_ranger_id_seq",allocationSize = 1) + private Integer id; + + /** + * 护林员的姓名 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String rangerName; + + /** + * 护林员的电话 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String rangerPhone; + + /** + * 纬度 + */ + @Column(length = 85, columnDefinition = "varchar(85)") + private String rangerLatitude; + + /** + * 经度 + */ + @Column(length = 85, columnDefinition = "varchar(85)") + private String rangerLongitude; + + /** + * 护林员所在市区县 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String rangerCountyName; + + /** + * 市区县的编码 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String rangerCountyCode; + + /** + * 护林员的状态(0空闲 1正在执行任务) + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String rangerType; + + public ForestRanger() { + } + + public ForestRanger(Integer id, String rangerName, String rangerPhone, String rangerLatitude, String rangerLongitude, String rangerCountyName, String rangerCountyCode, String rangerType) { + this.id = id; + this.rangerName = rangerName; + this.rangerPhone = rangerPhone; + this.rangerLatitude = rangerLatitude; + this.rangerLongitude = rangerLongitude; + this.rangerCountyName = rangerCountyName; + this.rangerCountyCode = rangerCountyCode; + this.rangerType = rangerType; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getRangerName() { + return rangerName; + } + + public void setRangerName(String rangerName) { + this.rangerName = rangerName; + } + + public String getRangerPhone() { + return rangerPhone; + } + + public void setRangerPhone(String rangerPhone) { + this.rangerPhone = rangerPhone; + } + + public String getRangerLatitude() { + return rangerLatitude; + } + + public void setRangerLatitude(String rangerLatitude) { + this.rangerLatitude = rangerLatitude; + } + + public String getRangerLongitude() { + return rangerLongitude; + } + + public void setRangerLongitude(String rangerLongitude) { + this.rangerLongitude = rangerLongitude; + } + + public String getRangerCountyName() { + return rangerCountyName; + } + + public void setRangerCountyName(String rangerCountyName) { + this.rangerCountyName = rangerCountyName; + } + + public String getRangerCountyCode() { + return rangerCountyCode; + } + + public void setRangerCountyCode(String rangerCountyCode) { + this.rangerCountyCode = rangerCountyCode; + } + + public String getRangerType() { + return rangerType; + } + + public void setRangerType(String rangerType) { + this.rangerType = rangerType; + } + + @Override + public String toString() { + return "XkRsForestRanger{" + + "id=" + id + + ", rangerName='" + rangerName + '\'' + + ", rangerPhone='" + rangerPhone + '\'' + + ", rangerLatitude='" + rangerLatitude + '\'' + + ", rangerLongitude='" + rangerLongitude + '\'' + + ", rangerCountyName='" + rangerCountyName + '\'' + + ", rangerCountyCode='" + rangerCountyCode + '\'' + + ", rangerType='" + rangerType + '\'' + + '}'; + } +}