@felloh-org/lambda-wrapper 1.2.35 → 1.2.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.
|
@@ -13,7 +13,7 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
|
|
|
13
13
|
|
|
14
14
|
var _currency = require("../../bank/currency");
|
|
15
15
|
|
|
16
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
|
|
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
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -27,61 +27,76 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
|
|
|
27
27
|
name: 'credit_note',
|
|
28
28
|
schema: 'payment'
|
|
29
29
|
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
30
|
+
type: "varchar",
|
|
31
|
+
length: "150",
|
|
32
|
+
nullable: true
|
|
33
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
30
34
|
type: "int"
|
|
31
|
-
}),
|
|
35
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
36
|
+
type: "varchar",
|
|
37
|
+
length: "150"
|
|
38
|
+
}), _dec6 = (0, _typeorm.ManyToOne)(() => _booking.default, {
|
|
32
39
|
nullable: true
|
|
33
|
-
}),
|
|
40
|
+
}), _dec7 = (0, _typeorm.JoinColumn)({
|
|
34
41
|
name: 'booking_created_from',
|
|
35
42
|
referencedColumnName: 'id'
|
|
36
|
-
}),
|
|
43
|
+
}), _dec8 = (0, _typeorm.ManyToOne)(() => _booking.default, {
|
|
37
44
|
nullable: true
|
|
38
|
-
}),
|
|
45
|
+
}), _dec9 = (0, _typeorm.JoinColumn)({
|
|
39
46
|
name: 'booking_applied_to',
|
|
40
47
|
referencedColumnName: 'id'
|
|
41
|
-
}),
|
|
48
|
+
}), _dec10 = (0, _typeorm.Column)({
|
|
42
49
|
type: "varchar",
|
|
43
50
|
length: "2048",
|
|
44
51
|
nullable: true
|
|
45
|
-
}),
|
|
52
|
+
}), _dec11 = (0, _typeorm.Column)({
|
|
46
53
|
type: "varchar",
|
|
47
54
|
length: "3",
|
|
48
55
|
default: _currency.DEFAULT_CURRENCY
|
|
49
|
-
}),
|
|
56
|
+
}), _dec12 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec13 = (0, _typeorm.JoinColumn)({
|
|
50
57
|
name: 'organisation_id',
|
|
51
58
|
referencedColumnName: 'id'
|
|
52
|
-
}),
|
|
59
|
+
}), _dec14 = (0, _typeorm.CreateDateColumn)({
|
|
53
60
|
type: 'timestamp with time zone'
|
|
54
|
-
}),
|
|
61
|
+
}), _dec15 = (0, _typeorm.UpdateDateColumn)({
|
|
55
62
|
type: 'timestamp with time zone'
|
|
56
63
|
}), _dec(_class = (_class2 = class CreditNote {
|
|
57
64
|
constructor() {
|
|
58
65
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
59
66
|
|
|
60
|
-
_initializerDefineProperty(this, "
|
|
67
|
+
_initializerDefineProperty(this, "short_id", _descriptor2, this);
|
|
68
|
+
|
|
69
|
+
_initializerDefineProperty(this, "amount", _descriptor3, this);
|
|
70
|
+
|
|
71
|
+
_initializerDefineProperty(this, "customer_name", _descriptor4, this);
|
|
61
72
|
|
|
62
|
-
_initializerDefineProperty(this, "booking_created_from",
|
|
73
|
+
_initializerDefineProperty(this, "booking_created_from", _descriptor5, this);
|
|
63
74
|
|
|
64
|
-
_initializerDefineProperty(this, "booking_applied_to",
|
|
75
|
+
_initializerDefineProperty(this, "booking_applied_to", _descriptor6, this);
|
|
65
76
|
|
|
66
|
-
_initializerDefineProperty(this, "description",
|
|
77
|
+
_initializerDefineProperty(this, "description", _descriptor7, this);
|
|
67
78
|
|
|
68
|
-
_initializerDefineProperty(this, "currency",
|
|
79
|
+
_initializerDefineProperty(this, "currency", _descriptor8, this);
|
|
69
80
|
|
|
70
|
-
_initializerDefineProperty(this, "organisation",
|
|
81
|
+
_initializerDefineProperty(this, "organisation", _descriptor9, this);
|
|
71
82
|
|
|
72
|
-
_initializerDefineProperty(this, "created_at",
|
|
83
|
+
_initializerDefineProperty(this, "created_at", _descriptor10, this);
|
|
73
84
|
|
|
74
|
-
_initializerDefineProperty(this, "updated_at",
|
|
85
|
+
_initializerDefineProperty(this, "updated_at", _descriptor11, this);
|
|
75
86
|
}
|
|
76
87
|
|
|
77
88
|
getPublicData() {
|
|
78
89
|
const response = {
|
|
79
90
|
id: this.id,
|
|
91
|
+
short_id: this.short_id,
|
|
92
|
+
customer_name: this.customer_name,
|
|
80
93
|
amount: this.amount,
|
|
81
94
|
description: this.description,
|
|
82
95
|
currency: this.currency,
|
|
83
96
|
organisation: this.organisation,
|
|
84
|
-
created_at: this.created_at
|
|
97
|
+
created_at: this.created_at,
|
|
98
|
+
booking_applied_to: null,
|
|
99
|
+
booking_created_from: null
|
|
85
100
|
};
|
|
86
101
|
|
|
87
102
|
if (this.booking_applied_to && typeof this.booking_applied_to.getPublicData === 'function') {
|
|
@@ -102,52 +117,66 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
|
|
|
102
117
|
initializer: function () {
|
|
103
118
|
return undefined;
|
|
104
119
|
}
|
|
105
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
120
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "short_id", [_dec3], {
|
|
121
|
+
configurable: true,
|
|
122
|
+
enumerable: true,
|
|
123
|
+
writable: true,
|
|
124
|
+
initializer: function () {
|
|
125
|
+
return "";
|
|
126
|
+
}
|
|
127
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "amount", [_dec4], {
|
|
106
128
|
configurable: true,
|
|
107
129
|
enumerable: true,
|
|
108
130
|
writable: true,
|
|
109
131
|
initializer: null
|
|
110
|
-
}),
|
|
132
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec5], {
|
|
133
|
+
configurable: true,
|
|
134
|
+
enumerable: true,
|
|
135
|
+
writable: true,
|
|
136
|
+
initializer: function () {
|
|
137
|
+
return "";
|
|
138
|
+
}
|
|
139
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "booking_created_from", [_dec6, _dec7], {
|
|
111
140
|
configurable: true,
|
|
112
141
|
enumerable: true,
|
|
113
142
|
writable: true,
|
|
114
143
|
initializer: function () {
|
|
115
144
|
return _booking.default;
|
|
116
145
|
}
|
|
117
|
-
}),
|
|
146
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "booking_applied_to", [_dec8, _dec9], {
|
|
118
147
|
configurable: true,
|
|
119
148
|
enumerable: true,
|
|
120
149
|
writable: true,
|
|
121
150
|
initializer: function () {
|
|
122
151
|
return _booking.default;
|
|
123
152
|
}
|
|
124
|
-
}),
|
|
153
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec10], {
|
|
125
154
|
configurable: true,
|
|
126
155
|
enumerable: true,
|
|
127
156
|
writable: true,
|
|
128
157
|
initializer: function () {
|
|
129
158
|
return "";
|
|
130
159
|
}
|
|
131
|
-
}),
|
|
160
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec11], {
|
|
132
161
|
configurable: true,
|
|
133
162
|
enumerable: true,
|
|
134
163
|
writable: true,
|
|
135
164
|
initializer: function () {
|
|
136
165
|
return _currency.DEFAULT_CURRENCY;
|
|
137
166
|
}
|
|
138
|
-
}),
|
|
167
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec12, _dec13], {
|
|
139
168
|
configurable: true,
|
|
140
169
|
enumerable: true,
|
|
141
170
|
writable: true,
|
|
142
171
|
initializer: function () {
|
|
143
172
|
return _organisation.default;
|
|
144
173
|
}
|
|
145
|
-
}),
|
|
174
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec14], {
|
|
146
175
|
configurable: true,
|
|
147
176
|
enumerable: true,
|
|
148
177
|
writable: true,
|
|
149
178
|
initializer: null
|
|
150
|
-
}),
|
|
179
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec15], {
|
|
151
180
|
configurable: true,
|
|
152
181
|
enumerable: true,
|
|
153
182
|
writable: true,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class creditNotesCustomerName1666880510631 {
|
|
4
|
+
name = 'creditNotesCustomerName1666880510631'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."credit_note" ADD "customer_name" character varying(150) NOT NULL`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."credit_note" DROP COLUMN "customer_name"`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class creditNotesShortId1666947609074 {
|
|
4
|
+
name = 'creditNotesShortId1666947609074'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "payment"."credit_note" ADD "short_id" character varying(150)`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "payment"."credit_note" DROP COLUMN "short_id"`);
|
|
12
|
+
}
|
|
13
|
+
}
|