"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiResponse = void 0;
/**
 * 非标接口返回值
 */
var ApiResponse = /** @class */ (function () {
    function ApiResponse(resCode, resMsg, data) {
        this.resCode = resCode;
        this.resMsg = resMsg;
        this.data = data;
    }
    ApiResponse.isSuccess = function (res) {
        return res.resCode === "0" || res.resCode === 0;
    };
    ApiResponse.successWithData = function (data) {
        return new ApiResponse("0", null, data);
    };
    ApiResponse.successWithResMsg = function (resMsg) {
        return new ApiResponse("0", resMsg);
    };
    ApiResponse.failed = function (resMsg) {
        return new ApiResponse("-1", resMsg);
    };
    ApiResponse.success = new ApiResponse("0");
    return ApiResponse;
}());
exports.ApiResponse = ApiResponse;
//# sourceMappingURL=Dto.js.map