package com.rehome.sgbaxj.DBModel;

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

import org.litepal.crud.DataSupport;

/**
 * Created by ruihong on 2018/7/27.
 */

public class WjbrwinfoList extends DataSupport implements Parcelable {

    private int id;
    private String JHTITLE;
    private String FILEBAGTITLE;
    private String FILEBAGID;
    private boolean checked;//0:未选中,1:已选中
    private int download;//0:未下载,1:已经下载
    private WjbrwList wjbrwList;

    public int getId() {
        return id;
    }

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

    public String getJHTITLE() {
        return JHTITLE;
    }

    public void setJHTITLE(String JHTITLE) {
        this.JHTITLE = JHTITLE;
    }

    public String getFILEBAGTITLE() {
        return FILEBAGTITLE;
    }

    public void setFILEBAGTITLE(String FILEBAGTITLE) {
        this.FILEBAGTITLE = FILEBAGTITLE;
    }

    public String getFILEBAGID() {
        return FILEBAGID;
    }

    public void setFILEBAGID(String FILEBAGID) {
        this.FILEBAGID = FILEBAGID;
    }

    public boolean isChecked() {
        return checked;
    }

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

    public int getDownload() {
        return download;
    }

    public void setDownload(int download) {
        this.download = download;
    }

    public WjbrwList getWjbrwList() {
        return wjbrwList;
    }

    public void setWjbrwList(WjbrwList wjbrwList) {
        this.wjbrwList = wjbrwList;
    }


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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.JHTITLE);
        dest.writeString(this.FILEBAGTITLE);
        dest.writeString(this.FILEBAGID);
        dest.writeByte(this.checked ? (byte) 1 : (byte) 0);
        dest.writeInt(this.download);
        dest.writeParcelable(this.wjbrwList, flags);
    }

    public WjbrwinfoList() {
    }

    protected WjbrwinfoList(Parcel in) {
        this.id = in.readInt();
        this.JHTITLE = in.readString();
        this.FILEBAGTITLE = in.readString();
        this.FILEBAGID = in.readString();
        this.checked = in.readByte() != 0;
        this.download = in.readInt();
        this.wjbrwList = in.readParcelable(WjbrwList.class.getClassLoader());
    }

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

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