package com.ankaibei.workFlow.webadmin.ankaibei.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author
 * @version 1.0
 * @description:任务进度表
 * @date 2022/9/14 10:59
 */
@Entity
@Table(name = "task_info", schema = "ankaibei")
public class TaskInfoEntity {

    private Integer taskId;
    /**
     * 目标任务
     */
    private String targetTask;
    /**
     * 优先级
     */
    private String taskPriority;
    /**
     * 参与人
     */
    private String taskParticipant;
    /**
     * 时间计划 开始时间
     */
    private Date startTime;
    /**
     * 时间计划 结束时间
     */
    private Date endTime;
    /**
     * 任务状态
     */
    private String taskStatus;
    /**
     * 任务创建人
     */
    private String taskCreator;
    /**
     * 量化指标
     */
    private String taskIndex;
    /**
     * 验收标准
     */
    private String taskStandard;
    /**
     * 交付说明
     */
    private String taskStatements;
    /**
     * 项目id(关联项目)
     */
    private String projectId;
    /**
     * 创建时间
     */
    private Date createDate;
    /**
     * 进入流程后获取到的流程实例的id
     */
    private String processInstanceId;
    /**
     * 工作流任务处理状态
     */
    private Integer flowTaskStatus;
    /**
     * 流程定义Id
     */
    private String processDefinitionId;
    /**
     * 是否已删除： 1=正常，-1=已删除
     */
    private String isDelete;

    @Basic
    @Column(name = "is_delete")
    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "process_definition_id")
    public String getProcessDefinitionId() {
        return processDefinitionId;
    }

    public void setProcessDefinitionId(String processDefinitionId) {
        this.processDefinitionId = processDefinitionId;
    }

    @Basic
    @Column(name = "process_instance_id")
    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public void setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
    }

    @Basic
    @Column(name = "flow_task_status")
    public Integer getFlowTaskStatus() {
        return flowTaskStatus;
    }

    public void setFlowTaskStatus(Integer flowTaskStatus) {
        this.flowTaskStatus = flowTaskStatus;
    }

    @Id
    @Column(name = "task_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getTaskId() {
        return taskId;
    }

    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    @Basic
    @Column(name = "target_task")
    public String getTargetTask() {
        return targetTask;
    }

    public void setTargetTask(String targetTask) {
        this.targetTask = targetTask;
    }

    @Basic
    @Column(name = "task_priority")
    public String getTaskPriority() {
        return taskPriority;
    }

    public void setTaskPriority(String taskPriority) {
        this.taskPriority = taskPriority;
    }

    @Basic
    @Column(name = "task_participant")
    public String getTaskParticipant() {
        return taskParticipant;
    }

    public void setTaskParticipant(String taskParticipant) {
        this.taskParticipant = taskParticipant;
    }

    @Basic
    @Column(name = "start_time")
    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    @Basic
    @Column(name = "end_time")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "create_date")
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "task_status")
    public String getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(String taskStatus) {
        this.taskStatus = taskStatus;
    }

    @Basic
    @Column(name = "task_creator")
    public String getTaskCreator() {
        return taskCreator;
    }

    public void setTaskCreator(String taskCreator) {
        this.taskCreator = taskCreator;
    }

    @Basic
    @Column(name = "task_index")
    public String getTaskIndex() {
        return taskIndex;
    }

    public void setTaskIndex(String taskIndex) {
        this.taskIndex = taskIndex;
    }

    @Basic
    @Column(name = "task_standard")
    public String getTaskStandard() {
        return taskStandard;
    }

    public void setTaskStandard(String taskStandard) {
        this.taskStandard = taskStandard;
    }

    @Basic
    @Column(name = "task_statements")
    public String getTaskStatements() {
        return taskStatements;
    }

    public void setTaskStatements(String taskStatements) {
        this.taskStatements = taskStatements;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TaskInfoEntity that = (TaskInfoEntity) o;
        return Objects.equals(taskId, that.taskId) && Objects.equals(targetTask, that.targetTask) && Objects.equals(taskPriority, that.taskPriority) && Objects.equals(taskParticipant, that.taskParticipant) && Objects.equals(startTime, that.startTime) && Objects.equals(endTime, that.endTime) && Objects.equals(taskStatus, that.taskStatus) && Objects.equals(taskCreator, that.taskCreator) && Objects.equals(taskIndex, that.taskIndex) && Objects.equals(taskStandard, that.taskStandard) && Objects.equals(taskStatements, that.taskStatements) && Objects.equals(projectId, that.projectId) && Objects.equals(createDate, that.createDate) && Objects.equals(processInstanceId, that.processInstanceId) && Objects.equals(flowTaskStatus, that.flowTaskStatus) && Objects.equals(processDefinitionId, that.processDefinitionId) && Objects.equals(isDelete, that.isDelete);
    }

    @Override
    public int hashCode() {
        return Objects.hash(taskId, targetTask, taskPriority, taskParticipant, startTime, endTime, taskStatus, taskCreator, taskIndex, taskStandard, taskStatements, projectId, createDate, processInstanceId, flowTaskStatus, processDefinitionId, isDelete);
    }

    @Basic
    @Column(name = "project_id")
    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }
}
