diff --git a/src/main/java/com/xkrs/model/entity/FireTask.java b/src/main/java/com/xkrs/model/entity/FireTask.java new file mode 100644 index 0000000..e588755 --- /dev/null +++ b/src/main/java/com/xkrs/model/entity/FireTask.java @@ -0,0 +1,91 @@ +package com.xkrs.model.entity; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @author xkrs + * 任务表 + */ +@Entity +@Table(name = "fire_task") +public class FireTask implements Serializable { + + /** + * id 主键 + */ + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fire_task_seq_gen") + @SequenceGenerator(name = "fire_task_seq_gen", sequenceName = "fire_task_id_seq",allocationSize = 1) + private Integer id; + + /** + * 火点编码 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String taskFireCode; + + /** + * 任务描述 + */ + @Column(length = 2000, columnDefinition = "varchar(2000)") + private String taskInformation; + + /** + * 提交任务的时间 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String taskTime; + + public FireTask() { + } + + public FireTask(Integer id, String taskFireCode, String taskInformation, String taskTime) { + this.id = id; + this.taskFireCode = taskFireCode; + this.taskInformation = taskInformation; + this.taskTime = taskTime; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTaskFireCode() { + return taskFireCode; + } + + public void setTaskFireCode(String taskFireCode) { + this.taskFireCode = taskFireCode; + } + + public String getTaskInformation() { + return taskInformation; + } + + public void setTaskInformation(String taskInformation) { + this.taskInformation = taskInformation; + } + + public String getTaskTime() { + return taskTime; + } + + public void setTaskTime(String taskTime) { + this.taskTime = taskTime; + } + + @Override + public String toString() { + return "FireTask{" + + "id=" + id + + ", taskFireCode='" + taskFireCode + '\'' + + ", taskInformation='" + taskInformation + '\'' + + ", taskTime='" + taskTime + '\'' + + '}'; + } +} diff --git a/src/main/java/com/xkrs/model/entity/FireTaskPhoto.java b/src/main/java/com/xkrs/model/entity/FireTaskPhoto.java new file mode 100644 index 0000000..3113346 --- /dev/null +++ b/src/main/java/com/xkrs/model/entity/FireTaskPhoto.java @@ -0,0 +1,74 @@ +package com.xkrs.model.entity; + +import javax.persistence.*; +import java.io.Serializable; + +/** + * @author xkrs + * 任务和图片中间表 + */ +@Entity +@Table(name = "fire_task_photo") +public class FireTaskPhoto implements Serializable { + /** + * id 主键 + */ + @Id + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fire_task_photo_seq_gen") + @SequenceGenerator(name = "fire_task_photo_seq_gen", sequenceName = "fire_task_photo_id_seq",allocationSize = 1) + private Integer id; + + /** + * 火点编码 + */ + @Column(length = 65, columnDefinition = "varchar(65)") + private String photoFireCode; + + /** + * 任务图片链接 + */ + @Column(length = 85, columnDefinition = "varchar(85)") + private String taskPhoto; + + public FireTaskPhoto() { + } + + public FireTaskPhoto(Integer id, String photoFireCode, String taskPhoto) { + this.id = id; + this.photoFireCode = photoFireCode; + this.taskPhoto = taskPhoto; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPhotoFireCode() { + return photoFireCode; + } + + public void setPhotoFireCode(String photoFireCode) { + this.photoFireCode = photoFireCode; + } + + public String getTaskPhoto() { + return taskPhoto; + } + + public void setTaskPhoto(String taskPhoto) { + this.taskPhoto = taskPhoto; + } + + @Override + public String toString() { + return "FireTaskPhoto{" + + "id=" + id + + ", photoFireCode='" + photoFireCode + '\'' + + ", taskPhoto='" + taskPhoto + '\'' + + '}'; + } +}