@felloh-org/lambda-wrapper 1.11.0 → 1.11.1
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.
|
@@ -9,7 +9,9 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _paymentProvider = _interopRequireDefault(require("../../payment/payment-provider"));
|
|
11
11
|
|
|
12
|
-
var
|
|
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;
|
|
13
15
|
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
@@ -37,9 +39,12 @@ let Batch = (_dec = (0, _typeorm.Entity)({
|
|
|
37
39
|
}), _dec7 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
38
40
|
name: 'payment_provider_id',
|
|
39
41
|
referencedColumnName: 'id'
|
|
40
|
-
}), _dec9 = (0, _typeorm.
|
|
42
|
+
}), _dec9 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec10 = (0, _typeorm.JoinColumn)({
|
|
43
|
+
name: 'organisation_id',
|
|
44
|
+
referencedColumnName: 'id'
|
|
45
|
+
}), _dec11 = (0, _typeorm.CreateDateColumn)({
|
|
41
46
|
type: 'timestamp with time zone'
|
|
42
|
-
}),
|
|
47
|
+
}), _dec12 = (0, _typeorm.UpdateDateColumn)({
|
|
43
48
|
type: 'timestamp with time zone'
|
|
44
49
|
}), _dec(_class = (_class2 = class Batch {
|
|
45
50
|
constructor() {
|
|
@@ -55,9 +60,11 @@ let Batch = (_dec = (0, _typeorm.Entity)({
|
|
|
55
60
|
|
|
56
61
|
_initializerDefineProperty(this, "payment_provider", _descriptor6, this);
|
|
57
62
|
|
|
58
|
-
_initializerDefineProperty(this, "
|
|
63
|
+
_initializerDefineProperty(this, "organisation", _descriptor7, this);
|
|
59
64
|
|
|
60
|
-
_initializerDefineProperty(this, "
|
|
65
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "updated_at", _descriptor9, this);
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -94,12 +101,19 @@ let Batch = (_dec = (0, _typeorm.Entity)({
|
|
|
94
101
|
initializer: function () {
|
|
95
102
|
return _paymentProvider.default;
|
|
96
103
|
}
|
|
97
|
-
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
104
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec9, _dec10], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: function () {
|
|
109
|
+
return _organisation.default;
|
|
110
|
+
}
|
|
111
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec11], {
|
|
98
112
|
configurable: true,
|
|
99
113
|
enumerable: true,
|
|
100
114
|
writable: true,
|
|
101
115
|
initializer: null
|
|
102
|
-
}),
|
|
116
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec12], {
|
|
103
117
|
configurable: true,
|
|
104
118
|
enumerable: true,
|
|
105
119
|
writable: true,
|
|
@@ -11,7 +11,11 @@ var _transaction = _interopRequireDefault(require("../../payment/transaction"));
|
|
|
11
11
|
|
|
12
12
|
var _paymentProvider = _interopRequireDefault(require("../../payment/payment-provider"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _batch = _interopRequireDefault(require("../batch"));
|
|
15
|
+
|
|
16
|
+
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
17
|
+
|
|
18
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
15
19
|
|
|
16
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
21
|
|
|
@@ -29,33 +33,43 @@ let TransactionSettlement = (_dec = (0, _typeorm.Entity)({
|
|
|
29
33
|
}), _dec3 = (0, _typeorm.JoinColumn)({
|
|
30
34
|
name: 'transaction_id',
|
|
31
35
|
referencedColumnName: 'id'
|
|
32
|
-
}), _dec4 = (0, _typeorm.
|
|
36
|
+
}), _dec4 = (0, _typeorm.ManyToOne)(() => _batch.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
37
|
+
name: 'batch_id',
|
|
38
|
+
referencedColumnName: 'id'
|
|
39
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
33
40
|
type: "int",
|
|
34
41
|
nullable: true
|
|
35
|
-
}),
|
|
42
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
36
43
|
type: "varchar",
|
|
37
44
|
length: "5",
|
|
38
45
|
nullable: true
|
|
39
|
-
}),
|
|
46
|
+
}), _dec8 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec9 = (0, _typeorm.JoinColumn)({
|
|
40
47
|
name: 'payment_provider_id',
|
|
41
48
|
referencedColumnName: 'id'
|
|
42
|
-
}),
|
|
49
|
+
}), _dec10 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec11 = (0, _typeorm.JoinColumn)({
|
|
50
|
+
name: 'organisation_id',
|
|
51
|
+
referencedColumnName: 'id'
|
|
52
|
+
}), _dec12 = (0, _typeorm.CreateDateColumn)({
|
|
43
53
|
type: 'timestamp with time zone'
|
|
44
|
-
}),
|
|
54
|
+
}), _dec13 = (0, _typeorm.UpdateDateColumn)({
|
|
45
55
|
type: 'timestamp with time zone'
|
|
46
56
|
}), _dec(_class = (_class2 = class TransactionSettlement {
|
|
47
57
|
constructor() {
|
|
48
58
|
_initializerDefineProperty(this, "transaction", _descriptor, this);
|
|
49
59
|
|
|
50
|
-
_initializerDefineProperty(this, "
|
|
60
|
+
_initializerDefineProperty(this, "batch_id", _descriptor2, this);
|
|
51
61
|
|
|
52
|
-
_initializerDefineProperty(this, "
|
|
62
|
+
_initializerDefineProperty(this, "amount", _descriptor3, this);
|
|
53
63
|
|
|
54
|
-
_initializerDefineProperty(this, "
|
|
64
|
+
_initializerDefineProperty(this, "currency", _descriptor4, this);
|
|
55
65
|
|
|
56
|
-
_initializerDefineProperty(this, "
|
|
66
|
+
_initializerDefineProperty(this, "payment_provider", _descriptor5, this);
|
|
57
67
|
|
|
58
|
-
_initializerDefineProperty(this, "
|
|
68
|
+
_initializerDefineProperty(this, "organisation", _descriptor6, this);
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(this, "created_at", _descriptor7, this);
|
|
71
|
+
|
|
72
|
+
_initializerDefineProperty(this, "updated_at", _descriptor8, this);
|
|
59
73
|
}
|
|
60
74
|
|
|
61
75
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
|
|
@@ -65,29 +79,43 @@ let TransactionSettlement = (_dec = (0, _typeorm.Entity)({
|
|
|
65
79
|
initializer: function () {
|
|
66
80
|
return _transaction.default;
|
|
67
81
|
}
|
|
68
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
82
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "batch_id", [_dec4, _dec5], {
|
|
83
|
+
configurable: true,
|
|
84
|
+
enumerable: true,
|
|
85
|
+
writable: true,
|
|
86
|
+
initializer: function () {
|
|
87
|
+
return _batch.default;
|
|
88
|
+
}
|
|
89
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec6], {
|
|
69
90
|
configurable: true,
|
|
70
91
|
enumerable: true,
|
|
71
92
|
writable: true,
|
|
72
93
|
initializer: null
|
|
73
|
-
}),
|
|
94
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec7], {
|
|
74
95
|
configurable: true,
|
|
75
96
|
enumerable: true,
|
|
76
97
|
writable: true,
|
|
77
98
|
initializer: null
|
|
78
|
-
}),
|
|
99
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "payment_provider", [_dec8, _dec9], {
|
|
79
100
|
configurable: true,
|
|
80
101
|
enumerable: true,
|
|
81
102
|
writable: true,
|
|
82
103
|
initializer: function () {
|
|
83
104
|
return _paymentProvider.default;
|
|
84
105
|
}
|
|
85
|
-
}),
|
|
106
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec10, _dec11], {
|
|
107
|
+
configurable: true,
|
|
108
|
+
enumerable: true,
|
|
109
|
+
writable: true,
|
|
110
|
+
initializer: function () {
|
|
111
|
+
return _organisation.default;
|
|
112
|
+
}
|
|
113
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
|
|
86
114
|
configurable: true,
|
|
87
115
|
enumerable: true,
|
|
88
116
|
writable: true,
|
|
89
117
|
initializer: null
|
|
90
|
-
}),
|
|
118
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec13], {
|
|
91
119
|
configurable: true,
|
|
92
120
|
enumerable: true,
|
|
93
121
|
writable: true,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class acquirerBatchRelation1686833169652 {
|
|
4
|
+
name = 'acquirerBatchRelation1686833169652'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" ADD "organisation_id" character varying(150)`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD "batch_id" character varying`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD "organisation_id" character varying(150)`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" ADD CONSTRAINT "FK_be6ea19f24fb878c24f04043da0" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD CONSTRAINT "FK_e5f5c6ae81f4acd53677a6dd01c" FOREIGN KEY ("batch_id") REFERENCES "acquirer"."batch"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" ADD CONSTRAINT "FK_e2bc1de8a9686ca4e34738fe429" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async down(queryRunner) {
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP CONSTRAINT "FK_e2bc1de8a9686ca4e34738fe429"`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP CONSTRAINT "FK_e5f5c6ae81f4acd53677a6dd01c"`);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" DROP CONSTRAINT "FK_be6ea19f24fb878c24f04043da0"`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP COLUMN "organisation_id"`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."transaction_settlement" DROP COLUMN "batch_id"`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "acquirer"."batch" DROP COLUMN "organisation_id"`);
|
|
22
|
+
}
|
|
23
|
+
}
|