@felloh-org/lambda-wrapper 1.11.6 → 1.11.7

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,7 +7,11 @@ exports.default = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
10
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
11
+
12
+ 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;
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
15
 
12
16
  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
17
 
@@ -39,10 +43,15 @@ let Merchant = (_dec = (0, _typeorm.Entity)({
39
43
  }), _dec8 = (0, _typeorm.Column)({
40
44
  type: "boolean",
41
45
  default: false
42
- }), _dec9 = (0, _typeorm.Column)({
46
+ }), _dec9 = (0, _typeorm.ManyToOne)(() => _organisation.default, {
47
+ nullable: true
48
+ }), _dec10 = (0, _typeorm.JoinColumn)({
49
+ name: 'organisation_id',
50
+ referencedColumnName: 'id'
51
+ }), _dec11 = (0, _typeorm.Column)({
43
52
  type: "int",
44
53
  nullable: true
45
- }), _dec10 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Merchant {
54
+ }), _dec12 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Merchant {
46
55
  constructor() {
47
56
  _initializerDefineProperty(this, "merchant_number", _descriptor, this);
48
57
 
@@ -58,9 +67,11 @@ let Merchant = (_dec = (0, _typeorm.Entity)({
58
67
 
59
68
  _initializerDefineProperty(this, "import_transactions", _descriptor7, this);
60
69
 
61
- _initializerDefineProperty(this, "rolling_reserve", _descriptor8, this);
70
+ _initializerDefineProperty(this, "organisation", _descriptor8, this);
62
71
 
63
- _initializerDefineProperty(this, "created_at", _descriptor9, this);
72
+ _initializerDefineProperty(this, "rolling_reserve", _descriptor9, this);
73
+
74
+ _initializerDefineProperty(this, "created_at", _descriptor10, this);
64
75
  }
65
76
 
66
77
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "merchant_number", [_dec2], {
@@ -106,14 +117,21 @@ let Merchant = (_dec = (0, _typeorm.Entity)({
106
117
  enumerable: true,
107
118
  writable: true,
108
119
  initializer: null
109
- }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "rolling_reserve", [_dec9], {
120
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec9, _dec10], {
121
+ configurable: true,
122
+ enumerable: true,
123
+ writable: true,
124
+ initializer: function () {
125
+ return _organisation.default;
126
+ }
127
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "rolling_reserve", [_dec11], {
110
128
  configurable: true,
111
129
  enumerable: true,
112
130
  writable: true,
113
131
  initializer: function () {
114
132
  return "";
115
133
  }
116
- }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
134
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
117
135
  configurable: true,
118
136
  enumerable: true,
119
137
  writable: true,
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class trustOrganisationMapping1688461589610 {
4
+ name = 'trustOrganisationMapping1688461589610'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "trust_payments"."merchant" ADD "organisation_id" character varying(150)`);
8
+ await queryRunner.query(`ALTER TABLE "trust_payments"."merchant" ADD CONSTRAINT "FK_e8f73e8ce4d9ba3866f270ba3c9" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "trust_payments"."merchant" DROP CONSTRAINT "FK_e8f73e8ce4d9ba3866f270ba3c9"`);
13
+ await queryRunner.query(`ALTER TABLE "trust_payments"."merchant" DROP COLUMN "organisation_id"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.6",
3
+ "version": "1.11.7",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {