package com.dgt.graphdemo.jpa.entity;

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

/**
 * @author lugela
 * @Title: BasicClaimnoEntity
 * @ProjectName graphdemo
 * @Description: TODO
 * @date 2019/6/24 12:23
 * 基本信息表
 */
@Entity
@Table(name = "basic_claimno", schema = "graphtb", catalog = "")
public class BasicClaimnoEntity {
    private int id;
    private String claimno;
    private String name;
    private String sex;
    private Integer age;
    private String claimnAcc;
    private Date accdate;
    private Date recdate;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "claimno", nullable = true, length = 18)
    public String getClaimno() {
        return claimno;
    }

    public void setClaimno(String claimno) {
        this.claimno = claimno;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 100)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "sex", nullable = true, length = 100)
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "age", nullable = true)
    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Basic
    @Column(name = "claimn_acc", nullable = true, length = 100)
    public String getClaimnAcc() {
        return claimnAcc;
    }

    public void setClaimnAcc(String claimnAcc) {
        this.claimnAcc = claimnAcc;
    }

    @Basic
    @Column(name = "accdate", nullable = true)
    public Date getAccdate() {
        return accdate;
    }

    public void setAccdate(Date accdate) {
        this.accdate = accdate;
    }

    @Basic
    @Column(name = "recdate", nullable = true)
    public Date getRecdate() {
        return recdate;
    }

    public void setRecdate(Date recdate) {
        this.recdate = recdate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BasicClaimnoEntity that = (BasicClaimnoEntity) o;
        return id == that.id &&
                Objects.equals(claimno, that.claimno) &&
                Objects.equals(name, that.name) &&
                Objects.equals(sex, that.sex) &&
                Objects.equals(age, that.age) &&
                Objects.equals(claimnAcc, that.claimnAcc) &&
                Objects.equals(accdate, that.accdate) &&
                Objects.equals(recdate, that.recdate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, claimno, name, sex, age, claimnAcc, accdate, recdate);
    }
}
