package com.rehome.sgbaxj.DBModel;

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

import org.litepal.crud.DataSupport;

import java.util.ArrayList;
import java.util.List;

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

public class WjbList extends DataSupport implements Parcelable {
    private long id;
    private String bagid;
    private String title;
    private String keywords;
    private List<WjbzjdList>zjd;

    public long getId() {
        return id;
    }

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

    public String getBagid() {
        return bagid;
    }

    public void setBagid(String bagid) {
        this.bagid = bagid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public List<WjbzjdList> getZjd() {
        return zjd;
    }

    public void setZjd(List<WjbzjdList> zjd) {
        this.zjd = zjd;
    }


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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.id);
        dest.writeString(this.bagid);
        dest.writeString(this.title);
        dest.writeString(this.keywords);
        dest.writeList(this.zjd);
    }

    public WjbList() {
    }

    protected WjbList(Parcel in) {
        this.id = in.readLong();
        this.bagid = in.readString();
        this.title = in.readString();
        this.keywords = in.readString();
        this.zjd = new ArrayList<WjbzjdList>();
        in.readList(this.zjd, WjbzjdList.class.getClassLoader());
    }

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

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