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 = "travel_expense", schema = "ankaibei", catalog = "")
public class TravelExpenseEntity {
    //主键id
    private Integer id;
    //项目名称
    private String projectName;
    //申请人/提交人
    private String applicant;
    //开始时间
    private Date beginTime;
    //结束时间
    private Date endTime;
    //出发地点
    private String startSite;
    //目的地
    private String endSite;
    //交通类型和费用的主体信息包含（交通工具，金额，同行人员，备注）
    private String subject;
    //住宿费
    private BigDecimal accommodationFee;
    //住宿天数
    private Integer accommodationDays;
    //合计费用（住宿）
    private BigDecimal totalFee;
    //备注（住宿）
    private String accommodationRemark;
    //住宿人员
    private String accommodationPerson;
    //餐饮金额
    private BigDecimal repastFee;
    //备注（餐饮）
    private String repastRemark;
    //用餐人员
    private String repastPerson;
    //此次记录的总费用
    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 = "begin_time")
    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

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

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

    @Basic
    @Column(name = "start_site")
    public String getStartSite() {
        return startSite;
    }

    public void setStartSite(String startSite) {
        this.startSite = startSite;
    }

    @Basic
    @Column(name = "end_site")
    public String getEndSite() {
        return endSite;
    }

    public void setEndSite(String endSite) {
        this.endSite = endSite;
    }

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

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

    @Basic
    @Column(name = "accommodation_fee")
    public BigDecimal getAccommodationFee() {
        return accommodationFee;
    }

    public void setAccommodationFee(BigDecimal accommodationFee) {
        this.accommodationFee = accommodationFee;
    }

    @Basic
    @Column(name = "accommodation_days")
    public Integer getAccommodationDays() {
        return accommodationDays;
    }

    public void setAccommodationDays(Integer accommodationDays) {
        this.accommodationDays = accommodationDays;
    }

    @Basic
    @Column(name = "total_fee")
    public BigDecimal getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(BigDecimal totalFee) {
        this.totalFee = totalFee;
    }

    @Basic
    @Column(name = "accommodation_remark")
    public String getAccommodationRemark() {
        return accommodationRemark;
    }

    public void setAccommodationRemark(String accommodationRemark) {
        this.accommodationRemark = accommodationRemark;
    }

    @Basic
    @Column(name = "accommodation_person")
    public String getAccommodationPerson() {
        return accommodationPerson;
    }

    public void setAccommodationPerson(String accommodationPerson) {
        this.accommodationPerson = accommodationPerson;
    }

    @Basic
    @Column(name = "repast_fee")
    public BigDecimal getRepastFee() {
        return repastFee;
    }

    public void setRepastFee(BigDecimal repastFee) {
        this.repastFee = repastFee;
    }

    @Basic
    @Column(name = "repast_remark")
    public String getRepastRemark() {
        return repastRemark;
    }

    public void setRepastRemark(String repastRemark) {
        this.repastRemark = repastRemark;
    }

    @Basic
    @Column(name = "repast_person")
    public String getRepastPerson() {
        return repastPerson;
    }

    public void setRepastPerson(String repastPerson) {
        this.repastPerson = repastPerson;
    }

    @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;
        TravelExpenseEntity that = (TravelExpenseEntity) o;
        return id == that.id && Objects.equals(projectName, that.projectName) && Objects.equals(applicant, that.applicant) && Objects.equals(beginTime, that.beginTime) && Objects.equals(endTime, that.endTime) && Objects.equals(startSite, that.startSite) && Objects.equals(endSite, that.endSite) && Objects.equals(subject, that.subject) && Objects.equals(accommodationFee, that.accommodationFee) && Objects.equals(accommodationDays, that.accommodationDays) && Objects.equals(totalFee, that.totalFee) && Objects.equals(accommodationRemark, that.accommodationRemark) && Objects.equals(accommodationPerson, that.accommodationPerson) && Objects.equals(repastFee, that.repastFee) && Objects.equals(repastRemark, that.repastRemark) && Objects.equals(repastPerson, that.repastPerson) && Objects.equals(totalMoney, that.totalMoney);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, projectName, applicant, beginTime, endTime, startSite, endSite, subject, accommodationFee, accommodationDays, totalFee, accommodationRemark, accommodationPerson, repastFee, repastRemark, repastPerson, totalMoney);
    }
}
