package com.swago.baseswago.model.pay;

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

/**
 * @date 2021/11/8 20:08
 * description:
 */
public class PayModel implements Parcelable {

    public PayModel() {
    }

    private String id;
    private String product_name;
    private String product_price;
    private String product_coins;
    private String google_product_id;
    private String originalJson;
    private boolean isSelected;

    protected PayModel(Parcel in) {
        id = in.readString();
        product_name = in.readString();
        product_price = in.readString();
        product_coins = in.readString();
        google_product_id = in.readString();
        originalJson = in.readString();
        isSelected = in.readByte() != 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(product_name);
        dest.writeString(product_price);
        dest.writeString(product_coins);
        dest.writeString(google_product_id);
        dest.writeString(originalJson);
        dest.writeByte((byte) (isSelected ? 1 : 0));
    }

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

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

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

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProduct_name() {
        return product_name;
    }

    public void setProduct_name(String product_name) {
        this.product_name = product_name;
    }

    public String getProduct_price() {
        return product_price;
    }

    public void setProduct_price(String product_price) {
        this.product_price = product_price;
    }

    public String getProduct_coins() {
        return product_coins;
    }

    public void setProduct_coins(String product_coins) {
        this.product_coins = product_coins;
    }

    public String getGoogle_product_id() {
        return google_product_id;
    }

    public void setGoogle_product_id(String google_product_id) {
        this.google_product_id = google_product_id;
    }

    public String getOriginalJson() {
        return originalJson;
    }

    public void setOriginalJson(String originalJson) {
        this.originalJson = originalJson;
    }

    public boolean isSelected() {
        return isSelected;
    }

    public void setSelected(boolean selected) {
        isSelected = selected;
    }
}
