@felloh-org/lambda-wrapper 1.6.10 → 1.7.0
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.
|
@@ -7,21 +7,23 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _typeorm = require("typeorm");
|
|
9
9
|
|
|
10
|
+
var _uuid = require("uuid");
|
|
11
|
+
|
|
10
12
|
var _user = _interopRequireDefault(require("../../user/user"));
|
|
11
13
|
|
|
12
14
|
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
13
15
|
|
|
14
16
|
var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
15
17
|
|
|
16
|
-
var _uuid = require("uuid");
|
|
17
|
-
|
|
18
18
|
var _bookingComponent = _interopRequireDefault(require("../booking-component"));
|
|
19
19
|
|
|
20
20
|
var _paymentLink = _interopRequireDefault(require("../../payment/payment-link"));
|
|
21
21
|
|
|
22
22
|
var _creditNote = _interopRequireDefault(require("../../payment/credit-note"));
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _currency = require("../../bank/currency");
|
|
25
|
+
|
|
26
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17, _descriptor18;
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
@@ -38,37 +40,41 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
38
40
|
type: "int",
|
|
39
41
|
nullable: true
|
|
40
42
|
}), _dec4 = (0, _typeorm.Column)({
|
|
43
|
+
type: "varchar",
|
|
44
|
+
length: "3",
|
|
45
|
+
default: _currency.DEFAULT_CURRENCY
|
|
46
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
41
47
|
type: "varchar",
|
|
42
48
|
length: "250",
|
|
43
49
|
nullable: true
|
|
44
|
-
}),
|
|
50
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _user.default, {
|
|
45
51
|
nullable: true
|
|
46
|
-
}),
|
|
52
|
+
}), _dec7 = (0, _typeorm.JoinColumn)({
|
|
47
53
|
name: 'user_id',
|
|
48
54
|
referencedColumnName: 'id'
|
|
49
|
-
}),
|
|
55
|
+
}), _dec8 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.booking), _dec9 = (0, _typeorm.OneToMany)(() => _creditNote.default, creditNote => creditNote.booking_applied_to), _dec10 = (0, _typeorm.OneToMany)(() => _bookingComponent.default, bookingComponent => bookingComponent.booking), _dec11 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec12 = (0, _typeorm.JoinColumn)({
|
|
50
56
|
name: 'organisation_id',
|
|
51
57
|
referencedColumnName: 'id'
|
|
52
|
-
}),
|
|
58
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
53
59
|
type: "varchar",
|
|
54
60
|
length: "150"
|
|
55
|
-
}),
|
|
61
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
56
62
|
type: "varchar",
|
|
57
63
|
length: "150"
|
|
58
|
-
}),
|
|
64
|
+
}), _dec15 = (0, _typeorm.Index)(), _dec16 = (0, _typeorm.Column)({
|
|
59
65
|
type: "date",
|
|
60
66
|
nullable: true
|
|
61
|
-
}),
|
|
67
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
62
68
|
type: "date",
|
|
63
69
|
nullable: true
|
|
64
|
-
}),
|
|
70
|
+
}), _dec18 = (0, _typeorm.CreateDateColumn)({
|
|
65
71
|
type: 'timestamp with time zone'
|
|
66
|
-
}),
|
|
72
|
+
}), _dec19 = (0, _typeorm.UpdateDateColumn)({
|
|
67
73
|
type: 'timestamp with time zone'
|
|
68
|
-
}),
|
|
74
|
+
}), _dec20 = (0, _typeorm.DeleteDateColumn)({
|
|
69
75
|
type: 'timestamp with time zone',
|
|
70
76
|
nullable: true
|
|
71
|
-
}),
|
|
77
|
+
}), _dec21 = (0, _typeorm.OneToMany)(() => _paymentLink.default, paymentLink => paymentLink.booking), _dec22 = (0, _typeorm.Column)({
|
|
72
78
|
type: "boolean",
|
|
73
79
|
default: false
|
|
74
80
|
}), _dec(_class = (_class2 = class Booking {
|
|
@@ -77,35 +83,37 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
77
83
|
|
|
78
84
|
_initializerDefineProperty(this, "gross_amount", _descriptor2, this);
|
|
79
85
|
|
|
80
|
-
_initializerDefineProperty(this, "
|
|
86
|
+
_initializerDefineProperty(this, "currency", _descriptor3, this);
|
|
87
|
+
|
|
88
|
+
_initializerDefineProperty(this, "email", _descriptor4, this);
|
|
81
89
|
|
|
82
|
-
_initializerDefineProperty(this, "user",
|
|
90
|
+
_initializerDefineProperty(this, "user", _descriptor5, this);
|
|
83
91
|
|
|
84
|
-
_initializerDefineProperty(this, "transactions",
|
|
92
|
+
_initializerDefineProperty(this, "transactions", _descriptor6, this);
|
|
85
93
|
|
|
86
|
-
_initializerDefineProperty(this, "applied_credit_notes",
|
|
94
|
+
_initializerDefineProperty(this, "applied_credit_notes", _descriptor7, this);
|
|
87
95
|
|
|
88
|
-
_initializerDefineProperty(this, "components",
|
|
96
|
+
_initializerDefineProperty(this, "components", _descriptor8, this);
|
|
89
97
|
|
|
90
|
-
_initializerDefineProperty(this, "organisation",
|
|
98
|
+
_initializerDefineProperty(this, "organisation", _descriptor9, this);
|
|
91
99
|
|
|
92
|
-
_initializerDefineProperty(this, "customer_name",
|
|
100
|
+
_initializerDefineProperty(this, "customer_name", _descriptor10, this);
|
|
93
101
|
|
|
94
|
-
_initializerDefineProperty(this, "booking_reference",
|
|
102
|
+
_initializerDefineProperty(this, "booking_reference", _descriptor11, this);
|
|
95
103
|
|
|
96
|
-
_initializerDefineProperty(this, "departure_date",
|
|
104
|
+
_initializerDefineProperty(this, "departure_date", _descriptor12, this);
|
|
97
105
|
|
|
98
|
-
_initializerDefineProperty(this, "return_date",
|
|
106
|
+
_initializerDefineProperty(this, "return_date", _descriptor13, this);
|
|
99
107
|
|
|
100
|
-
_initializerDefineProperty(this, "created_at",
|
|
108
|
+
_initializerDefineProperty(this, "created_at", _descriptor14, this);
|
|
101
109
|
|
|
102
|
-
_initializerDefineProperty(this, "updated_at",
|
|
110
|
+
_initializerDefineProperty(this, "updated_at", _descriptor15, this);
|
|
103
111
|
|
|
104
|
-
_initializerDefineProperty(this, "deleted_at",
|
|
112
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor16, this);
|
|
105
113
|
|
|
106
|
-
_initializerDefineProperty(this, "payment_links",
|
|
114
|
+
_initializerDefineProperty(this, "payment_links", _descriptor17, this);
|
|
107
115
|
|
|
108
|
-
_initializerDefineProperty(this, "is_temporary",
|
|
116
|
+
_initializerDefineProperty(this, "is_temporary", _descriptor18, this);
|
|
109
117
|
}
|
|
110
118
|
|
|
111
119
|
/**
|
|
@@ -123,6 +131,7 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
123
131
|
return_date: this.return_date,
|
|
124
132
|
email: this.email,
|
|
125
133
|
gross_amount: this.gross_amount,
|
|
134
|
+
currency: this.currency,
|
|
126
135
|
transactions: [],
|
|
127
136
|
components: [],
|
|
128
137
|
payment_links: [],
|
|
@@ -180,87 +189,94 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
180
189
|
enumerable: true,
|
|
181
190
|
writable: true,
|
|
182
191
|
initializer: null
|
|
183
|
-
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
192
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec4], {
|
|
193
|
+
configurable: true,
|
|
194
|
+
enumerable: true,
|
|
195
|
+
writable: true,
|
|
196
|
+
initializer: function () {
|
|
197
|
+
return _currency.DEFAULT_CURRENCY;
|
|
198
|
+
}
|
|
199
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec5], {
|
|
184
200
|
configurable: true,
|
|
185
201
|
enumerable: true,
|
|
186
202
|
writable: true,
|
|
187
203
|
initializer: function () {
|
|
188
204
|
return "";
|
|
189
205
|
}
|
|
190
|
-
}),
|
|
206
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec6, _dec7], {
|
|
191
207
|
configurable: true,
|
|
192
208
|
enumerable: true,
|
|
193
209
|
writable: true,
|
|
194
210
|
initializer: function () {
|
|
195
211
|
return _user.default;
|
|
196
212
|
}
|
|
197
|
-
}),
|
|
213
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "transactions", [_dec8], {
|
|
198
214
|
configurable: true,
|
|
199
215
|
enumerable: true,
|
|
200
216
|
writable: true,
|
|
201
217
|
initializer: null
|
|
202
|
-
}),
|
|
218
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "applied_credit_notes", [_dec9], {
|
|
203
219
|
configurable: true,
|
|
204
220
|
enumerable: true,
|
|
205
221
|
writable: true,
|
|
206
222
|
initializer: null
|
|
207
|
-
}),
|
|
223
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "components", [_dec10], {
|
|
208
224
|
configurable: true,
|
|
209
225
|
enumerable: true,
|
|
210
226
|
writable: true,
|
|
211
227
|
initializer: null
|
|
212
|
-
}),
|
|
228
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec11, _dec12], {
|
|
213
229
|
configurable: true,
|
|
214
230
|
enumerable: true,
|
|
215
231
|
writable: true,
|
|
216
232
|
initializer: function () {
|
|
217
233
|
return _organisation.default;
|
|
218
234
|
}
|
|
219
|
-
}),
|
|
235
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec13], {
|
|
220
236
|
configurable: true,
|
|
221
237
|
enumerable: true,
|
|
222
238
|
writable: true,
|
|
223
239
|
initializer: function () {
|
|
224
240
|
return "";
|
|
225
241
|
}
|
|
226
|
-
}),
|
|
242
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "booking_reference", [_dec14, _dec15], {
|
|
227
243
|
configurable: true,
|
|
228
244
|
enumerable: true,
|
|
229
245
|
writable: true,
|
|
230
246
|
initializer: function () {
|
|
231
247
|
return "";
|
|
232
248
|
}
|
|
233
|
-
}),
|
|
249
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "departure_date", [_dec16], {
|
|
234
250
|
configurable: true,
|
|
235
251
|
enumerable: true,
|
|
236
252
|
writable: true,
|
|
237
253
|
initializer: null
|
|
238
|
-
}),
|
|
254
|
+
}), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "return_date", [_dec17], {
|
|
239
255
|
configurable: true,
|
|
240
256
|
enumerable: true,
|
|
241
257
|
writable: true,
|
|
242
258
|
initializer: null
|
|
243
|
-
}),
|
|
259
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec18], {
|
|
244
260
|
configurable: true,
|
|
245
261
|
enumerable: true,
|
|
246
262
|
writable: true,
|
|
247
263
|
initializer: null
|
|
248
|
-
}),
|
|
264
|
+
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec19], {
|
|
249
265
|
configurable: true,
|
|
250
266
|
enumerable: true,
|
|
251
267
|
writable: true,
|
|
252
268
|
initializer: null
|
|
253
|
-
}),
|
|
269
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec20], {
|
|
254
270
|
configurable: true,
|
|
255
271
|
enumerable: true,
|
|
256
272
|
writable: true,
|
|
257
273
|
initializer: null
|
|
258
|
-
}),
|
|
274
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "payment_links", [_dec21], {
|
|
259
275
|
configurable: true,
|
|
260
276
|
enumerable: true,
|
|
261
277
|
writable: true,
|
|
262
278
|
initializer: null
|
|
263
|
-
}),
|
|
279
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class2.prototype, "is_temporary", [_dec22], {
|
|
264
280
|
configurable: true,
|
|
265
281
|
enumerable: true,
|
|
266
282
|
writable: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bookingCurrency1676565874446 {
|
|
4
|
+
name = 'bookingCurrency1676565874446'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "currency" character varying(3) NOT NULL DEFAULT 'GBX'`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "currency"`);
|
|
12
|
+
}
|
|
13
|
+
}
|