package com.yxproject.start.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * Created by zhangyusheng on 2018/11/19 10:43
 */
@Entity
@Table(name = "SPECIAL_CARD", schema = "DAHAI")
public class SpecialCardEntity {
    private long special_Card_Id;
    private String accept_No;
    private long task_Id;
    private long special_Type;
    private String group_No;

    @Id
    @Column(name = "SPECIAL_CARD_ID", nullable = false, precision = 0)
    public long getSpecial_Card_Id() {
        return special_Card_Id;
    }

    public void setSpecial_Card_Id(long special_Card_Id) {
        this.special_Card_Id = special_Card_Id;
    }

    @Basic
    @Column(name = "ACCEPT_NO", nullable = false, length = 10)
    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 = "SPECIAL_TYPE", nullable = false, precision = 0)
    public long getSpecial_Type() {
        return special_Type;
    }

    public void setSpecial_Type(long special_Type) {
        this.special_Type = special_Type;
    }

    @Basic
    @Column(name = "GROUP_NO", nullable = false, length = 10)
    public String getGroup_No() {
        return group_No;
    }

    public void setGroup_No(String group_No) {
        this.group_No = group_No;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SpecialCardEntity that = (SpecialCardEntity) o;
        return special_Card_Id == that.special_Card_Id &&
                special_Type == that.special_Type &&
                task_Id == that.task_Id &&
                Objects.equals(accept_No, that.accept_No)&&
                Objects.equals(group_No, that.group_No);
    }

    @Override
    public int hashCode() {
        return Objects.hash(special_Card_Id, accept_No,task_Id,group_No, special_Type);
    }
}
