package com.genlot.nativesdk.model;


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

import java.util.ArrayList;

public class ReportData implements Parcelable {
    public String mPayment;//应缴款
    public String mHadPaid;//已缴款
    public String mArrearage;//欠缴款
    public String mBalance;//余额
    public String mCredit;//余额下限
    public String mBaseCommFee;//基本通信费
    public String mSaleCommFee;//销售通信费
    public String mRetrieveAmount;//注销补偿款
    public String mOtherIncomeMoney;//其它发放款
    public String mOtherOutgoMoney;//其它缴费
    public ArrayList<ReportItem> mReportItem = new ArrayList<>();

    public static final Creator<ReportData> CREATOR = new Creator<ReportData>() {
        @Override
        public ReportData createFromParcel(Parcel source) {
            ReportData data = new ReportData();
            data.mPayment = source.readString();
            data.mHadPaid = source.readString();
            data.mArrearage = source.readString();
            data.mBalance = source.readString();
            data.mCredit = source.readString();
            data.mBaseCommFee = source.readString();
            data.mSaleCommFee = source.readString();
            data.mRetrieveAmount = source.readString();
            source.readTypedList(data.mReportItem, ReportItem.CREATOR);
            return data;
        }

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

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

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeString(mPayment);
        parcel.writeString(mHadPaid);
        parcel.writeString(mArrearage);
        parcel.writeString(mBalance);
        parcel.writeString(mCredit);
        parcel.writeString(mBaseCommFee);
        parcel.writeString(mSaleCommFee);
        parcel.writeString(mRetrieveAmount);
        parcel.writeTypedList(mReportItem);
    }

}
