"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostDeviceAlarmInfoInput = exports.PostCarCaptureInfoInput = exports.PostSpecPayNotifyInput = exports.PostCarCardChargeInfoInput = exports.PostShiftWorkInfoInput = exports.PostBusInOutInput = exports.PostCarCardInfoInput = exports.PostModifyPlateNoInput = exports.PostDeviceStateInput = exports.PostFreeParkingSpaceInput = exports.PostPayFeeInfoInput = exports.PostCarOutInfoInput = exports.PostCarInInfoInput = exports.PostPaymentInput = exports.GetConfigInfoResponse = exports.ApiResponse = exports.ApiRequestBase = void 0;
/**
 * 统一接口请求基类
 */
var ApiRequestBase = /** @class */ (function () {
    function ApiRequestBase() {
    }
    return ApiRequestBase;
}());
exports.ApiRequestBase = ApiRequestBase;
/**
 * 统一接口返回值
 */
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;
var GetConfigInfoResponse = /** @class */ (function () {
    function GetConfigInfoResponse() {
    }
    return GetConfigInfoResponse;
}());
exports.GetConfigInfoResponse = GetConfigInfoResponse;
var PostPaymentInput = /** @class */ (function (_super) {
    __extends(PostPaymentInput, _super);
    function PostPaymentInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostPaymentInput;
}(ApiRequestBase));
exports.PostPaymentInput = PostPaymentInput;
/**
 * 3.2.1
 * 进场上报
 */
var PostCarInInfoInput = /** @class */ (function (_super) {
    __extends(PostCarInInfoInput, _super);
    function PostCarInInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostCarInInfoInput;
}(ApiRequestBase));
exports.PostCarInInfoInput = PostCarInInfoInput;
/**
 * 3.2.2
 * 出场上报
 */
var PostCarOutInfoInput = /** @class */ (function (_super) {
    __extends(PostCarOutInfoInput, _super);
    function PostCarOutInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostCarOutInfoInput;
}(ApiRequestBase));
exports.PostCarOutInfoInput = PostCarOutInfoInput;
/**
 * 3.2.3缴费记录上报
 */
var PostPayFeeInfoInput = /** @class */ (function (_super) {
    __extends(PostPayFeeInfoInput, _super);
    function PostPayFeeInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    /**
     * 获取优惠金额，单位分
     * 不能直接从字段freeMoney取
     * @param input
     * @returns
     */
    PostPayFeeInfoInput.getFreeMoney = function (input) {
        return ([1010, 1012, 1013, 1014].includes(input.payMethod) ? input.paidMoney : 0) + input.freeMoney;
    };
    /**
     * 获取实收金额，单位分
     * 不能直接从字段paidMoney取
     * @param input
     */
    PostPayFeeInfoInput.getPaidMoney = function (input) {
        return [1010, 1012, 1013, 1014].includes(input.payMethod) ? 0 : input.paidMoney;
    };
    return PostPayFeeInfoInput;
}(ApiRequestBase));
exports.PostPayFeeInfoInput = PostPayFeeInfoInput;
/**
 * 3.2.4空闲车位上报
 */
var PostFreeParkingSpaceInput = /** @class */ (function (_super) {
    __extends(PostFreeParkingSpaceInput, _super);
    function PostFreeParkingSpaceInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostFreeParkingSpaceInput;
}(ApiRequestBase));
exports.PostFreeParkingSpaceInput = PostFreeParkingSpaceInput;
/**
 * 3.2.5设备状态上报
 */
var PostDeviceStateInput = /** @class */ (function (_super) {
    __extends(PostDeviceStateInput, _super);
    function PostDeviceStateInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostDeviceStateInput;
}(ApiRequestBase));
exports.PostDeviceStateInput = PostDeviceStateInput;
/**
 * 3.2.6修改车牌信息上报
 */
var PostModifyPlateNoInput = /** @class */ (function (_super) {
    __extends(PostModifyPlateNoInput, _super);
    function PostModifyPlateNoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostModifyPlateNoInput;
}(ApiRequestBase));
exports.PostModifyPlateNoInput = PostModifyPlateNoInput;
/**
 * 3.2.7车场固定车信息上报
 */
var PostCarCardInfoInput = /** @class */ (function (_super) {
    __extends(PostCarCardInfoInput, _super);
    function PostCarCardInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostCarCardInfoInput;
}(ApiRequestBase));
exports.PostCarCardInfoInput = PostCarCardInfoInput;
/**
 *
 * 进出车位上报
 */
var PostBusInOutInput = /** @class */ (function (_super) {
    __extends(PostBusInOutInput, _super);
    function PostBusInOutInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostBusInOutInput;
}(ApiRequestBase));
exports.PostBusInOutInput = PostBusInOutInput;
/**
 * 3.2.10车场交班信息上报
 */
var PostShiftWorkInfoInput = /** @class */ (function (_super) {
    __extends(PostShiftWorkInfoInput, _super);
    function PostShiftWorkInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostShiftWorkInfoInput;
}(ApiRequestBase));
exports.PostShiftWorkInfoInput = PostShiftWorkInfoInput;
/**
 * 3.2.8车场固定车充值信息上报
 */
var PostCarCardChargeInfoInput = /** @class */ (function (_super) {
    __extends(PostCarCardChargeInfoInput, _super);
    function PostCarCardChargeInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostCarCardChargeInfoInput;
}(ApiRequestBase));
exports.PostCarCardChargeInfoInput = PostCarCardChargeInfoInput;
/**
 * 3.2.30 特殊订单上报
 */
var PostSpecPayNotifyInput = /** @class */ (function (_super) {
    __extends(PostSpecPayNotifyInput, _super);
    function PostSpecPayNotifyInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostSpecPayNotifyInput;
}(ApiRequestBase));
exports.PostSpecPayNotifyInput = PostSpecPayNotifyInput;
/**
 * 3.3.1车场进出场压地感上报
 */
var PostCarCaptureInfoInput = /** @class */ (function (_super) {
    __extends(PostCarCaptureInfoInput, _super);
    function PostCarCaptureInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostCarCaptureInfoInput;
}(ApiRequestBase));
exports.PostCarCaptureInfoInput = PostCarCaptureInfoInput;
/**
 * 3.2.12设备告警信息上报
 */
var PostDeviceAlarmInfoInput = /** @class */ (function (_super) {
    __extends(PostDeviceAlarmInfoInput, _super);
    function PostDeviceAlarmInfoInput() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return PostDeviceAlarmInfoInput;
}(ApiRequestBase));
exports.PostDeviceAlarmInfoInput = PostDeviceAlarmInfoInput;
//# sourceMappingURL=Dto.js.map