@felloh-org/lambda-wrapper 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entity/agent-data/booking/index.js +92 -4
- package/dist/entity/agent-data/index.js +5 -5
- package/dist/entity/agent-data/{customer → supplier}/index.js +4 -4
- package/dist/entity/agent-data/{organisation-supplier → supplier-type}/index.js +4 -4
- package/dist/entity/payment/index.js +7 -1
- package/dist/entity/payment/payment-link/index.js +126 -4
- package/dist/entity/payment/transaction/index.js +115 -4
- package/dist/entity/payment/transaction-event/index.js +37 -5
- package/dist/entity/{agent-data/organisation-supplier-type → payment/transaction-event-type}/index.js +5 -5
- package/dist/entity/payment/transaction-metadata/index.js +140 -0
- package/dist/entity/payment/transaction-method/index.js +1 -1
- package/dist/entity/payment/transaction-status/index.js +1 -1
- package/dist/entity/payment/transaction-type/index.js +39 -0
- package/dist/entity/user/user/index.js +10 -3
- package/dist/index.js +49 -27
- package/dist/migration/agent-data/1642121041760-inital.js +0 -2
- package/dist/migration/agent-data/1642121610577-organisation-suppliers.js +2 -2
- package/dist/migration/agent-data/1642121681610-organisation-suppliers-type.js +2 -2
- package/dist/migration/agent-data/1642505882721-booking-fields.js +29 -0
- package/dist/migration/agent-data/1642508385880-booking-id.js +19 -0
- package/dist/migration/{1642370449589-transaction.js → nuapay/1642370449589-transaction.js} +0 -0
- package/dist/migration/payment/1642514728358-payment-link-updates.js +39 -0
- package/dist/migration/payment/1642516017835-payment-link-add-booking.js +15 -0
- package/dist/migration/payment/1642519453365-transaction.js +63 -0
- package/dist/migration/payment/1642520774562-transaction-payment-link.js +15 -0
- package/dist/migration/payment/1642533711013-transaction-metadata.js +15 -0
- package/dist/migration/payment/1642540883807-transaction-event.js +27 -0
- package/dist/service/warehouse.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _booking = _interopRequireDefault(require("../../agent-data/booking"));
|
|
11
|
+
|
|
12
|
+
var _transaction = _interopRequireDefault(require("../transaction"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
19
|
+
|
|
20
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
21
|
+
|
|
22
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
23
|
+
|
|
24
|
+
let TransactionMetadata = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'transaction_metadata',
|
|
26
|
+
schema: 'payment'
|
|
27
|
+
}), _dec2 = (0, _typeorm.ManyToOne)(() => _transaction.default, {
|
|
28
|
+
primary: true
|
|
29
|
+
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
30
|
+
name: 'transaction_id',
|
|
31
|
+
referencedColumnName: 'id'
|
|
32
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
nullable: true,
|
|
35
|
+
length: 20
|
|
36
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
37
|
+
type: "varchar",
|
|
38
|
+
nullable: true,
|
|
39
|
+
length: 20
|
|
40
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
41
|
+
type: "varchar",
|
|
42
|
+
nullable: true,
|
|
43
|
+
length: 20
|
|
44
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
45
|
+
type: "varchar",
|
|
46
|
+
nullable: true,
|
|
47
|
+
length: 10
|
|
48
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
49
|
+
type: "varchar",
|
|
50
|
+
nullable: true,
|
|
51
|
+
length: 10
|
|
52
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
53
|
+
type: "varchar",
|
|
54
|
+
nullable: true,
|
|
55
|
+
length: 10
|
|
56
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
57
|
+
type: "varchar",
|
|
58
|
+
nullable: true,
|
|
59
|
+
length: 4
|
|
60
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
61
|
+
type: "varchar",
|
|
62
|
+
nullable: true,
|
|
63
|
+
length: 150
|
|
64
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionMetadata {
|
|
65
|
+
constructor() {
|
|
66
|
+
_initializerDefineProperty(this, "transaction", _descriptor, this);
|
|
67
|
+
|
|
68
|
+
_initializerDefineProperty(this, "card_type", _descriptor2, this);
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(this, "bin_type", _descriptor3, this);
|
|
71
|
+
|
|
72
|
+
_initializerDefineProperty(this, "payment_brand", _descriptor4, this);
|
|
73
|
+
|
|
74
|
+
_initializerDefineProperty(this, "payment_type", _descriptor5, this);
|
|
75
|
+
|
|
76
|
+
_initializerDefineProperty(this, "issuing_country", _descriptor6, this);
|
|
77
|
+
|
|
78
|
+
_initializerDefineProperty(this, "currency", _descriptor7, this);
|
|
79
|
+
|
|
80
|
+
_initializerDefineProperty(this, "last_four_digits", _descriptor8, this);
|
|
81
|
+
|
|
82
|
+
_initializerDefineProperty(this, "cardholder_name", _descriptor9, this);
|
|
83
|
+
|
|
84
|
+
_initializerDefineProperty(this, "created_at", _descriptor10, this);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
88
|
+
configurable: true,
|
|
89
|
+
enumerable: true,
|
|
90
|
+
writable: true,
|
|
91
|
+
initializer: function () {
|
|
92
|
+
return _booking.default;
|
|
93
|
+
}
|
|
94
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "card_type", [_dec4], {
|
|
95
|
+
configurable: true,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
initializer: null
|
|
99
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "bin_type", [_dec5], {
|
|
100
|
+
configurable: true,
|
|
101
|
+
enumerable: true,
|
|
102
|
+
writable: true,
|
|
103
|
+
initializer: null
|
|
104
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "payment_brand", [_dec6], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: null
|
|
109
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "payment_type", [_dec7], {
|
|
110
|
+
configurable: true,
|
|
111
|
+
enumerable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
initializer: null
|
|
114
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "issuing_country", [_dec8], {
|
|
115
|
+
configurable: true,
|
|
116
|
+
enumerable: true,
|
|
117
|
+
writable: true,
|
|
118
|
+
initializer: null
|
|
119
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec9], {
|
|
120
|
+
configurable: true,
|
|
121
|
+
enumerable: true,
|
|
122
|
+
writable: true,
|
|
123
|
+
initializer: null
|
|
124
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "last_four_digits", [_dec10], {
|
|
125
|
+
configurable: true,
|
|
126
|
+
enumerable: true,
|
|
127
|
+
writable: true,
|
|
128
|
+
initializer: null
|
|
129
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "cardholder_name", [_dec11], {
|
|
130
|
+
configurable: true,
|
|
131
|
+
enumerable: true,
|
|
132
|
+
writable: true,
|
|
133
|
+
initializer: null
|
|
134
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
135
|
+
configurable: true,
|
|
136
|
+
enumerable: true,
|
|
137
|
+
writable: true,
|
|
138
|
+
initializer: null
|
|
139
|
+
})), _class2)) || _class);
|
|
140
|
+
exports.default = TransactionMetadata;
|
|
@@ -18,7 +18,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
18
|
let TransactionMethod = (_dec = (0, _typeorm.Entity)({
|
|
19
19
|
name: 'transaction_method',
|
|
20
20
|
schema: 'payment'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionMethod {
|
|
22
22
|
constructor() {
|
|
23
23
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
24
|
|
|
@@ -18,7 +18,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
|
|
|
18
18
|
let TransactionStatus = (_dec = (0, _typeorm.Entity)({
|
|
19
19
|
name: 'transaction_status',
|
|
20
20
|
schema: 'payment'
|
|
21
|
-
}), _dec2 = (0, _typeorm.
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionStatus {
|
|
22
22
|
constructor() {
|
|
23
23
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
24
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
|
|
11
|
+
|
|
12
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
13
|
+
|
|
14
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
15
|
+
|
|
16
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
17
|
+
|
|
18
|
+
let TransactionType = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'transaction_type',
|
|
20
|
+
schema: 'payment'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionType {
|
|
22
|
+
constructor() {
|
|
23
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
24
|
+
|
|
25
|
+
_initializerDefineProperty(this, "created_at", _descriptor2, this);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
29
|
+
configurable: true,
|
|
30
|
+
enumerable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
initializer: null
|
|
33
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
|
|
34
|
+
configurable: true,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
initializer: null
|
|
38
|
+
})), _class2)) || _class);
|
|
39
|
+
exports.default = TransactionType;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.USER_STATUS = void 0;
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
@@ -19,6 +19,13 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
|
|
|
19
19
|
|
|
20
20
|
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
21
21
|
|
|
22
|
+
const USER_STATUS = {
|
|
23
|
+
ACTIVE: 'ACTIVE',
|
|
24
|
+
PENDING: 'PENDING',
|
|
25
|
+
SUSPENDED: 'SUSPENDED',
|
|
26
|
+
DELETED: 'DELETED'
|
|
27
|
+
};
|
|
28
|
+
exports.USER_STATUS = USER_STATUS;
|
|
22
29
|
let User = (_dec = (0, _typeorm.Entity)({
|
|
23
30
|
name: 'user',
|
|
24
31
|
schema: 'user'
|
|
@@ -43,11 +50,11 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
43
50
|
name: "user_organisation",
|
|
44
51
|
schema: "user",
|
|
45
52
|
joinColumn: {
|
|
46
|
-
name: "
|
|
53
|
+
name: "user_id",
|
|
47
54
|
referencedColumnName: "id"
|
|
48
55
|
},
|
|
49
56
|
inverseJoinColumn: {
|
|
50
|
-
name: "
|
|
57
|
+
name: "organisation_id",
|
|
51
58
|
referencedColumnName: "id"
|
|
52
59
|
}
|
|
53
60
|
}), _dec(_class = (_class2 = class User {
|
package/dist/index.js
CHANGED
|
@@ -21,28 +21,22 @@ Object.defineProperty(exports, "BeneficiaryProviderEntity", {
|
|
|
21
21
|
return _beneficiaryProvider.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
Object.defineProperty(exports, "
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _booking.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "BookingComponent", {
|
|
24
|
+
Object.defineProperty(exports, "BookingComponentEntity", {
|
|
31
25
|
enumerable: true,
|
|
32
26
|
get: function () {
|
|
33
27
|
return _bookingComponent.default;
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
|
-
Object.defineProperty(exports, "
|
|
30
|
+
Object.defineProperty(exports, "BookingComponentTypeEntity", {
|
|
37
31
|
enumerable: true,
|
|
38
32
|
get: function () {
|
|
39
33
|
return _bookingComponentType.default;
|
|
40
34
|
}
|
|
41
35
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
36
|
+
Object.defineProperty(exports, "BookingEntity", {
|
|
43
37
|
enumerable: true,
|
|
44
38
|
get: function () {
|
|
45
|
-
return
|
|
39
|
+
return _booking.default;
|
|
46
40
|
}
|
|
47
41
|
});
|
|
48
42
|
Object.defineProperty(exports, "DEFINITIONS", {
|
|
@@ -147,18 +141,6 @@ Object.defineProperty(exports, "OrganisationFeatureEntity", {
|
|
|
147
141
|
return _organisationFeature.default;
|
|
148
142
|
}
|
|
149
143
|
});
|
|
150
|
-
Object.defineProperty(exports, "OrganisationSupplier", {
|
|
151
|
-
enumerable: true,
|
|
152
|
-
get: function () {
|
|
153
|
-
return _organisationSupplier.default;
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
Object.defineProperty(exports, "OrganisationSupplierType", {
|
|
157
|
-
enumerable: true,
|
|
158
|
-
get: function () {
|
|
159
|
-
return _organisationSupplierType.default;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
144
|
Object.defineProperty(exports, "PaymentLinkEntity", {
|
|
163
145
|
enumerable: true,
|
|
164
146
|
get: function () {
|
|
@@ -201,6 +183,18 @@ Object.defineProperty(exports, "StatusModel", {
|
|
|
201
183
|
return _status.default;
|
|
202
184
|
}
|
|
203
185
|
});
|
|
186
|
+
Object.defineProperty(exports, "SupplierEntity", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () {
|
|
189
|
+
return _supplier.default;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "SupplierTypeEntity", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () {
|
|
195
|
+
return _supplierType.default;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
204
198
|
Object.defineProperty(exports, "TransactionEntity", {
|
|
205
199
|
enumerable: true,
|
|
206
200
|
get: function () {
|
|
@@ -213,6 +207,18 @@ Object.defineProperty(exports, "TransactionEventEntity", {
|
|
|
213
207
|
return _transactionEvent.default;
|
|
214
208
|
}
|
|
215
209
|
});
|
|
210
|
+
Object.defineProperty(exports, "TransactionEventTypeEntity", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () {
|
|
213
|
+
return _transactionEventType.default;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "TransactionMetadataEntity", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _transactionMetadata.default;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
216
222
|
Object.defineProperty(exports, "TransactionMethodEntity", {
|
|
217
223
|
enumerable: true,
|
|
218
224
|
get: function () {
|
|
@@ -225,6 +231,18 @@ Object.defineProperty(exports, "TransactionStatusEntity", {
|
|
|
225
231
|
return _transactionStatus.default;
|
|
226
232
|
}
|
|
227
233
|
});
|
|
234
|
+
Object.defineProperty(exports, "TransactionTypeEntity", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () {
|
|
237
|
+
return _transactionType.default;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "USER_STATUS", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () {
|
|
243
|
+
return _user.USER_STATUS;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
228
246
|
Object.defineProperty(exports, "UserActivityEntity", {
|
|
229
247
|
enumerable: true,
|
|
230
248
|
get: function () {
|
|
@@ -264,7 +282,7 @@ var _role = _interopRequireDefault(require("./entity/user/role"));
|
|
|
264
282
|
|
|
265
283
|
var _userRole = _interopRequireDefault(require("./entity/user/user-role"));
|
|
266
284
|
|
|
267
|
-
var _user =
|
|
285
|
+
var _user = _interopRequireWildcard(require("./entity/user/user"));
|
|
268
286
|
|
|
269
287
|
var _userActivity = _interopRequireDefault(require("./entity/user/user-activity"));
|
|
270
288
|
|
|
@@ -286,21 +304,25 @@ var _transaction = _interopRequireDefault(require("./entity/payment/transaction"
|
|
|
286
304
|
|
|
287
305
|
var _transactionEvent = _interopRequireDefault(require("./entity/payment/transaction-event"));
|
|
288
306
|
|
|
307
|
+
var _transactionEventType = _interopRequireDefault(require("./entity/payment/transaction-event-type"));
|
|
308
|
+
|
|
289
309
|
var _transactionMethod = _interopRequireDefault(require("./entity/payment/transaction-method"));
|
|
290
310
|
|
|
291
311
|
var _transactionStatus = _interopRequireDefault(require("./entity/payment/transaction-status"));
|
|
292
312
|
|
|
293
|
-
var
|
|
313
|
+
var _transactionType = _interopRequireDefault(require("./entity/payment/transaction-type"));
|
|
294
314
|
|
|
295
|
-
var
|
|
315
|
+
var _transactionMetadata = _interopRequireDefault(require("./entity/payment/transaction-metadata"));
|
|
316
|
+
|
|
317
|
+
var _booking = _interopRequireDefault(require("./entity/agent-data/booking"));
|
|
296
318
|
|
|
297
319
|
var _bookingComponent = _interopRequireDefault(require("./entity/agent-data/booking-component"));
|
|
298
320
|
|
|
299
321
|
var _bookingComponentType = _interopRequireDefault(require("./entity/agent-data/booking-component-type"));
|
|
300
322
|
|
|
301
|
-
var
|
|
323
|
+
var _supplier = _interopRequireDefault(require("./entity/agent-data/supplier"));
|
|
302
324
|
|
|
303
|
-
var
|
|
325
|
+
var _supplierType = _interopRequireDefault(require("./entity/agent-data/supplier-type"));
|
|
304
326
|
|
|
305
327
|
var _account2 = _interopRequireDefault(require("./entity/nuapay/account"));
|
|
306
328
|
|
|
@@ -5,13 +5,11 @@ module.exports = class inital1642121041760 {
|
|
|
5
5
|
|
|
6
6
|
async up(queryRunner) {
|
|
7
7
|
await queryRunner.query(`CREATE TABLE "agent_data"."booking" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_49171efc69702ed84c812f33540" PRIMARY KEY ("id"))`);
|
|
8
|
-
await queryRunner.query(`CREATE TABLE "agent_data"."customer" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_a7a13f4cacb744524e44dfdad32" PRIMARY KEY ("id"))`);
|
|
9
8
|
await queryRunner.query(`CREATE TABLE "agent_data"."booking_component" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_fde413f2d9d1e1377876431efaa" PRIMARY KEY ("id"))`);
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
async down(queryRunner) {
|
|
13
12
|
await queryRunner.query(`DROP TABLE "agent_data"."booking_component"`);
|
|
14
|
-
await queryRunner.query(`DROP TABLE "agent_data"."customer"`);
|
|
15
13
|
await queryRunner.query(`DROP TABLE "agent_data"."booking"`);
|
|
16
14
|
}
|
|
17
15
|
}
|
|
@@ -4,10 +4,10 @@ module.exports = class organisationSuppliers1642121610577 {
|
|
|
4
4
|
name = 'organisationSuppliers1642121610577'
|
|
5
5
|
|
|
6
6
|
async up(queryRunner) {
|
|
7
|
-
await queryRunner.query(`CREATE TABLE "agent_data"."
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "agent_data"."supplier" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_b7b35819e17fc7448d6e5d065c8" PRIMARY KEY ("id"))`);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
async down(queryRunner) {
|
|
11
|
-
await queryRunner.query(`DROP TABLE "agent_data"."
|
|
11
|
+
await queryRunner.query(`DROP TABLE "agent_data"."supplier"`);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -4,10 +4,10 @@ module.exports = class organisationSuppliersType1642121681610 {
|
|
|
4
4
|
name = 'organisationSuppliersType1642121681610'
|
|
5
5
|
|
|
6
6
|
async up(queryRunner) {
|
|
7
|
-
await queryRunner.query(`CREATE TABLE "agent_data"."
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "agent_data"."supplier_type" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_bfeb2ecd22d6fc50b3f8397f5a8" PRIMARY KEY ("id"))`);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
async down(queryRunner) {
|
|
11
|
-
await queryRunner.query(`DROP TABLE "agent_data"."
|
|
11
|
+
await queryRunner.query(`DROP TABLE "agent_data"."upplier_type"`);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bookingFields1642505882721 {
|
|
4
|
+
name = 'bookingFields1642505882721'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "email" character varying(150) NOT NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "customer_name" character varying(150) NOT NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "booking_reference" character varying(150) NOT NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "departure_date" date`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "return_date" date`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "user_id" character varying`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "organisation_id" character varying(150)`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD CONSTRAINT "FK_276896d1a1a30be6de9d7d43f53" FOREIGN KEY ("user_id") REFERENCES "user"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD CONSTRAINT "FK_20ee76af56ba7f97d76af3ea0fb" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
async down(queryRunner) {
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP CONSTRAINT "FK_20ee76af56ba7f97d76af3ea0fb"`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP CONSTRAINT "FK_276896d1a1a30be6de9d7d43f53"`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "organisation_id"`);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "user_id"`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "return_date"`);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "departure_date"`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "booking_reference"`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "customer_name"`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "email"`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bookingId1642508385880 {
|
|
4
|
+
name = 'bookingId1642508385880'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP CONSTRAINT "PK_49171efc69702ed84c812f33540"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "id"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "id" character varying NOT NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD CONSTRAINT "PK_49171efc69702ed84c812f33540" PRIMARY KEY ("id")`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP CONSTRAINT "PK_49171efc69702ed84c812f33540"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "id"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD CONSTRAINT "PK_49171efc69702ed84c812f33540" PRIMARY KEY ("id")`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkUpdates1642514728358 {
|
|
4
|
+
name = 'paymentLinkUpdates1642514728358'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "amount" integer NOT NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "description" character varying(250) NOT NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "success_url" character varying(200) NOT NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "failure_url" character varying(200) NOT NULL`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "cancel_url" character varying(200) NOT NULL`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "expires_at" TIMESTAMP WITH TIME ZONE NOT NULL`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "user_id" character varying`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "organisation_id" character varying(150)`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "PK_e4d1c6bb16b048b1bade8ef8a50"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "id"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "id" character varying NOT NULL`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "PK_e4d1c6bb16b048b1bade8ef8a50" PRIMARY KEY ("id")`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "FK_aaebfa72f6748c24ed68746264b" FOREIGN KEY ("user_id") REFERENCES "user"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "FK_a30955b4517d53bfea79937b413" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async down(queryRunner) {
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "FK_a30955b4517d53bfea79937b413"`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "FK_aaebfa72f6748c24ed68746264b"`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "PK_e4d1c6bb16b048b1bade8ef8a50"`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "id"`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "PK_e4d1c6bb16b048b1bade8ef8a50" PRIMARY KEY ("id")`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "organisation_id"`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "user_id"`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "expires_at"`);
|
|
33
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "cancel_url"`);
|
|
34
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "failure_url"`);
|
|
35
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "success_url"`);
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "description"`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "amount"`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class paymentLinkAddBooking1642516017835 {
|
|
4
|
+
name = 'paymentLinkAddBooking1642516017835'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD "booking_id" character varying`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" ADD CONSTRAINT "FK_831e1fd2dc9bbe1d8c098feeeb5" FOREIGN KEY ("booking_id") REFERENCES "agent_data"."booking"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP CONSTRAINT "FK_831e1fd2dc9bbe1d8c098feeeb5"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."payment_Link" DROP COLUMN "booking_id"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transaction1642519453365 {
|
|
4
|
+
name = 'transaction1642519453365'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "payment"."transaction_type" ("id" character varying NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_e4e15bcea926d360cfeea703c36" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "payment"."transaction_event_type" ("id" character varying NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "PK_e519a4e0fbafdd47bdbed663e42" PRIMARY KEY ("id"))`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "amount" integer NOT NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "completed_at" TIMESTAMP WITH TIME ZONE`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "booking_id" character varying`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "organisation_id" character varying(150)`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "status_id" character varying`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "method_id" character varying`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "type_id" character varying`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" DROP CONSTRAINT "PK_46299cdd290767885705d0645a0"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" DROP COLUMN "id"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" ADD "id" character varying NOT NULL`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" ADD CONSTRAINT "PK_46299cdd290767885705d0645a0" PRIMARY KEY ("id")`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" DROP CONSTRAINT "PK_05fbbdf6bc1db819f47975c8c0b"`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" DROP COLUMN "id"`);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" ADD "id" character varying NOT NULL`);
|
|
23
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" ADD CONSTRAINT "PK_05fbbdf6bc1db819f47975c8c0b" PRIMARY KEY ("id")`);
|
|
24
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "PK_89eadb93a89810556e1cbcd6ab9"`);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "id"`);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "id" character varying NOT NULL`);
|
|
27
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "PK_89eadb93a89810556e1cbcd6ab9" PRIMARY KEY ("id")`);
|
|
28
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_d52119b6a9344bfec6734475fa7" FOREIGN KEY ("booking_id") REFERENCES "agent_data"."booking"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
29
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_57ac3dfd4c89ae765952d2896b1" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
30
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_05fbbdf6bc1db819f47975c8c0b" FOREIGN KEY ("status_id") REFERENCES "payment"."transaction_status"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
31
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_46299cdd290767885705d0645a0" FOREIGN KEY ("method_id") REFERENCES "payment"."transaction_method"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
32
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_e4e15bcea926d360cfeea703c36" FOREIGN KEY ("type_id") REFERENCES "payment"."transaction_type"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async down(queryRunner) {
|
|
36
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_e4e15bcea926d360cfeea703c36"`);
|
|
37
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_46299cdd290767885705d0645a0"`);
|
|
38
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_05fbbdf6bc1db819f47975c8c0b"`);
|
|
39
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_57ac3dfd4c89ae765952d2896b1"`);
|
|
40
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_d52119b6a9344bfec6734475fa7"`);
|
|
41
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "PK_89eadb93a89810556e1cbcd6ab9"`);
|
|
42
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "id"`);
|
|
43
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
44
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "PK_89eadb93a89810556e1cbcd6ab9" PRIMARY KEY ("id")`);
|
|
45
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" DROP CONSTRAINT "PK_05fbbdf6bc1db819f47975c8c0b"`);
|
|
46
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" DROP COLUMN "id"`);
|
|
47
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
48
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_status" ADD CONSTRAINT "PK_05fbbdf6bc1db819f47975c8c0b" PRIMARY KEY ("id")`);
|
|
49
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" DROP CONSTRAINT "PK_46299cdd290767885705d0645a0"`);
|
|
50
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" DROP COLUMN "id"`);
|
|
51
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" ADD "id" uuid NOT NULL DEFAULT uuid_generate_v4()`);
|
|
52
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_method" ADD CONSTRAINT "PK_46299cdd290767885705d0645a0" PRIMARY KEY ("id")`);
|
|
53
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "type_id"`);
|
|
54
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "method_id"`);
|
|
55
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "status_id"`);
|
|
56
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "organisation_id"`);
|
|
57
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "booking_id"`);
|
|
58
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "completed_at"`);
|
|
59
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "amount"`);
|
|
60
|
+
await queryRunner.query(`DROP TABLE "payment"."transaction_event_type"`);
|
|
61
|
+
await queryRunner.query(`DROP TABLE "payment"."transaction_type"`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionPaymentLink1642520774562 {
|
|
4
|
+
name = 'transactionPaymentLink1642520774562'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD "payment_link_id" character varying`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" ADD CONSTRAINT "FK_a5d2e720273043e167c33c9d3c9" FOREIGN KEY ("payment_link_id") REFERENCES "payment"."payment_Link"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP CONSTRAINT "FK_a5d2e720273043e167c33c9d3c9"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction" DROP COLUMN "payment_link_id"`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class transactionMetadata1642533711013 {
|
|
4
|
+
name = 'transactionMetadata1642533711013'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "payment"."transaction_metadata" ("card_type" character varying(20), "bin_type" character varying(20), "payment_brand" character varying(20), "payment_type" character varying(10), "issuing_country" character varying(10), "currency" character varying(10), "last_four_digits" character varying(4), "cardholder_name" character varying(150), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "transaction_id" character varying NOT NULL, CONSTRAINT "PK_b613ceeab504ae9e7702ee09678" PRIMARY KEY ("transaction_id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" ADD CONSTRAINT "FK_b613ceeab504ae9e7702ee09678" FOREIGN KEY ("transaction_id") REFERENCES "payment"."transaction"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "payment"."transaction_metadata" DROP CONSTRAINT "FK_b613ceeab504ae9e7702ee09678"`);
|
|
13
|
+
await queryRunner.query(`DROP TABLE "payment"."transaction_metadata"`);
|
|
14
|
+
}
|
|
15
|
+
}
|