package com.yxproject.start.entity;

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

/**
 * Created by zhangyusheng on 2018/11/16 10:51
 */
@Entity
@Table(name = "GROUP_NO", schema = "DAHAI")
public class GroupNoEntity {
    private long task_Id;
    private String group_No;
    private long vaild_Count;
    private long invalid_Count;
    private long special_Card_Count;

    @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;
    }
    @Id
    @Column(name = "GROUP_NO", nullable = false, length = 8)
    public String getGroup_No() {
        return group_No;
    }

    public void setGroup_No(String group_No) {
        this.group_No = group_No;
    }
    @Basic
    @Column(name = "VAILD_COUNT", nullable = false, precision = 0)
    public long getVaild_Count() {
        return vaild_Count;
    }

    public void setVaild_Count(long vaild_Count) {
        this.vaild_Count = vaild_Count;
    }
    @Basic
    @Column(name = "INVALID_COUNT", nullable = false, precision = 0)
    public long getInvalid_Count() {
        return invalid_Count;
    }

    public void setInvalid_Count(long invalid_Count) {
        this.invalid_Count = invalid_Count;
    }
    @Basic
    @Column(name = "SPECIAL_CARD_COUNT", nullable = false, precision = 0)
    public long getSpecial_Card_Count() {
        return special_Card_Count;
    }

    public void setSpecial_Card_Count(long special_Card_Count) {
        this.special_Card_Count = special_Card_Count;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) { return true;}
        if (o == null || getClass() != o.getClass()){ return false;}
        GroupNoEntity that = (GroupNoEntity) o;
        return vaild_Count == that.vaild_Count &&
                invalid_Count == that.invalid_Count &&
                special_Card_Count == that.special_Card_Count &&
                task_Id == that.task_Id &&
                Objects.equals(group_No, that.group_No);
    }

    @Override
    public int hashCode() {
        return Objects.hash( group_No, task_Id, vaild_Count, invalid_Count,special_Card_Count);
    }
}
