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

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

/**
 * @author
 * @version 1.0
 * @description:
 * @date 2022/10/12 9:25
 */
@Entity
@Table(name = "cost_info", schema = "ankaibei", catalog = "")
public class CostInfoEntity {
    private Integer costId;
    private String costType;
    private String costStatus;
    private String relevanceUser;
    private BigDecimal performAmount;
    private Date happenDate;
    private String projectName;
    private String proposer;
    private Date paymentDate;
    private Integer applyCostId;
    private Date createDate;

    /**
     * 进入流程后获取到的流程实例的id
     */
    private String processInstanceId;

    /**
     * 工作流任务处理状态
     */
    private Integer flowTaskStatus;
    /**
     * 流程定义Id
     */
    private String processDefinitionId;

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

    public void setCostId(Integer costId) {
        this.costId = costId;
    }

    @Basic
    @Column(name = "cost_type")
    public String getCostType() {
        return costType;
    }

    public void setCostType(String costType) {
        this.costType = costType;
    }

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

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


    @Basic
    @Column(name = "cost_status")
    public String getCostStatus() {
        return costStatus;
    }

    public void setCostStatus(String costStatus) {
        this.costStatus = costStatus;
    }

    @Basic
    @Column(name = "relevance_user")
    public String getRelevanceUser() {
        return relevanceUser;
    }

    public void setRelevanceUser(String relevanceUser) {
        this.relevanceUser = relevanceUser;
    }

    @Basic
    @Column(name = "perform_amount")
    public BigDecimal getPerformAmount() {
        return performAmount;
    }

    public void setPerformAmount(BigDecimal performAmount) {
        this.performAmount = performAmount;
    }

    @Basic
    @Column(name = "happen_date")
    public Date getHappenDate() {
        return happenDate;
    }

    public void setHappenDate(Date happenDate) {
        this.happenDate = happenDate;
    }

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

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

    @Basic
    @Column(name = "proposer")
    public String getProposer() {
        return proposer;
    }

    public void setProposer(String proposer) {
        this.proposer = proposer;
    }

    @Basic
    @Column(name = "payment_date")
    public Date getPaymentDate() {
        return paymentDate;
    }

    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }

    @Basic
    @Column(name = "apply_cost_id")
    public Integer getApplyCostId() {
        return applyCostId;
    }

    public void setApplyCostId(Integer applyCostId) {
        this.applyCostId = applyCostId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        CostInfoEntity that = (CostInfoEntity) o;
        return costId.equals(that.costId) && Objects.equals(costType, that.costType) && Objects.equals(costStatus, that.costStatus) && Objects.equals(relevanceUser, that.relevanceUser) && Objects.equals(performAmount, that.performAmount) && Objects.equals(happenDate, that.happenDate) && Objects.equals(projectName, that.projectName) && Objects.equals(proposer, that.proposer) && Objects.equals(paymentDate, that.paymentDate) && Objects.equals(applyCostId, that.applyCostId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(costId, costType, costStatus, relevanceUser, performAmount, happenDate, projectName, proposer, paymentDate, applyCostId);
    }
}
