@sourceloop/ctrl-plane-subscription-service
Version:
Subscription management microservice for SaaS control plane.
130 lines • 3.95 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionDto = exports.PaymentMethodEnum = void 0;
const tslib_1 = require("tslib");
const repository_1 = require("@loopback/repository");
var PaymentMethodEnum;
(function (PaymentMethodEnum) {
PaymentMethodEnum["Cash"] = "cash";
PaymentMethodEnum["Check"] = "check";
PaymentMethodEnum["BankTranser"] = "bank_transfer";
PaymentMethodEnum["Other"] = "other";
PaymentMethodEnum["Custom"] = "custom";
PaymentMethodEnum["PaymentSource"] = "payment_source";
})(PaymentMethodEnum || (exports.PaymentMethodEnum = PaymentMethodEnum = {}));
let TransactionDto = class TransactionDto extends repository_1.Entity {
constructor(data) {
super(data);
}
};
exports.TransactionDto = TransactionDto;
tslib_1.__decorate([
(0, repository_1.property)({
type: 'number',
required: false,
jsonSchema: {
minimum: 0,
},
}),
tslib_1.__metadata("design:type", Number)
], TransactionDto.prototype, "amount", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
description: 'payment method',
required: true,
jsonSchema: {
enum: Object.values(PaymentMethodEnum),
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "paymentMethod", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "paymentSourceId", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
maxLength: 100,
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "referenceNumber", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
maxLength: 50,
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "customPaymentMethodId", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
maxLength: 100,
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "idAtGateway", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
enum: ['success', 'failure'],
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "status", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'number',
required: false,
}),
tslib_1.__metadata("design:type", Number)
], TransactionDto.prototype, "date", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
maxLength: 100,
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "errorCode", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
maxLength: 65000,
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "errorText", void 0);
tslib_1.__decorate([
(0, repository_1.property)({
type: 'string',
required: false,
jsonSchema: {
maxLength: 300,
},
}),
tslib_1.__metadata("design:type", String)
], TransactionDto.prototype, "comment", void 0);
exports.TransactionDto = TransactionDto = tslib_1.__decorate([
(0, repository_1.model)(),
tslib_1.__metadata("design:paramtypes", [Object])
], TransactionDto);
//# sourceMappingURL=transaction-dto.model.js.map