TheatreRequest.java 1.18 KB
package com.cnlive.goldenline.model.request;

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

/**
 * Created by Sivin on 2017/4/1.
 */

public class TheatreRequest implements Parcelable{

    int theatreId;
    int type;
    String userId;

    public TheatreRequest() {
    }

    public TheatreRequest(int theatreId,int type,String userId) {
        this.theatreId = theatreId;
        this.type = type;
        this.userId = userId;
    }

    protected TheatreRequest(Parcel in) {
        theatreId = in.readInt();
        type = in.readInt();
        userId = in.readString();
    }

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

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

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

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(theatreId);
        dest.writeInt(type);
        dest.writeString(userId);
    }
}