package com.phlx.wool.entity;


import android.os.Parcel;
import android.os.Parcelable;

import androidx.databinding.BaseObservable;

import com.google.gson.annotations.SerializedName;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Generated;

/**
 * 行政区划对象 zs_divisions
 *
 * @author phlx
 * @date 2019-12-24
 */
@Entity
public class DivisionEntity extends BaseObservable implements Parcelable {

    /**
     * $column.columnComment
     */
    @Id(autoincrement = false)
    private Long id;

    /**
     * 代码
     */
    private String code;

    /**
     * 名称
     */
    private String name;

    /**
     * 父级
     */
    private String parentCode;

    /**
     * 排序号
     */
    private String sortcode;

    /**
     * 时间戳
     */
    private String inputTime;

    /**
     * 0正常  1更新  2删除
     */
    private String status;

    /**
     * 打标牧户数
     */
    private String PasCount;

    /**
     * 各旗打标牧户数
     */
    private String CityCount;

    /**
     * 各镇打标牧户数
     */
    private String TownsCount;

    /**
     * 各村打标牧户数
     */
    private String PasVillageCount;

    /**
     * 时间
     */
    private String year;

    public DivisionEntity() {
    }

    protected DivisionEntity(Parcel in) {
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readLong();
        }
        code = in.readString();
        name = in.readString();
        parentCode = in.readString();
        sortcode = in.readString();
        inputTime = in.readString();
        status = in.readString();
        PasCount = in.readString();
        CityCount = in.readString();
        TownsCount = in.readString();
        PasVillageCount = in.readString();
        year = in.readString();
    }

    @Generated(hash = 1743104085)
    public DivisionEntity(Long id, String code, String name, String parentCode,
            String sortcode, String inputTime, String status, String PasCount,
            String CityCount, String TownsCount, String PasVillageCount, String year) {
        this.id = id;
        this.code = code;
        this.name = name;
        this.parentCode = parentCode;
        this.sortcode = sortcode;
        this.inputTime = inputTime;
        this.status = status;
        this.PasCount = PasCount;
        this.CityCount = CityCount;
        this.TownsCount = TownsCount;
        this.PasVillageCount = PasVillageCount;
        this.year = year;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (id == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(id);
        }
        dest.writeString(code);
        dest.writeString(name);
        dest.writeString(parentCode);
        dest.writeString(sortcode);
        dest.writeString(inputTime);
        dest.writeString(status);
        dest.writeString(PasCount);
        dest.writeString(CityCount);
        dest.writeString(TownsCount);
        dest.writeString(PasVillageCount);
        dest.writeString(year);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DivisionEntity> CREATOR = new Creator<DivisionEntity>() {
        @Override
        public DivisionEntity createFromParcel(Parcel in) {
            return new DivisionEntity(in);
        }

        @Override
        public DivisionEntity[] newArray(int size) {
            return new DivisionEntity[size];
        }
    };

    public Long getId() {
        return id;
    }

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

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

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

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public String getSortcode() {
        return sortcode;
    }

    public void setSortcode(String sortcode) {
        this.sortcode = sortcode;
    }

    public String getInputTime() {
        return inputTime;
    }

    public void setInputTime(String inputTime) {
        this.inputTime = inputTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getPasCount() {
        return PasCount;
    }

    public void setPasCount(String pasCount) {
        PasCount = pasCount;
    }

    public String getCityCount() {
        return CityCount;
    }

    public void setCityCount(String cityCount) {
        CityCount = cityCount;
    }

    public String getTownsCount() {
        return TownsCount;
    }

    public void setTownsCount(String townsCount) {
        TownsCount = townsCount;
    }

    public String getPasVillageCount() {
        return PasVillageCount;
    }

    public void setPasVillageCount(String pasVillageCount) {
        PasVillageCount = pasVillageCount;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    @Override
    public String toString() {
        return "DivisionEntity{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", name='" + name + '\'' +
                ", parentCode='" + parentCode + '\'' +
                ", sortcode='" + sortcode + '\'' +
                ", inputTime='" + inputTime + '\'' +
                ", status='" + status + '\'' +
                ", PasCount='" + PasCount + '\'' +
                ", CityCount='" + CityCount + '\'' +
                ", TownsCount='" + TownsCount + '\'' +
                ", PasVillageCount='" + PasVillageCount + '\'' +
                ", year='" + year + '\'' +
                '}';
    }
}
