package ch.pizzalemon.android.model.menu;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by cimenmus on 08/10/2017.
 */

public class MenuProductOptionValueModel implements Serializable{

    @Expose @SerializedName("product_option_value_id") private String productOptionValueId;
    @Expose @SerializedName("option_value_id") private String optionValueId;
    @Expose @SerializedName("image") private String imageURL;
    private String name;
    private String price;
    private String price_prefix;
    private boolean isSelected;

    private void checkNull(){

        if(productOptionValueId == null)
            productOptionValueId = "";

        if(optionValueId == null)
            optionValueId = "";

        if(imageURL == null)
            imageURL = "empty";

        if(name == null)
            name = "";

        if(price == null)
            price = "";

        if(price_prefix == null)
            price_prefix = "+";
    }

    public static void checkNull(ArrayList<MenuProductOptionValueModel> productOptionValueList){
        for(MenuProductOptionValueModel menuProductOptionValueModel : productOptionValueList){
            menuProductOptionValueModel.checkNull();
        }
    }

    public String getProductOptionValueId() {
        return productOptionValueId;
    }

    public void setProductOptionValueId(String productOptionValueId) {
        this.productOptionValueId = productOptionValueId;
    }

    public String getOptionValueId() {
        return optionValueId;
    }

    public void setOptionValueId(String optionValueId) {
        this.optionValueId = optionValueId;
    }

    public String getImageURL() {
        return imageURL;
    }

    public void setImageURL(String imageURL) {
        this.imageURL = imageURL;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public String getPrice_prefix() {
        return price_prefix;
    }

    public void setPrice_prefix(String price_prefix) {
        this.price_prefix = price_prefix;
    }

    public boolean isSelected() {
        return isSelected;
    }

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