package kr.co.compcareworker.Data;

import com.google.gson.annotations.SerializedName;

public abstract class BaseResult {
    @SerializedName("resultItem")
    private BaseResultItem baseResultItem;

    public BaseResultItem getBaseResultItem() {
        return baseResultItem;
    }

    private boolean isSuccess;

    public boolean isSuccess() {
        if (getBaseResultItem().result.equals("Y")) return true;

        return false;
    }

    private String message;

    public String getMessage() {
        return getBaseResultItem().message;
    }

    public class BaseResultItem {
        @SerializedName("method")
        private String method;
        @SerializedName("result")
        private String result;
        @SerializedName("message")
        private String message;

        public boolean isSuccess() {
            return result.equals("Y");
        }

        public String getMethod() {
            return method;
        }

        public void setMethod(String method) {
            this.method = method;
        }

        public String getResult() {
            return result;
        }

        public void setResult(String result) {
            this.result = result;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }
    }
}
