package com.genlot.nativesdk.model;

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

public class ReportItem implements Parcelable {
    public int mGameID;//游戏ID
    public int mSaleSize;//销售票数
    public int mCancelSize;//注销票数
    public int mCenterCancelSize;//中心注销票数
    public int mReverseSize;//冲正票数
    public int mActualSaleSize;//实销票数
    public int mCashSize;//兑奖票数
    public double mSaleMoney;//游戏销量金额
    public double mCancelMoney;//注销金额
    public double mCenterCancelMoney;//中心注销金额
    public double mReverseMoney;//冲正金额
    public double mActualSaleMoney;//实销金额
    public double mCashMoney;//兑奖金额
    public double mSalesCommission;//代销费
    public double mCashingBonus;//代兑费

    @Override
    public String toString() {
        return "ReportItem{" +
                "mGameID=" + mGameID +
                ", mSaleSize=" + mSaleSize +
                ", mCancelSize=" + mCancelSize +
                ", mCenterCancelSize=" + mCenterCancelSize +
                ", mReverseSize=" + mReverseSize +
                ", mActualSaleSize=" + mActualSaleSize +
                ", mCashSize=" + mCashSize +
                ", mSaleMoney=" + mSaleMoney +
                ", mCancelMoney=" + mCancelMoney +
                ", mCenterCancelMoney=" + mCenterCancelMoney +
                ", mReverseMoney=" + mReverseMoney +
                ", mActualSaleMoney=" + mActualSaleMoney +
                ", mCashMoney=" + mCashMoney +
                ", mSalesCommission=" + mSalesCommission +
                ", mCashingBonus=" + mCashingBonus +
                '}';
    }

    public static final Creator<ReportItem> CREATOR = new Creator<ReportItem>() {
        @Override
        public ReportItem createFromParcel(Parcel source) {
            ReportItem item = new ReportItem();
            item.mGameID = source.readInt();
            item.mSaleSize = source.readInt();
            item.mCancelSize = source.readInt();
            item.mCenterCancelSize = source.readInt();
            item.mReverseSize = source.readInt();
            item.mActualSaleSize = source.readInt();
            item.mCashSize = source.readInt();

            item.mSaleMoney = source.readDouble();
            item.mCancelMoney = source.readDouble();
            item.mCenterCancelMoney = source.readDouble();
            item.mReverseMoney = source.readDouble();
            item.mActualSaleMoney = source.readDouble();
            item.mCashMoney = source.readDouble();
            item.mSalesCommission = source.readDouble();
            item.mCashingBonus = source.readDouble();
            return item;
        }

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

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

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeInt(mGameID);
        parcel.writeInt(mSaleSize);
        parcel.writeInt(mCancelSize);
        parcel.writeInt(mCenterCancelSize);
        parcel.writeInt(mReverseSize);
        parcel.writeInt(mActualSaleSize);
        parcel.writeInt(mCashSize);

        parcel.writeDouble(mSaleMoney);
        parcel.writeDouble(mCancelMoney);
        parcel.writeDouble(mCenterCancelMoney);
        parcel.writeDouble(mReverseMoney);
        parcel.writeDouble(mActualSaleMoney);
        parcel.writeDouble(mCashMoney);
        parcel.writeDouble(mSalesCommission);
        parcel.writeDouble(mCashingBonus);
    }
}
