package com.fxy.bean;

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

import com.fxy.bean.realm.CargoBaseModel;

import java.util.List;

/**
 * 项目名称：FingerStorage
 * 类描述：
 * 创建人：admin
 * 创建时间：2018/5/22 14:00
 * 修改人：COMP-021-2006
 * 修改时间：2018/5/22 14:00
 * 修改备注：
 */
public class BaseDataBean implements Parcelable {
    public long version;
    public List<CargoBaseModel> cargoDataList;

    @Override
    public String toString() {
        return "BaseDataBean{" +
                "version=" + version +
                ", cargoDataList=" + cargoDataList +
                '}';
    }


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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(this.version);
        dest.writeTypedList(this.cargoDataList);
    }

    public BaseDataBean() {
    }

    protected BaseDataBean(Parcel in) {
        this.version = in.readLong();
        this.cargoDataList = in.createTypedArrayList(CargoBaseModel.CREATOR);
    }

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

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