package thyyxxk.webserver.utils;

import thyyxxk.webserver.config.exception.ExceptionEnumInterface;
import thyyxxk.webserver.entity.ResultVo;

/**
 * @author dj
 */
public class ResultVoUtil {

    public static <T> ResultVo<T> success() {
        return new ResultVo<>();
    }

    public static <T> ResultVo<T> success(T data) {
        return new ResultVo<>(data);
    }

    public static <T> ResultVo<T> success(ExceptionEnumInterface ExceptionEnumInterface, String message) {
        return new ResultVo<>(ExceptionEnumInterface, message);
    }

    public static <T> ResultVo<T> success(ExceptionEnumInterface ExceptionEnumInterface, T data) {
        return new ResultVo<>(ExceptionEnumInterface, data);
    }

    public static <T> ResultVo<T> success(ExceptionEnumInterface ExceptionEnumInterface, String message, T data) {
        return new ResultVo<>(ExceptionEnumInterface, message, data);
    }

    public static <T> ResultVo<T> success(ExceptionEnumInterface ExceptionEnumInterface) {
        return new ResultVo<>(ExceptionEnumInterface);
    }

    public static <T> ResultVo<T> fail(ExceptionEnumInterface ExceptionEnumInterface) {
        return new ResultVo<>(ExceptionEnumInterface);
    }

    public static <T> ResultVo<T> fail(ExceptionEnumInterface ExceptionEnumInterface, String message) {
        return new ResultVo<>(ExceptionEnumInterface, message);
    }

    public static <T> ResultVo<T> fail(ExceptionEnumInterface ExceptionEnumInterface, T data) {
        return new ResultVo<>(ExceptionEnumInterface, data);
    }

    public static <T> ResultVo<T> fail(ExceptionEnumInterface ExceptionEnumInterface, String message, T data) {
        return new ResultVo<>(ExceptionEnumInterface, message, data);
    }
}
