package com.fxy.detection.bean;

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

public class PartsBean implements Parcelable {
    private String parts_id="";
    private String parts_name="";
    private String url="";
    private Boolean checked = false;


    public PartsBean(){

    }


    protected PartsBean(Parcel in) {
        parts_id = in.readString();
        parts_name = in.readString();
        url = in.readString();
        byte tmpChecked = in.readByte();
        checked = tmpChecked == 0 ? null : tmpChecked == 1;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(parts_id);
        dest.writeString(parts_name);
        dest.writeString(url);
        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
    }

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

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

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

    public String getPartsId() {
        return parts_id;
    }

    public void setPartsId(String parts_id) {
        this.parts_id = parts_id;
    }

    public String getPartsName() {
        return parts_name;
    }

    public void setPartsName(String parts_name) {
        this.parts_name = parts_name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }
}
