package com.genlot.nativesdk.model;

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

public class GameRuntimeAttr implements Parcelable {
    public String mGameName;//游戏名称
    public byte mIsValid;//游戏有效性
    public byte mIsAllowSale;//游戏销售权限
    public byte mIsAllowCash;//游戏兑奖权限
    public byte mIsAllowCancel;//游戏注销权限
    public int mGameID;//游戏ID
    public long mGameIssue;//游戏期号
    public long mDrawTime;//游戏开奖时间
    public long mSaleSTime;//游戏开始销售时间
    public long mSaleETime;//游戏结束销售时间
    public long mGameSN;//游戏当前流水号
    public String mIssueDate;//新期数据

    public GameRuntimeAttr() {
    }

    public static final Creator<GameRuntimeAttr> CREATOR = new Creator<GameRuntimeAttr>() {
        @Override
        public GameRuntimeAttr createFromParcel(Parcel source) {
            GameRuntimeAttr attr = new GameRuntimeAttr();
            attr.mGameName = source.readString();
            attr.mIsValid = source.readByte();
            attr.mIsAllowSale = source.readByte();
            attr.mIsAllowCash = source.readByte();
            attr.mIsAllowCancel = source.readByte();
            attr.mGameID = source.readInt();
            attr.mGameIssue = source.readLong();
            attr.mDrawTime = source.readLong();
            attr.mSaleSTime = source.readLong();
            attr.mSaleETime = source.readLong();
            attr.mGameSN = source.readLong();
            attr.mIssueDate = source.readString();
            return attr;
        }

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

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

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeString(mGameName);
        parcel.writeByte(mIsValid);
        parcel.writeByte(mIsAllowSale);
        parcel.writeByte(mIsAllowCash);
        parcel.writeByte(mIsAllowCancel);
        parcel.writeInt(mGameID);
        parcel.writeLong(mGameIssue);
        parcel.writeLong(mDrawTime);
        parcel.writeLong(mSaleSTime);
        parcel.writeLong(mSaleETime);
        parcel.writeLong(mGameSN);
        parcel.writeString(mIssueDate);
    }

    @Override
    public String toString() {
        return "GameRuntimeAttr{" +
                "mGameName='" + mGameName + '\'' +
                ", mIsValid=" + mIsValid +
                ", mIsAllowSale=" + mIsAllowSale +
                ", mIsAllowCash=" + mIsAllowCash +
                ", mIsAllowCancel=" + mIsAllowCancel +
                ", mGameID=" + mGameID +
                ", mGameIssue=" + mGameIssue +
                ", mDrawTime=" + mDrawTime +
                ", mSaleSTime=" + mSaleSTime +
                ", mSaleETime=" + mSaleETime +
                ", mGameSN=" + mGameSN +
                ", mIssueDate='" + mIssueDate + '\'' +
                '}';
    }
}
