package com.yxproject.start.entity;

import javax.persistence.*;

@Entity
@Table(name = "COUNTY_DIC", schema = "POST", catalog = "")
public class CountyDicEntity {
    private String countyCode;
    private String countyname;
    private String administrativeCode;
    private String yingxin;

    @Id
    @Column(name = "COUNTY_CODE")
    public String getCountyCode() {
        return countyCode;
    }

    public void setCountyCode(String countyCode) {
        this.countyCode = countyCode;
    }

    @Basic
    @Column(name = "COUNTYNAME")
    public String getCountyname() {
        return countyname;
    }

    public void setCountyname(String countyname) {
        this.countyname = countyname;
    }

    @Basic
    @Column(name = "ADMINISTRATIVE_CODE")
    public String getAdministrativeCode() {
        return administrativeCode;
    }

    public void setAdministrativeCode(String administrativeCode) {
        this.administrativeCode = administrativeCode;
    }

    @Basic
    @Column(name = "YINGXIN")
    public String getYingxin() {
        return yingxin;
    }

    public void setYingxin(String yingxin) {
        this.yingxin = yingxin;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CountyDicEntity that = (CountyDicEntity) o;

        if (countyCode != null ? !countyCode.equals(that.countyCode) : that.countyCode != null) return false;
        if (countyname != null ? !countyname.equals(that.countyname) : that.countyname != null) return false;
        if (administrativeCode != null ? !administrativeCode.equals(that.administrativeCode) : that.administrativeCode != null)
            return false;
        if (yingxin != null ? !yingxin.equals(that.yingxin) : that.yingxin != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = countyCode != null ? countyCode.hashCode() : 0;
        result = 31 * result + (countyname != null ? countyname.hashCode() : 0);
        result = 31 * result + (administrativeCode != null ? administrativeCode.hashCode() : 0);
        result = 31 * result + (yingxin != null ? yingxin.hashCode() : 0);
        return result;
    }
}
