From 4012f672561a0eb726f829dd6c9e8c9a1f50d248 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 29 Mar 2023 17:58:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=81=AB=E7=82=B9=E9=87=8D=E6=9E=84-=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=98=B2=E7=81=AB=E5=AD=A3=E9=85=8D=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkrs/dao/FireSeasonConfigDao.java | 13 ++ .../model/entity/FireSeasonConfigEntity.java | 113 ++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 src/main/java/com/xkrs/dao/FireSeasonConfigDao.java create mode 100644 src/main/java/com/xkrs/model/entity/FireSeasonConfigEntity.java diff --git a/src/main/java/com/xkrs/dao/FireSeasonConfigDao.java b/src/main/java/com/xkrs/dao/FireSeasonConfigDao.java new file mode 100644 index 0000000..204af60 --- /dev/null +++ b/src/main/java/com/xkrs/dao/FireSeasonConfigDao.java @@ -0,0 +1,13 @@ +package com.xkrs.dao; + +import com.xkrs.model.entity.FireSeasonConfigEntity; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Component; + +/** + * 防火季配置Dao + */ +@Component +public interface FireSeasonConfigDao extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/src/main/java/com/xkrs/model/entity/FireSeasonConfigEntity.java b/src/main/java/com/xkrs/model/entity/FireSeasonConfigEntity.java new file mode 100644 index 0000000..3b58c3d --- /dev/null +++ b/src/main/java/com/xkrs/model/entity/FireSeasonConfigEntity.java @@ -0,0 +1,113 @@ +package com.xkrs.model.entity; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * 防火季配置表 + */ +@Entity +@Table(name = "fire_season_config") +public class FireSeasonConfigEntity implements Serializable { + + /** + * 指定主键,建立自增序列,主键值取自序列 + */ + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fire_season_config_seq_gen") + @SequenceGenerator(name = "fire_season_config_seq_gen", sequenceName = "fire_season_config_id_seq", allocationSize = 1) + private Long id; + + /** + * 级别 + * 0:默认全局配置 + * 1:省级 + * 2:市级 + * 3:区县级 + * 4:乡镇街道级 + */ + private Long configLevel; + + /** + * 开始时间 + */ + private String startTime; + + /** + * 结束时间 + */ + private String endTime; + + /** + * 区划编码 + */ + private String countyCode; + + /** + * 区划名称 + */ + private String countyName; + + public FireSeasonConfigEntity() { + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getConfigLevel() { + return configLevel; + } + + public void setConfigLevel(Long configLevel) { + this.configLevel = configLevel; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getCountyCode() { + return countyCode; + } + + public void setCountyCode(String countyCode) { + this.countyCode = countyCode; + } + + public String getCountyName() { + return countyName; + } + + public void setCountyName(String countyName) { + this.countyName = countyName; + } + + @Override + public String toString() { + return "FireSeasonConfigEntity{" + + "id=" + id + + ", configLevel=" + configLevel + + ", startTime='" + startTime + '\'' + + ", endTime='" + endTime + '\'' + + ", countyCode='" + countyCode + '\'' + + ", countyName='" + countyName + '\'' + + '}'; + } +}