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 = "CARD_BODY", schema = "DAHAI")
public class CardBodyEntity {

    private long card_Body_Id;
    private Date save_Date;
    private long card_Type_Id;
    private long is_Active;
    private long task_Id;
    private long total_Count;
    @Id
    @Column(name = "CARD_BODY_ID", nullable = false, precision = 0)
    public long getCard_Body_Id() {
        return card_Body_Id;
    }

    public void setCard_Body_Id(long card_Body_Id) {
        this.card_Body_Id = card_Body_Id;
    }

    @Basic
    @Column(name = "SAVE_DATE", nullable = false)
    public Date getSave_Date() {
        return save_Date;
    }

    public void setSave_Date(Date save_Date) {
        this.save_Date = save_Date;
    }

    @Basic
    @Column(name = "CARD_TYPE_ID", nullable = false, precision = 0)
    public long getCard_Type_Id() {
        return card_Type_Id;
    }

    public void setCard_Type_Id(long card_Type_Id) {
        this.card_Type_Id = card_Type_Id;
    }

    @Basic
    @Column(name = "IS_ACTIVE", nullable = false, precision = 0)
    public long getIs_Active() {
        return is_Active;
    }

    public void setIs_Active(long is_Active) {
        this.is_Active = is_Active;
    }
    @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 = "TOTAL_COUNT", nullable = false, precision = 0)
    public long getTotal_Count() {
        return total_Count;
    }

    public void setTotal_Count(long total_Count) {
        this.total_Count = total_Count;
    }




    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CardBodyEntity that = (CardBodyEntity) o;
        return card_Body_Id == that.card_Body_Id &&
                card_Type_Id == that.card_Type_Id &&
                is_Active == that.is_Active &&
                task_Id == that.task_Id &&
                total_Count == that.total_Count &&
                Objects.equals(save_Date, that.save_Date);
    }

    @Override
    public int hashCode() {
        return Objects.hash(card_Body_Id, card_Type_Id, is_Active, task_Id,total_Count,save_Date);
    }
}
