package com.yxproject.start.entity;

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

/**
 * Created by zhangyusheng on 2018/11/16 10:51
 */
@Entity
@Table(name = "FAILED_CARD", schema = "DAHAI")
public class FailedCardEntity {
    private long failed_Card_Id;
    private long failed_Card_Reason_Id;
    private String accept_No;
    private long task_Id;
    private Date position_Date;
    private Date finish_Date;
    private Date allot_Date;
    private Date print_Date;
    private long state;
    @Id
    @Column(name = "FAILED_CARD_ID", nullable = false, precision = 0)
    public long getFailed_Card_Id() {
        return failed_Card_Id;
    }

    public void setFailed_Card_Id(long failed_Card_Id) {
        this.failed_Card_Id = failed_Card_Id;
    }

    @Basic
    @Column(name = "FAILED_CARD_REASON_ID", nullable = true, precision = 0)
    public long getFailed_Card_Reason_Id() {
        return failed_Card_Reason_Id;
    }

    public void setFailed_Card_Reason_Id(long failed_Card_Reason_Id) {
        this.failed_Card_Reason_Id = failed_Card_Reason_Id;
    }

    @Basic
    @Column(name = "ACCEPT_NO", nullable = true, length = 20)
    public String getAccept_No() {
        return accept_No;
    }

    public void setAccept_No(String accept_No) {
        this.accept_No = accept_No;
    }
    @Basic
    @Column(name = "TASK_ID", nullable = false, precision = 0)
    public long getTask_Id() {
        return task_Id;
    }

    public void setTask_Id(long task_Id) {
        this.task_Id = task_Id;
    }

    @Basic
    @Column(name = "POSITION_DATE", nullable = true, length = 20)
    public Date getPosition_Date() {
        return position_Date;
    }

    public void setPosition_Date(Date position_Date) {
        this.position_Date = position_Date;
    }
    @Basic
    @Column(name = "FINISH_DATE", nullable = true, length = 20)
    public Date getFinish_Date() {
        return finish_Date;
    }

    public void setFinish_Date(Date finish_Date) {
        this.finish_Date = finish_Date;
    }
    @Basic
    @Column(name = "ALLOT_DATE", nullable = true, length = 20)
    public Date getAllot_Date() {
        return allot_Date;
    }




    public void setAllot_Date(Date allot_Date) {
        this.allot_Date = allot_Date;
    }
    @Basic
    @Column(name = "PRINT_DATE", nullable = true, length = 20)
    public Date getPrint_Date() {
        return print_Date;
    }
    public void setPrint_Date(Date print_Date) {
        this.print_Date = print_Date;
    }




    @Basic
    @Column(name = "STATE", nullable = false, precision = 0)
    public long getState() {
        return state;
    }

    public void setState(long state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FailedCardEntity that = (FailedCardEntity) o;
        return Objects.equals(failed_Card_Id, that.failed_Card_Id) &&
                Objects.equals(failed_Card_Reason_Id, that.failed_Card_Reason_Id) &&
                Objects.equals(accept_No, that.accept_No) &&
                Objects.equals(task_Id, that.task_Id) &&
                Objects.equals(position_Date, that.position_Date) &&
                Objects.equals(allot_Date, that.allot_Date) &&
                Objects.equals(print_Date, that.print_Date) &&
                Objects.equals(state, that.state) &&
                Objects.equals(finish_Date, that.finish_Date);

    }

    @Override
    public int hashCode() {
        return Objects.hash(failed_Card_Id, failed_Card_Reason_Id, accept_No, task_Id, position_Date, finish_Date, allot_Date, print_Date, state);
    }

}
