package com.fxy.hk.bean;

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

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

public class InboundBean implements Parcelable {
    public String pallet_code = "";
    public String ctn_code = "";
    public String ctn_qty = "";
    public List<RecordBean> list= new ArrayList<>();

    protected InboundBean(Parcel in) {
        pallet_code = in.readString();
        ctn_code = in.readString();
        ctn_qty = in.readString();
        list = in.createTypedArrayList(RecordBean.CREATOR);
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(pallet_code);
        dest.writeString(ctn_code);
        dest.writeString(ctn_qty);
        dest.writeTypedList(list);
    }

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

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

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

    public String getPalletCode() {
        return pallet_code;
    }

    public InboundBean(){

    }

    public String getCtnCode() {
        return ctn_code;
    }

    public InboundBean setCtnCode() {
        return this;
    }

    @Override
    public String toString() {
        return "InboundBean{" +
                "pallet_code='" + pallet_code + '\'' +
                ", ctn_code='" + ctn_code + '\'' +
                ", ctn_qty='" + ctn_qty + '\'' +
                '}';
    }

    public String getCtnQty() {
        return ctn_qty;
    }

    public List<RecordBean> getList() {
        return list;
    }

    public InboundBean setList(List<RecordBean> list) {
        this.list = list;
        return this;
    }
}
