@felloh-org/lambda-wrapper 1.1.34 → 1.1.37
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/bank/adjustment/index.js +141 -0
- package/dist/entity/bank/amendment/index.js +52 -12
- package/dist/entity/bank/index.js +5 -1
- package/dist/entity/bank/vendor/index.js +57 -0
- package/dist/index.js +18 -2
- package/dist/migration/1657630420519-amendment_undertaken_at.js +12 -0
- package/dist/migration/1657630681583-vendor.js +17 -0
- package/dist/migration/1657631323026-ammed_supplier_ref.js +12 -0
- package/dist/migration/1657711121280-adjustment.js +17 -0
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
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 _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
11
|
+
|
|
12
|
+
var _vendor = _interopRequireDefault(require("../vendor"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
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 Adjustment = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'adjustment',
|
|
26
|
+
schema: 'bank'
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
28
|
+
type: "int"
|
|
29
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
30
|
+
type: "varchar",
|
|
31
|
+
length: "250",
|
|
32
|
+
nullable: true
|
|
33
|
+
}), _dec5 = (0, _typeorm.ManyToOne)(() => _organisation.default, {
|
|
34
|
+
nullable: true
|
|
35
|
+
}), _dec6 = (0, _typeorm.JoinColumn)({
|
|
36
|
+
name: 'organisation_id',
|
|
37
|
+
referencedColumnName: 'id'
|
|
38
|
+
}), _dec7 = (0, _typeorm.ManyToOne)(() => _vendor.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
39
|
+
name: 'vendor_id',
|
|
40
|
+
referencedColumnName: 'id'
|
|
41
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
42
|
+
type: "varchar",
|
|
43
|
+
length: "1024",
|
|
44
|
+
nullable: true
|
|
45
|
+
}), _dec10 = (0, _typeorm.CreateDateColumn)({
|
|
46
|
+
type: 'timestamp with time zone'
|
|
47
|
+
}), _dec11 = (0, _typeorm.UpdateDateColumn)({
|
|
48
|
+
type: 'timestamp with time zone'
|
|
49
|
+
}), _dec(_class = (_class2 = class Adjustment {
|
|
50
|
+
constructor() {
|
|
51
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
52
|
+
|
|
53
|
+
_initializerDefineProperty(this, "amount", _descriptor2, this);
|
|
54
|
+
|
|
55
|
+
_initializerDefineProperty(this, "vendor_reference", _descriptor3, this);
|
|
56
|
+
|
|
57
|
+
_initializerDefineProperty(this, "organisation", _descriptor4, this);
|
|
58
|
+
|
|
59
|
+
_initializerDefineProperty(this, "vendor", _descriptor5, this);
|
|
60
|
+
|
|
61
|
+
_initializerDefineProperty(this, "description", _descriptor6, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "created_at", _descriptor7, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "updated_at", _descriptor8, this);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
getPublicData() {
|
|
69
|
+
const response = {
|
|
70
|
+
id: this.id,
|
|
71
|
+
amount: this.amount,
|
|
72
|
+
vendor_reference: this.vendor_reference,
|
|
73
|
+
description: this.description,
|
|
74
|
+
created_at: this.created_at,
|
|
75
|
+
updated_at: this.updated_at,
|
|
76
|
+
vendor: this.vendor
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
if (typeof this.vendor !== 'undefined' && this.vendor !== null && typeof this.vendor.getPublicData === 'function') {
|
|
80
|
+
response.vendor = this.organisation.getPublicData();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (typeof this.organisation !== 'undefined' && this.organisation !== null && typeof this.organisation.getPublicCompactData === 'function') {
|
|
84
|
+
response.organisation = this.organisation.getPublicCompactData();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return response;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
91
|
+
configurable: true,
|
|
92
|
+
enumerable: true,
|
|
93
|
+
writable: true,
|
|
94
|
+
initializer: function () {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec3], {
|
|
98
|
+
configurable: true,
|
|
99
|
+
enumerable: true,
|
|
100
|
+
writable: true,
|
|
101
|
+
initializer: null
|
|
102
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "vendor_reference", [_dec4], {
|
|
103
|
+
configurable: true,
|
|
104
|
+
enumerable: true,
|
|
105
|
+
writable: true,
|
|
106
|
+
initializer: function () {
|
|
107
|
+
return "";
|
|
108
|
+
}
|
|
109
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec5, _dec6], {
|
|
110
|
+
configurable: true,
|
|
111
|
+
enumerable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
initializer: function () {
|
|
114
|
+
return _organisation.default;
|
|
115
|
+
}
|
|
116
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "vendor", [_dec7, _dec8], {
|
|
117
|
+
configurable: true,
|
|
118
|
+
enumerable: true,
|
|
119
|
+
writable: true,
|
|
120
|
+
initializer: function () {
|
|
121
|
+
return _vendor.default;
|
|
122
|
+
}
|
|
123
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec9], {
|
|
124
|
+
configurable: true,
|
|
125
|
+
enumerable: true,
|
|
126
|
+
writable: true,
|
|
127
|
+
initializer: function () {
|
|
128
|
+
return "";
|
|
129
|
+
}
|
|
130
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
|
|
131
|
+
configurable: true,
|
|
132
|
+
enumerable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
initializer: null
|
|
135
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec11], {
|
|
136
|
+
configurable: true,
|
|
137
|
+
enumerable: true,
|
|
138
|
+
writable: true,
|
|
139
|
+
initializer: null
|
|
140
|
+
})), _class2)) || _class);
|
|
141
|
+
exports.default = Adjustment;
|
|
@@ -9,7 +9,9 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _vendor = _interopRequireDefault(require("../vendor"));
|
|
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
|
|
|
@@ -27,13 +29,23 @@ let Amendment = (_dec = (0, _typeorm.Entity)({
|
|
|
27
29
|
}), _dec4 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec5 = (0, _typeorm.JoinColumn)({
|
|
28
30
|
name: 'organisation_id',
|
|
29
31
|
referencedColumnName: 'id'
|
|
30
|
-
}), _dec6 = (0, _typeorm.
|
|
32
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _vendor.default), _dec7 = (0, _typeorm.JoinColumn)({
|
|
33
|
+
name: 'vendor_id',
|
|
34
|
+
referencedColumnName: 'id'
|
|
35
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
31
36
|
type: "varchar",
|
|
32
37
|
length: "1024",
|
|
33
38
|
nullable: true
|
|
34
|
-
}),
|
|
39
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
40
|
+
type: "varchar",
|
|
41
|
+
length: "250",
|
|
42
|
+
nullable: true
|
|
43
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
44
|
+
type: "timestamp with time zone",
|
|
45
|
+
nullable: true
|
|
46
|
+
}), _dec11 = (0, _typeorm.CreateDateColumn)({
|
|
35
47
|
type: 'timestamp with time zone'
|
|
36
|
-
}),
|
|
48
|
+
}), _dec12 = (0, _typeorm.UpdateDateColumn)({
|
|
37
49
|
type: 'timestamp with time zone'
|
|
38
50
|
}), _dec(_class = (_class2 = class Amendment {
|
|
39
51
|
constructor() {
|
|
@@ -43,11 +55,17 @@ let Amendment = (_dec = (0, _typeorm.Entity)({
|
|
|
43
55
|
|
|
44
56
|
_initializerDefineProperty(this, "organisation", _descriptor3, this);
|
|
45
57
|
|
|
46
|
-
_initializerDefineProperty(this, "
|
|
58
|
+
_initializerDefineProperty(this, "vendor", _descriptor4, this);
|
|
59
|
+
|
|
60
|
+
_initializerDefineProperty(this, "description", _descriptor5, this);
|
|
47
61
|
|
|
48
|
-
_initializerDefineProperty(this, "
|
|
62
|
+
_initializerDefineProperty(this, "supplier_reference", _descriptor6, this);
|
|
49
63
|
|
|
50
|
-
_initializerDefineProperty(this, "
|
|
64
|
+
_initializerDefineProperty(this, "undertaken_at", _descriptor7, this);
|
|
65
|
+
|
|
66
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
67
|
+
|
|
68
|
+
_initializerDefineProperty(this, "updated_at", _descriptor9, this);
|
|
51
69
|
}
|
|
52
70
|
|
|
53
71
|
getPublicData() {
|
|
@@ -56,10 +74,13 @@ let Amendment = (_dec = (0, _typeorm.Entity)({
|
|
|
56
74
|
amount: this.amount,
|
|
57
75
|
description: this.description,
|
|
58
76
|
created_at: this.created_at,
|
|
59
|
-
updated_at: this.updated_at
|
|
77
|
+
updated_at: this.updated_at,
|
|
78
|
+
undertaken_at: this.undertaken_at,
|
|
79
|
+
vendor: this.vendor,
|
|
80
|
+
supplier_reference: this.supplier_reference
|
|
60
81
|
};
|
|
61
82
|
|
|
62
|
-
if (typeof this.organisation !== 'undefined' && this.organisation !== null) {
|
|
83
|
+
if (typeof this.organisation !== 'undefined' && this.organisation !== null && typeof this.organisation.getPublicCompactData === 'function') {
|
|
63
84
|
response.organisation = this.organisation.getPublicCompactData();
|
|
64
85
|
}
|
|
65
86
|
|
|
@@ -85,19 +106,38 @@ let Amendment = (_dec = (0, _typeorm.Entity)({
|
|
|
85
106
|
initializer: function () {
|
|
86
107
|
return _organisation.default;
|
|
87
108
|
}
|
|
88
|
-
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
109
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "vendor", [_dec6, _dec7], {
|
|
110
|
+
configurable: true,
|
|
111
|
+
enumerable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
initializer: function () {
|
|
114
|
+
return _vendor.default;
|
|
115
|
+
}
|
|
116
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec8], {
|
|
89
117
|
configurable: true,
|
|
90
118
|
enumerable: true,
|
|
91
119
|
writable: true,
|
|
92
120
|
initializer: function () {
|
|
93
121
|
return "";
|
|
94
122
|
}
|
|
95
|
-
}),
|
|
123
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "supplier_reference", [_dec9], {
|
|
124
|
+
configurable: true,
|
|
125
|
+
enumerable: true,
|
|
126
|
+
writable: true,
|
|
127
|
+
initializer: function () {
|
|
128
|
+
return "";
|
|
129
|
+
}
|
|
130
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "undertaken_at", [_dec10], {
|
|
131
|
+
configurable: true,
|
|
132
|
+
enumerable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
initializer: null
|
|
135
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec11], {
|
|
96
136
|
configurable: true,
|
|
97
137
|
enumerable: true,
|
|
98
138
|
writable: true,
|
|
99
139
|
initializer: null
|
|
100
|
-
}),
|
|
140
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec12], {
|
|
101
141
|
configurable: true,
|
|
102
142
|
enumerable: true,
|
|
103
143
|
writable: true,
|
|
@@ -19,8 +19,12 @@ var _beneficiary = _interopRequireDefault(require("./beneficiary"));
|
|
|
19
19
|
|
|
20
20
|
var _amendment = _interopRequireDefault(require("./amendment"));
|
|
21
21
|
|
|
22
|
+
var _vendor = _interopRequireDefault(require("./vendor"));
|
|
23
|
+
|
|
24
|
+
var _adjustment = _interopRequireDefault(require("./adjustment"));
|
|
25
|
+
|
|
22
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
27
|
|
|
24
|
-
const ENTITIES = [_account.default, _amendment.default, _disbursal.default, _ledger.default, _settledTransaction.default, _transactionBatch.default, _beneficiary.default];
|
|
28
|
+
const ENTITIES = [_account.default, _adjustment.default, _amendment.default, _disbursal.default, _ledger.default, _settledTransaction.default, _transactionBatch.default, _beneficiary.default, _vendor.default];
|
|
25
29
|
var _default = ENTITIES;
|
|
26
30
|
exports.default = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
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 Vendor = (_dec = (0, _typeorm.Entity)({
|
|
19
|
+
name: 'vendor',
|
|
20
|
+
schema: 'bank'
|
|
21
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)({
|
|
22
|
+
type: "varchar",
|
|
23
|
+
length: "150"
|
|
24
|
+
}), _dec3 = (0, _typeorm.Column)({
|
|
25
|
+
type: "varchar",
|
|
26
|
+
length: "150"
|
|
27
|
+
}), _dec(_class = (_class2 = class Vendor {
|
|
28
|
+
constructor() {
|
|
29
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
30
|
+
|
|
31
|
+
_initializerDefineProperty(this, "name", _descriptor2, this);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
propgate(id, name) {
|
|
35
|
+
this.id = id;
|
|
36
|
+
this.name = name;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
getPublicData() {
|
|
40
|
+
return {
|
|
41
|
+
id: this.id,
|
|
42
|
+
name: this.name
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
47
|
+
configurable: true,
|
|
48
|
+
enumerable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
initializer: null
|
|
51
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec3], {
|
|
52
|
+
configurable: true,
|
|
53
|
+
enumerable: true,
|
|
54
|
+
writable: true,
|
|
55
|
+
initializer: null
|
|
56
|
+
})), _class2)) || _class);
|
|
57
|
+
exports.default = Vendor;
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "AccountEntity", {
|
|
|
15
15
|
return _account.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "AdjustmentEntity", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _adjustment.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "AmendmentEntity", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function () {
|
|
@@ -246,7 +252,7 @@ Object.defineProperty(exports, "TPAccountFees", {
|
|
|
246
252
|
Object.defineProperty(exports, "TPAdjustment", {
|
|
247
253
|
enumerable: true,
|
|
248
254
|
get: function () {
|
|
249
|
-
return
|
|
255
|
+
return _adjustment2.default;
|
|
250
256
|
}
|
|
251
257
|
});
|
|
252
258
|
Object.defineProperty(exports, "TPBatchEntity", {
|
|
@@ -393,6 +399,12 @@ Object.defineProperty(exports, "UserRoleEntity", {
|
|
|
393
399
|
return _userRole.default;
|
|
394
400
|
}
|
|
395
401
|
});
|
|
402
|
+
Object.defineProperty(exports, "VendorEntity", {
|
|
403
|
+
enumerable: true,
|
|
404
|
+
get: function () {
|
|
405
|
+
return _vendor.default;
|
|
406
|
+
}
|
|
407
|
+
});
|
|
396
408
|
Object.defineProperty(exports, "WarehouseService", {
|
|
397
409
|
enumerable: true,
|
|
398
410
|
get: function () {
|
|
@@ -422,6 +434,8 @@ var _supplier = _interopRequireDefault(require("./entity/agent-data/supplier"));
|
|
|
422
434
|
|
|
423
435
|
var _supplierType = _interopRequireDefault(require("./entity/agent-data/supplier-type"));
|
|
424
436
|
|
|
437
|
+
var _adjustment = _interopRequireDefault(require("./entity/bank/adjustment"));
|
|
438
|
+
|
|
425
439
|
var _account = _interopRequireDefault(require("./entity/bank/account"));
|
|
426
440
|
|
|
427
441
|
var _amendment = _interopRequireDefault(require("./entity/bank/amendment"));
|
|
@@ -436,6 +450,8 @@ var _transactionBatch = _interopRequireDefault(require("./entity/bank/transactio
|
|
|
436
450
|
|
|
437
451
|
var _beneficiary = _interopRequireDefault(require("./entity/bank/beneficiary"));
|
|
438
452
|
|
|
453
|
+
var _vendor = _interopRequireDefault(require("./entity/bank/vendor"));
|
|
454
|
+
|
|
439
455
|
var _account2 = _interopRequireDefault(require("./entity/nuapay/account"));
|
|
440
456
|
|
|
441
457
|
var _balance = _interopRequireDefault(require("./entity/nuapay/balance"));
|
|
@@ -486,7 +502,7 @@ var _transactionCharges = _interopRequireDefault(require("./entity/trust-payment
|
|
|
486
502
|
|
|
487
503
|
var _accountFees = _interopRequireDefault(require("./entity/trust-payments/account-fees"));
|
|
488
504
|
|
|
489
|
-
var
|
|
505
|
+
var _adjustment2 = _interopRequireDefault(require("./entity/trust-payments/adjustment"));
|
|
490
506
|
|
|
491
507
|
var _organisation = _interopRequireDefault(require("./entity/user/organisation"));
|
|
492
508
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class amendmentUndertakenAt1657630420519 {
|
|
4
|
+
name = 'amendmentUndertakenAt1657630420519'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" ADD "undertaken_at" TIMESTAMP WITH TIME ZONE`);}
|
|
8
|
+
|
|
9
|
+
async down(queryRunner) {
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" DROP COLUMN "undertaken_at"`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class vendor1657630681583 {
|
|
4
|
+
name = 'vendor1657630681583'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "bank"."vendor" ("id" character varying(150) NOT NULL, "name" character varying(150) NOT NULL, CONSTRAINT "PK_931a23f6231a57604f5a0e32780" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" ADD "vendor_id" character varying(150)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" ADD CONSTRAINT "FK_0b58034a4d0979aeda96a85221a" FOREIGN KEY ("vendor_id") REFERENCES "bank"."vendor"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" DROP CONSTRAINT "FK_0b58034a4d0979aeda96a85221a"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" DROP COLUMN "vendor_id"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "bank"."vendor"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class ammedSupplierRef1657631323026 {
|
|
4
|
+
name = 'ammedSupplierRef1657631323026'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" ADD "supplier_reference" character varying(250)`);}
|
|
8
|
+
|
|
9
|
+
async down(queryRunner) {
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "bank"."amendment" DROP COLUMN "supplier_reference"`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class adjustment1657711121280 {
|
|
4
|
+
name = 'adjustment1657711121280'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "bank"."adjustment" ("id" character varying NOT NULL, "amount" integer NOT NULL, "vendor_reference" character varying(250), "description" character varying(1024), "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "organisation_id" character varying(150), "vendor_id" character varying(150), CONSTRAINT "PK_f84d8d269b59850fb017ee1630b" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "bank"."adjustment" ADD CONSTRAINT "FK_d684ed3fd01c94b5fa2a010ab27" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "bank"."adjustment" ADD CONSTRAINT "FK_c37d327393a256fcc51d4168636" FOREIGN KEY ("vendor_id") REFERENCES "bank"."vendor"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "bank"."adjustment" DROP CONSTRAINT "FK_c37d327393a256fcc51d4168636"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "bank"."adjustment" DROP CONSTRAINT "FK_d684ed3fd01c94b5fa2a010ab27"`);
|
|
15
|
+
await queryRunner.query(`DROP TABLE "bank"."adjustment"`);
|
|
16
|
+
}
|
|
17
|
+
}
|