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

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

/**
 * @author
 * @version 1.0
 * @description:工时管理表
 * @date 2022/9/21 14:28
 */
@Entity
@Table(name = "man_hour_info", schema = "ankaibei", catalog = "")
public class ManHourInfoEntity {
    private Integer manId;
    /**
     * 项目成员
     */
    private String projectUser;

    /**
     * 项目名称
     */
    private String projectName;

    /**
     * 总工时(天)
     */
    private BigDecimal manHour;

    /**
     * 创建日期
     */
    private Date createDate;
    /**
     * 创建用户
     */
    private String createUser;
    /**
     * 结束日期
     */
    private Date endDate;


    /**
     * 进入流程后获取到的流程实例的id
     */
    private String processInstanceId;
    /**
     * 工作流任务处理状态
     */
    private Integer flowTaskStatus;
    /**
     * 流程定义Id
     */
    private String processDefinitionId;
    /**
     * 记录的创建时间
     */
    private Date createTime;

    /**
     * 是否已删除： 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 = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @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 = "man_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getManId() {
        return manId;
    }

    public void setManId(Integer manId) {
        this.manId = manId;
    }

    @Basic
    @Column(name = "project_user")
    public String getProjectUser() {
        return projectUser;
    }

    public void setProjectUser(String projectUser) {
        this.projectUser = projectUser;
    }

    @Basic
    @Column(name = "project_name")
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }


    @Basic
    @Column(name = "man_hour")
    public BigDecimal getManHour() {
        return manHour;
    }

    public void setManHour(BigDecimal manHour) {
        this.manHour = manHour;
    }

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

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

    @Basic
    @Column(name = "create_user")
    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    @Basic
    @Column(name = "end_date")
    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ManHourInfoEntity that = (ManHourInfoEntity) o;
        return Objects.equals(manId, that.manId) && Objects.equals(projectUser, that.projectUser) && Objects.equals(projectName, that.projectName) && Objects.equals(manHour, that.manHour) && Objects.equals(createDate, that.createDate) && Objects.equals(createUser, that.createUser) && Objects.equals(endDate, that.endDate) && Objects.equals(processInstanceId, that.processInstanceId) && Objects.equals(flowTaskStatus, that.flowTaskStatus) && Objects.equals(processDefinitionId, that.processDefinitionId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(manId, projectUser, projectName, manHour, createDate, createUser, endDate, processInstanceId, flowTaskStatus, processDefinitionId);
    }

}
