package uprrp.tania.models;

import android.util.Log;

public class QuestionModel {

    // NOTE: these attributes must have the same name as in the JSON
    private String id_question;
    private String id_type;
    private String premise;
    private String max_text;
    private String min_text;
    private int max_val;

    public String getID() {
        return this.id_question;
    }

    public String getType() {
        if(this.id_type.equals("1")) {
            return "SCALED";
        } else if(this.id_type.equals("2")) {
            return "OPEN";
        } else {
            Log.wtf("QUESTION MODEL DESERIALIZATION", "Encountered id_type of " + this.id_type);
            return "OPEN";
        }
    }

    public String getPremise() {
        return this.premise;
    }

    public String getMaxText() {
        return this.max_text;
    }

    public String getMinText() {
        return this.min_text;
    }

    public int getMaxValue() {
        return this.max_val;
    }

    public int getMinValue() {
        return 1;
    }

}
