火点重构-添加防火季配置表

This commit is contained in:
liuchengqian 2023-03-29 17:58:54 +08:00
parent 6d4e284d01
commit 4012f67256
2 changed files with 126 additions and 0 deletions

View File

@ -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<FireSeasonConfigEntity, Long>, JpaSpecificationExecutor<FireSeasonConfigEntity> {
}

View File

@ -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 + '\'' +
'}';
}
}