package com.fxy.bean;

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

/**
 * 数据字典对象
 * @author James.Jiang
 * @date 2020-01-13
 */
public class DictDataBean implements Parcelable {

    private Integer key;

    private String code;

    private String name;

    private String description;

  @Override
    public String toString() {
        return "DictDataBean{" +
                "key=" + key +
                "code=" + code +
                ", name=" + name +
                ", description=" + description +
                '}';
    }

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.key);
        dest.writeString(this.code);
        dest.writeString(this.name);
        dest.writeString(this.description);
    }

    public DictDataBean() {

    }
    public DictDataBean(String code,String name,String description) {
        this.code = code;
        this.name = name;
        this.description = description;
    }
    public DictDataBean(String code,String name) {
        this.code = code;
        this.name = name;
    }

    public DictDataBean(Integer key,String name) {
        this.key = key;
        this.name = name;
    }
    protected DictDataBean(Parcel in) {
        this.key = in.readInt();
        this.code = in.readString();
        this.name = in.readString();
    }

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

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

    public String getCode() {
        return code;
    }

    public Integer getKey() {
        return key;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

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

    public String getName() {
        return name;
    }

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