package com.fxy.fms.putIn.bean;

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

public class InboundBean implements Parcelable {
    //{"order_number":"GL032400001","customer_name":"美国客户","product_name":"换号服务专用产品","domestic_wms_location":"","receive_country":"","forecast_pieces":""}
    private String order_number = ""; // 入库订单编号
    private String customer_name = ""; // 用户名称
    private String customer_code = ""; // 用户名称
    private String receive_country = ""; //收件人国家
    private String product_name = ""; //物流产品
    private Integer forecast_pieces = 0; //预报数量
    private String domestic_wms_location = "";

    protected InboundBean(Parcel in) {
        order_number = in.readString();
        customer_name = in.readString();
        customer_code = in.readString();
        receive_country = in.readString();
        product_name = in.readString();
        if (in.readByte() == 0) {
            forecast_pieces = null;
        } else {
            forecast_pieces = in.readInt();
        }
        domestic_wms_location = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(order_number);
        dest.writeString(customer_name);
        dest.writeString(customer_code);
        dest.writeString(receive_country);
        dest.writeString(product_name);
        if (forecast_pieces == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeInt(forecast_pieces);
        }
        dest.writeString(domestic_wms_location);
    }

    public InboundBean() {
    }
    @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 getInboundNumber() {return order_number; }
    public String getCustomerName() {return customer_name; }
    public String getCustomerCode() {return customer_code; }
    public String getReceiverCountry() {return receive_country; }
    public String getProductName() {return product_name; }
    public Integer getForecastPieces() {return forecast_pieces; }
    public String getLocationNumber() {return domestic_wms_location; }
}
