@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.
Files changed (29) hide show
  1. package/dist/entity/agent-data/booking/index.js +92 -4
  2. package/dist/entity/agent-data/index.js +5 -5
  3. package/dist/entity/agent-data/{customer → supplier}/index.js +4 -4
  4. package/dist/entity/agent-data/{organisation-supplier → supplier-type}/index.js +4 -4
  5. package/dist/entity/payment/index.js +7 -1
  6. package/dist/entity/payment/payment-link/index.js +126 -4
  7. package/dist/entity/payment/transaction/index.js +115 -4
  8. package/dist/entity/payment/transaction-event/index.js +37 -5
  9. package/dist/entity/{agent-data/organisation-supplier-type → payment/transaction-event-type}/index.js +5 -5
  10. package/dist/entity/payment/transaction-metadata/index.js +140 -0
  11. package/dist/entity/payment/transaction-method/index.js +1 -1
  12. package/dist/entity/payment/transaction-status/index.js +1 -1
  13. package/dist/entity/payment/transaction-type/index.js +39 -0
  14. package/dist/entity/user/user/index.js +10 -3
  15. package/dist/index.js +49 -27
  16. package/dist/migration/agent-data/1642121041760-inital.js +0 -2
  17. package/dist/migration/agent-data/1642121610577-organisation-suppliers.js +2 -2
  18. package/dist/migration/agent-data/1642121681610-organisation-suppliers-type.js +2 -2
  19. package/dist/migration/agent-data/1642505882721-booking-fields.js +29 -0
  20. package/dist/migration/agent-data/1642508385880-booking-id.js +19 -0
  21. package/dist/migration/{1642370449589-transaction.js → nuapay/1642370449589-transaction.js} +0 -0
  22. package/dist/migration/payment/1642514728358-payment-link-updates.js +39 -0
  23. package/dist/migration/payment/1642516017835-payment-link-add-booking.js +15 -0
  24. package/dist/migration/payment/1642519453365-transaction.js +63 -0
  25. package/dist/migration/payment/1642520774562-transaction-payment-link.js +15 -0
  26. package/dist/migration/payment/1642533711013-transaction-metadata.js +15 -0
  27. package/dist/migration/payment/1642540883807-transaction-event.js +27 -0
  28. package/dist/service/warehouse.js +1 -1
  29. package/package.json +1 -1
@@ -7,7 +7,13 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _user = _interopRequireDefault(require("../../user/user"));
11
+
12
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
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;
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
17
 
12
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 }); }
13
19
 
@@ -18,19 +24,101 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
24
  let Booking = (_dec = (0, _typeorm.Entity)({
19
25
  name: 'booking',
20
26
  schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Booking {
27
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
28
+ type: "varchar",
29
+ length: "150"
30
+ }), _dec4 = (0, _typeorm.ManyToOne)(() => _user.default), _dec5 = (0, _typeorm.JoinColumn)({
31
+ name: 'user_id',
32
+ referencedColumnName: 'id'
33
+ }), _dec6 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec7 = (0, _typeorm.JoinColumn)({
34
+ name: 'organisation_id',
35
+ referencedColumnName: 'id'
36
+ }), _dec8 = (0, _typeorm.Column)({
37
+ type: "varchar",
38
+ length: "150"
39
+ }), _dec9 = (0, _typeorm.Column)({
40
+ type: "varchar",
41
+ length: "150"
42
+ }), _dec10 = (0, _typeorm.Column)({
43
+ type: "date",
44
+ nullable: true
45
+ }), _dec11 = (0, _typeorm.Column)({
46
+ type: "date",
47
+ nullable: true
48
+ }), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Booking {
22
49
  constructor() {
23
50
  _initializerDefineProperty(this, "id", _descriptor, this);
24
51
 
25
- _initializerDefineProperty(this, "created_at", _descriptor2, this);
52
+ _initializerDefineProperty(this, "email", _descriptor2, this);
53
+
54
+ _initializerDefineProperty(this, "user", _descriptor3, this);
55
+
56
+ _initializerDefineProperty(this, "organisation", _descriptor4, this);
57
+
58
+ _initializerDefineProperty(this, "customer_name", _descriptor5, this);
59
+
60
+ _initializerDefineProperty(this, "booking_reference", _descriptor6, this);
61
+
62
+ _initializerDefineProperty(this, "departure_date", _descriptor7, this);
63
+
64
+ _initializerDefineProperty(this, "return_date", _descriptor8, this);
65
+
66
+ _initializerDefineProperty(this, "created_at", _descriptor9, this);
26
67
  }
27
68
 
28
69
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
70
+ configurable: true,
71
+ enumerable: true,
72
+ writable: true,
73
+ initializer: function () {
74
+ return undefined;
75
+ }
76
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec3], {
77
+ configurable: true,
78
+ enumerable: true,
79
+ writable: true,
80
+ initializer: function () {
81
+ return "";
82
+ }
83
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec4, _dec5], {
84
+ configurable: true,
85
+ enumerable: true,
86
+ writable: true,
87
+ initializer: function () {
88
+ return _user.default;
89
+ }
90
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec6, _dec7], {
91
+ configurable: true,
92
+ enumerable: true,
93
+ writable: true,
94
+ initializer: function () {
95
+ return _organisation.default;
96
+ }
97
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec8], {
98
+ configurable: true,
99
+ enumerable: true,
100
+ writable: true,
101
+ initializer: function () {
102
+ return "";
103
+ }
104
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "booking_reference", [_dec9], {
105
+ configurable: true,
106
+ enumerable: true,
107
+ writable: true,
108
+ initializer: function () {
109
+ return "";
110
+ }
111
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "departure_date", [_dec10], {
112
+ configurable: true,
113
+ enumerable: true,
114
+ writable: true,
115
+ initializer: null
116
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "return_date", [_dec11], {
29
117
  configurable: true,
30
118
  enumerable: true,
31
119
  writable: true,
32
120
  initializer: null
33
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
121
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
34
122
  configurable: true,
35
123
  enumerable: true,
36
124
  writable: true,
@@ -7,18 +7,18 @@ exports.default = void 0;
7
7
 
8
8
  var _booking = _interopRequireDefault(require("./booking"));
9
9
 
10
- var _customer = _interopRequireDefault(require("./customer"));
11
-
12
10
  var _bookingComponent = _interopRequireDefault(require("./booking-component"));
13
11
 
14
12
  var _bookingComponentType = _interopRequireDefault(require("./booking-component-type"));
15
13
 
16
- var _organisationSupplier = _interopRequireDefault(require("./organisation-supplier"));
14
+ var _supplier = _interopRequireDefault(require("./supplier"));
15
+
16
+ var _supplierType = _interopRequireDefault(require("./supplier-type"));
17
17
 
18
- var _organisationSupplierType = _interopRequireDefault(require("./organisation-supplier-type"));
18
+ var _transactionEvent = _interopRequireDefault(require("../payment/transaction-event"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const ENTITIES = [_booking.default, _customer.default, _bookingComponent.default, _bookingComponentType.default, _organisationSupplier.default, _organisationSupplierType.default];
22
+ const ENTITIES = [_booking.default, _bookingComponent.default, _bookingComponentType.default, _supplier.default, _supplierType.default, _transactionEvent.default];
23
23
  var _default = ENTITIES;
24
24
  exports.default = _default;
@@ -15,10 +15,10 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
15
15
 
16
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
17
 
18
- let Customer = (_dec = (0, _typeorm.Entity)({
19
- name: 'customer',
18
+ let Supplier = (_dec = (0, _typeorm.Entity)({
19
+ name: 'supplier',
20
20
  schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Customer {
21
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Supplier {
22
22
  constructor() {
23
23
  _initializerDefineProperty(this, "id", _descriptor, this);
24
24
 
@@ -36,4 +36,4 @@ let Customer = (_dec = (0, _typeorm.Entity)({
36
36
  writable: true,
37
37
  initializer: null
38
38
  })), _class2)) || _class);
39
- exports.default = Customer;
39
+ exports.default = Supplier;
@@ -15,10 +15,10 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
15
15
 
16
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
17
 
18
- let OrganisationSupplier = (_dec = (0, _typeorm.Entity)({
19
- name: 'organisation_supplier',
18
+ let SupplierType = (_dec = (0, _typeorm.Entity)({
19
+ name: 'supplier_type',
20
20
  schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationSupplier {
21
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class SupplierType {
22
22
  constructor() {
23
23
  _initializerDefineProperty(this, "id", _descriptor, this);
24
24
 
@@ -36,4 +36,4 @@ let OrganisationSupplier = (_dec = (0, _typeorm.Entity)({
36
36
  writable: true,
37
37
  initializer: null
38
38
  })), _class2)) || _class);
39
- exports.default = OrganisationSupplier;
39
+ exports.default = SupplierType;
@@ -11,12 +11,18 @@ var _transaction = _interopRequireDefault(require("./transaction"));
11
11
 
12
12
  var _transactionEvent = _interopRequireDefault(require("./transaction-event"));
13
13
 
14
+ var _transactionEventType = _interopRequireDefault(require("./transaction-event-type"));
15
+
14
16
  var _transactionMethod = _interopRequireDefault(require("./transaction-method"));
15
17
 
16
18
  var _transactionStatus = _interopRequireDefault(require("./transaction-status"));
17
19
 
20
+ var _transactionType = _interopRequireDefault(require("./transaction-type"));
21
+
22
+ var _transactionMetadata = _interopRequireDefault(require("./transaction-metadata"));
23
+
18
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
25
 
20
- const ENTITIES = [_paymentLink.default, _transaction.default, _transactionEvent.default, _transactionMethod.default, _transactionStatus.default];
26
+ const ENTITIES = [_paymentLink.default, _transaction.default, _transactionEvent.default, _transactionEventType.default, _transactionMethod.default, _transactionStatus.default, _transactionType.default, _transactionMetadata.default];
21
27
  var _default = ENTITIES;
22
28
  exports.default = _default;
@@ -7,7 +7,15 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
11
+
12
+ var _user = _interopRequireDefault(require("../../user/user"));
13
+
14
+ var _booking = _interopRequireDefault(require("../../agent-data/booking"));
15
+
16
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
19
 
12
20
  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
21
 
@@ -18,19 +26,133 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
26
  let PaymentLink = (_dec = (0, _typeorm.Entity)({
19
27
  name: 'payment_Link',
20
28
  schema: 'payment'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLink {
29
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _booking.default, {
30
+ nullable: true
31
+ }), _dec4 = (0, _typeorm.JoinColumn)({
32
+ name: 'booking_id',
33
+ referencedColumnName: 'id'
34
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _user.default), _dec6 = (0, _typeorm.JoinColumn)({
35
+ name: 'user_id',
36
+ referencedColumnName: 'id'
37
+ }), _dec7 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec8 = (0, _typeorm.JoinColumn)({
38
+ name: 'organisation_id',
39
+ referencedColumnName: 'id'
40
+ }), _dec9 = (0, _typeorm.Column)({
41
+ type: "int"
42
+ }), _dec10 = (0, _typeorm.Column)({
43
+ type: "varchar",
44
+ length: "250"
45
+ }), _dec11 = (0, _typeorm.Column)({
46
+ type: "varchar",
47
+ length: "200"
48
+ }), _dec12 = (0, _typeorm.Column)({
49
+ type: "varchar",
50
+ length: "200"
51
+ }), _dec13 = (0, _typeorm.Column)({
52
+ type: "varchar",
53
+ length: "200"
54
+ }), _dec14 = (0, _typeorm.Column)({
55
+ type: "timestamp with time zone"
56
+ }), _dec15 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class PaymentLink {
22
57
  constructor() {
23
58
  _initializerDefineProperty(this, "id", _descriptor, this);
24
59
 
25
- _initializerDefineProperty(this, "created_at", _descriptor2, this);
60
+ _initializerDefineProperty(this, "booking", _descriptor2, this);
61
+
62
+ _initializerDefineProperty(this, "user", _descriptor3, this);
63
+
64
+ _initializerDefineProperty(this, "organisation", _descriptor4, this);
65
+
66
+ _initializerDefineProperty(this, "amount", _descriptor5, this);
67
+
68
+ _initializerDefineProperty(this, "description", _descriptor6, this);
69
+
70
+ _initializerDefineProperty(this, "success_url", _descriptor7, this);
71
+
72
+ _initializerDefineProperty(this, "failure_url", _descriptor8, this);
73
+
74
+ _initializerDefineProperty(this, "cancel_url", _descriptor9, this);
75
+
76
+ _initializerDefineProperty(this, "expires_at", _descriptor10, this);
77
+
78
+ _initializerDefineProperty(this, "created_at", _descriptor11, this);
79
+ }
80
+
81
+ generateExpiryDate() {
82
+ let date = new Date();
83
+ date.setDate(date.getDate() + 30);
84
+ return date;
26
85
  }
27
86
 
28
87
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
88
+ configurable: true,
89
+ enumerable: true,
90
+ writable: true,
91
+ initializer: function () {
92
+ return undefined;
93
+ }
94
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "booking", [_dec3, _dec4], {
95
+ configurable: true,
96
+ enumerable: true,
97
+ writable: true,
98
+ initializer: function () {
99
+ return _booking.default;
100
+ }
101
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec5, _dec6], {
102
+ configurable: true,
103
+ enumerable: true,
104
+ writable: true,
105
+ initializer: function () {
106
+ return _user.default;
107
+ }
108
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec7, _dec8], {
109
+ configurable: true,
110
+ enumerable: true,
111
+ writable: true,
112
+ initializer: function () {
113
+ return _organisation.default;
114
+ }
115
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec9], {
29
116
  configurable: true,
30
117
  enumerable: true,
31
118
  writable: true,
32
119
  initializer: null
33
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
120
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec10], {
121
+ configurable: true,
122
+ enumerable: true,
123
+ writable: true,
124
+ initializer: function () {
125
+ return "";
126
+ }
127
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "success_url", [_dec11], {
128
+ configurable: true,
129
+ enumerable: true,
130
+ writable: true,
131
+ initializer: function () {
132
+ return "";
133
+ }
134
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "failure_url", [_dec12], {
135
+ configurable: true,
136
+ enumerable: true,
137
+ writable: true,
138
+ initializer: function () {
139
+ return "";
140
+ }
141
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "cancel_url", [_dec13], {
142
+ configurable: true,
143
+ enumerable: true,
144
+ writable: true,
145
+ initializer: function () {
146
+ return "";
147
+ }
148
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "expires_at", [_dec14], {
149
+ configurable: true,
150
+ enumerable: true,
151
+ writable: true,
152
+ initializer: function () {
153
+ return this.generateExpiryDate();
154
+ }
155
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec15], {
34
156
  configurable: true,
35
157
  enumerable: true,
36
158
  writable: true,
@@ -7,7 +7,21 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _booking = _interopRequireDefault(require("../../agent-data/booking"));
11
+
12
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
+
14
+ var _transactionType = _interopRequireDefault(require("../transaction-type"));
15
+
16
+ var _transactionMethod = _interopRequireDefault(require("../transaction-method"));
17
+
18
+ var _transactionStatus = _interopRequireDefault(require("../transaction-status"));
19
+
20
+ var _paymentLink = _interopRequireDefault(require("../payment-link"));
21
+
22
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
23
+
24
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
25
 
12
26
  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
27
 
@@ -18,19 +32,116 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
32
  let Transaction = (_dec = (0, _typeorm.Entity)({
19
33
  name: 'transaction',
20
34
  schema: 'payment'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Transaction {
35
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
36
+ type: "int"
37
+ }), _dec4 = (0, _typeorm.ManyToOne)(() => _booking.default, {
38
+ nullable: true
39
+ }), _dec5 = (0, _typeorm.JoinColumn)({
40
+ name: 'booking_id',
41
+ referencedColumnName: 'id'
42
+ }), _dec6 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec7 = (0, _typeorm.JoinColumn)({
43
+ name: 'organisation_id',
44
+ referencedColumnName: 'id'
45
+ }), _dec8 = (0, _typeorm.ManyToOne)(() => _transactionStatus.default), _dec9 = (0, _typeorm.JoinColumn)({
46
+ name: 'status_id',
47
+ referencedColumnName: 'id'
48
+ }), _dec10 = (0, _typeorm.ManyToOne)(() => _transactionMethod.default), _dec11 = (0, _typeorm.JoinColumn)({
49
+ name: 'method_id',
50
+ referencedColumnName: 'id'
51
+ }), _dec12 = (0, _typeorm.ManyToOne)(() => _transactionType.default), _dec13 = (0, _typeorm.JoinColumn)({
52
+ name: 'type_id',
53
+ referencedColumnName: 'id'
54
+ }), _dec14 = (0, _typeorm.ManyToOne)(() => _paymentLink.default, {
55
+ nullable: true
56
+ }), _dec15 = (0, _typeorm.JoinColumn)({
57
+ name: 'payment_link_id',
58
+ referencedColumnName: 'id'
59
+ }), _dec16 = (0, _typeorm.Column)({
60
+ type: "timestamp with time zone",
61
+ nullable: true
62
+ }), _dec17 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Transaction {
22
63
  constructor() {
23
64
  _initializerDefineProperty(this, "id", _descriptor, this);
24
65
 
25
- _initializerDefineProperty(this, "created_at", _descriptor2, this);
66
+ _initializerDefineProperty(this, "amount", _descriptor2, this);
67
+
68
+ _initializerDefineProperty(this, "booking", _descriptor3, this);
69
+
70
+ _initializerDefineProperty(this, "organisation", _descriptor4, this);
71
+
72
+ _initializerDefineProperty(this, "status", _descriptor5, this);
73
+
74
+ _initializerDefineProperty(this, "method", _descriptor6, this);
75
+
76
+ _initializerDefineProperty(this, "type", _descriptor7, this);
77
+
78
+ _initializerDefineProperty(this, "payment_link", _descriptor8, this);
79
+
80
+ _initializerDefineProperty(this, "completed_at", _descriptor9, this);
81
+
82
+ _initializerDefineProperty(this, "created_at", _descriptor10, this);
26
83
  }
27
84
 
28
85
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
86
+ configurable: true,
87
+ enumerable: true,
88
+ writable: true,
89
+ initializer: function () {
90
+ return undefined;
91
+ }
92
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec3], {
93
+ configurable: true,
94
+ enumerable: true,
95
+ writable: true,
96
+ initializer: null
97
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "booking", [_dec4, _dec5], {
98
+ configurable: true,
99
+ enumerable: true,
100
+ writable: true,
101
+ initializer: function () {
102
+ return _booking.default;
103
+ }
104
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec6, _dec7], {
105
+ configurable: true,
106
+ enumerable: true,
107
+ writable: true,
108
+ initializer: function () {
109
+ return _organisation.default;
110
+ }
111
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec8, _dec9], {
112
+ configurable: true,
113
+ enumerable: true,
114
+ writable: true,
115
+ initializer: function () {
116
+ return _transactionStatus.default;
117
+ }
118
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "method", [_dec10, _dec11], {
119
+ configurable: true,
120
+ enumerable: true,
121
+ writable: true,
122
+ initializer: function () {
123
+ return _transactionMethod.default;
124
+ }
125
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "type", [_dec12, _dec13], {
126
+ configurable: true,
127
+ enumerable: true,
128
+ writable: true,
129
+ initializer: function () {
130
+ return _transactionType.default;
131
+ }
132
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "payment_link", [_dec14, _dec15], {
133
+ configurable: true,
134
+ enumerable: true,
135
+ writable: true,
136
+ initializer: function () {
137
+ return _paymentLink.default;
138
+ }
139
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec16], {
29
140
  configurable: true,
30
141
  enumerable: true,
31
142
  writable: true,
32
143
  initializer: null
33
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
144
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec17], {
34
145
  configurable: true,
35
146
  enumerable: true,
36
147
  writable: true,
@@ -7,7 +7,13 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _transactionEventType = _interopRequireDefault(require("../transaction-event-type"));
11
+
12
+ var _transaction = _interopRequireDefault(require("../transaction"));
13
+
14
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
17
 
12
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 }); }
13
19
 
@@ -18,19 +24,45 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
18
24
  let TransactionEvent = (_dec = (0, _typeorm.Entity)({
19
25
  name: 'transaction_event',
20
26
  schema: 'payment'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionEvent {
27
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.ManyToOne)(() => _transaction.default), _dec4 = (0, _typeorm.JoinColumn)({
28
+ name: 'transaction_id',
29
+ referencedColumnName: 'id'
30
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _transactionEventType.default), _dec6 = (0, _typeorm.JoinColumn)({
31
+ name: 'event_type_id',
32
+ referencedColumnName: 'id'
33
+ }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionEvent {
22
34
  constructor() {
23
35
  _initializerDefineProperty(this, "id", _descriptor, this);
24
36
 
25
- _initializerDefineProperty(this, "created_at", _descriptor2, this);
37
+ _initializerDefineProperty(this, "transaction", _descriptor2, this);
38
+
39
+ _initializerDefineProperty(this, "event_type", _descriptor3, this);
40
+
41
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
26
42
  }
27
43
 
28
44
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
29
45
  configurable: true,
30
46
  enumerable: true,
31
47
  writable: true,
32
- initializer: null
33
- }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec3], {
48
+ initializer: function () {
49
+ return undefined;
50
+ }
51
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec3, _dec4], {
52
+ configurable: true,
53
+ enumerable: true,
54
+ writable: true,
55
+ initializer: function () {
56
+ return _transaction.default;
57
+ }
58
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "event_type", [_dec5, _dec6], {
59
+ configurable: true,
60
+ enumerable: true,
61
+ writable: true,
62
+ initializer: function () {
63
+ return _transactionEventType.default;
64
+ }
65
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
34
66
  configurable: true,
35
67
  enumerable: true,
36
68
  writable: true,
@@ -15,10 +15,10 @@ function _applyDecoratedDescriptor(target, property, decorators, descriptor, con
15
15
 
16
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
17
 
18
- let OrganisationSupplierType = (_dec = (0, _typeorm.Entity)({
19
- name: 'organisation_supplier_type',
20
- schema: 'agent_data'
21
- }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationSupplierType {
18
+ let TransactionEventType = (_dec = (0, _typeorm.Entity)({
19
+ name: 'transaction_event_type',
20
+ schema: 'payment'
21
+ }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class TransactionEventType {
22
22
  constructor() {
23
23
  _initializerDefineProperty(this, "id", _descriptor, this);
24
24
 
@@ -36,4 +36,4 @@ let OrganisationSupplierType = (_dec = (0, _typeorm.Entity)({
36
36
  writable: true,
37
37
  initializer: null
38
38
  })), _class2)) || _class);
39
- exports.default = OrganisationSupplierType;
39
+ exports.default = TransactionEventType;