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/26 16:05
 */
@Entity
@Table(name = "traffic_expense", schema = "ankaibei", catalog = "")
public class TrafficExpenseEntity {
    private Integer id;
    private String projectName;
    private String applicant;
    private String subject;
    private BigDecimal totalMoney;
    /**
     * 工作流任务处理类型
     */
    private Integer flowTaskStatus;
    /**
     * 记录的创建时间
     */
    private Date createTime;


    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

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

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

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

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

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

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

    @Basic
    @Column(name = "applicant")
    public String getApplicant() {
        return applicant;
    }

    public void setApplicant(String applicant) {
        this.applicant = applicant;
    }

    @Basic
    @Column(name = "subject")
    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    @Basic
    @Column(name = "total_money")
    public BigDecimal getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(BigDecimal totalMoney) {
        this.totalMoney = totalMoney;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TrafficExpenseEntity that = (TrafficExpenseEntity) o;
        return id == that.id && Objects.equals(projectName, that.projectName) && Objects.equals(applicant, that.applicant) && Objects.equals(subject, that.subject) && Objects.equals(totalMoney, that.totalMoney);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, projectName, applicant, subject, totalMoney);
    }
}
