package ch.pizzalemon.android.model;

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

public class PersonalCouponModel extends CouponModel {

    @Expose
    @SerializedName("voucher_id")
    private String voucherId;

    @Expose
    @SerializedName("from_name")
    private String fromName;

    @Expose
    @SerializedName("from_email")
    private String fromEmail;

    @Expose
    @SerializedName("to_name")
    private String toName;

    @Expose
    @SerializedName("to_email")
    private String toEmail;

    @Expose
    @SerializedName("voucher_theme_id")
    private String voucherThemeId;

    @Expose
    @SerializedName("is_active")
    private Boolean isActive;

    private String theme;
    private String message;
    private String image;
    private String amount;
    private String total;

    @Override
    public CouponType getCouponType() {
        return CouponType.PERSONAL;
    }

    @Override
    public boolean isActive() {
        if(isActive != null){
            return isActive;
        }
        else {
            return getStatus().equals("1");
        }
    }

    public String getVoucherId() {
        if(voucherId == null){
            voucherId = "";
        }
        return voucherId;
    }

    public String getFromName() {
        if(fromName == null){
            fromName = "";
        }
        return fromName;
    }

    public String getFromEmail() {
        if(fromEmail == null){
            fromEmail = "";
        }
        return fromEmail;
    }

    public String getToName() {
        if(toName == null){
            toName = "";
        }
        return toName;
    }

    public String getToEmail() {
        if(toEmail == null){
            toEmail = "";
        }
        return toEmail;
    }

    public String getVoucherThemeId() {
        if(voucherThemeId == null){
            voucherThemeId = "";
        }
        return voucherThemeId;
    }

    public String getTheme() {
        if(theme == null){
            theme = "";
        }
        return theme;
    }

    public String getMessage() {
        if(message == null){
            message = "";
        }
        return message;
    }

    public String getImage() {
        if(image == null){
            image = "";
        }
        return image;
    }

    public String getAmount() {
        if(amount == null){
            amount = "";
        }
        return amount;
    }

    public String getTotal() {
        if(total == null){
            total = "";
        }
        return total;
    }
}
