package ch.pizzalemon.android.model.history;

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

import java.util.ArrayList;

/**
 * Created by cimenmus on 17.01.2018.
 */

public class OrderHistoryProductOptionModel {

    @SerializedName("order_option_id") private String optionId;
    @Expose @SerializedName("order_id") private String orderId;
    @Expose @SerializedName("order_product_id") private String productId;
    @Expose @SerializedName("product_option_id") private String productOptionId;
    @Expose @SerializedName("product_option_value_id") private String productOptionValueId;
    private String name;
    private String value;
    private String type;

    private void checkNull(){
        if(optionId == null){
            optionId = "";
        }
        if(orderId == null){
            orderId = "";
        }
        if(productId == null){
            productId = "";
        }
        if(productOptionId == null){
            productOptionId = "";
        }
        if(productOptionValueId == null){
            productOptionValueId = "";
        }
        if(name == null){
            name = "";
        }
        if(value == null){
            value = "";
        }
        if(type == null){
            type = "";
        }
    }

    public static void checkNull(ArrayList<OrderHistoryProductOptionModel> orderHistoryProductOptionModels){
        for(OrderHistoryProductOptionModel orderHistoryProductOptionModel : orderHistoryProductOptionModels){
            orderHistoryProductOptionModel.checkNull();
        }
    }

    public String getOptionId() {
        return optionId;
    }

    public void setOptionId(String optionId) {
        this.optionId = optionId;
    }

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductOptionId() {
        return productOptionId;
    }

    public void setProductOptionId(String productOptionId) {
        this.productOptionId = productOptionId;
    }

    public String getProductOptionValueId() {
        return productOptionValueId;
    }

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

    public String getName() {
        return name;
    }

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

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
