@felloh-org/lambda-wrapper 1.0.10 → 1.0.11
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,7 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _organisation = _interopRequireDefault(require("../organisation"));
|
|
11
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;
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
@@ -29,24 +29,28 @@ exports.USER_STATUS = USER_STATUS;
|
|
|
29
29
|
let User = (_dec = (0, _typeorm.Entity)({
|
|
30
30
|
name: 'user',
|
|
31
31
|
schema: 'user'
|
|
32
|
-
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
|
|
32
|
+
}), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Index)(), _dec4 = (0, _typeorm.Column)({
|
|
33
|
+
type: "varchar",
|
|
34
|
+
length: "36",
|
|
35
|
+
nullable: true
|
|
36
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
33
37
|
type: "varchar",
|
|
34
38
|
length: "150"
|
|
35
|
-
}),
|
|
39
|
+
}), _dec6 = (0, _typeorm.Column)({
|
|
36
40
|
type: "varchar",
|
|
37
41
|
length: "50"
|
|
38
|
-
}),
|
|
42
|
+
}), _dec7 = (0, _typeorm.Column)({
|
|
39
43
|
type: "varchar",
|
|
40
44
|
length: "20"
|
|
41
|
-
}),
|
|
45
|
+
}), _dec8 = (0, _typeorm.Column)({
|
|
42
46
|
type: "varchar",
|
|
43
47
|
length: "50"
|
|
44
|
-
}),
|
|
48
|
+
}), _dec9 = (0, _typeorm.Column)({
|
|
45
49
|
type: "varchar",
|
|
46
50
|
length: "50"
|
|
47
|
-
}),
|
|
51
|
+
}), _dec10 = (0, _typeorm.CreateDateColumn)(), _dec11 = (0, _typeorm.UpdateDateColumn)(), _dec12 = (0, _typeorm.DeleteDateColumn)(), _dec13 = (0, _typeorm.ManyToMany)(() => _organisation.default, organisation => organisation.users, {
|
|
48
52
|
cascade: true
|
|
49
|
-
}),
|
|
53
|
+
}), _dec14 = (0, _typeorm.JoinTable)({
|
|
50
54
|
name: "user_organisation",
|
|
51
55
|
schema: "user",
|
|
52
56
|
joinColumn: {
|
|
@@ -61,23 +65,25 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
61
65
|
constructor() {
|
|
62
66
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
63
67
|
|
|
64
|
-
_initializerDefineProperty(this, "
|
|
68
|
+
_initializerDefineProperty(this, "cognito_sub", _descriptor2, this);
|
|
65
69
|
|
|
66
|
-
_initializerDefineProperty(this, "
|
|
70
|
+
_initializerDefineProperty(this, "email", _descriptor3, this);
|
|
67
71
|
|
|
68
|
-
_initializerDefineProperty(this, "
|
|
72
|
+
_initializerDefineProperty(this, "mobile", _descriptor4, this);
|
|
69
73
|
|
|
70
|
-
_initializerDefineProperty(this, "
|
|
74
|
+
_initializerDefineProperty(this, "status", _descriptor5, this);
|
|
71
75
|
|
|
72
|
-
_initializerDefineProperty(this, "
|
|
76
|
+
_initializerDefineProperty(this, "first_name", _descriptor6, this);
|
|
73
77
|
|
|
74
|
-
_initializerDefineProperty(this, "
|
|
78
|
+
_initializerDefineProperty(this, "last_name", _descriptor7, this);
|
|
75
79
|
|
|
76
|
-
_initializerDefineProperty(this, "
|
|
80
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
77
81
|
|
|
78
|
-
_initializerDefineProperty(this, "
|
|
82
|
+
_initializerDefineProperty(this, "updated_at", _descriptor9, this);
|
|
79
83
|
|
|
80
|
-
_initializerDefineProperty(this, "
|
|
84
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor10, this);
|
|
85
|
+
|
|
86
|
+
_initializerDefineProperty(this, "organisations", _descriptor11, this);
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
propgate(email, mobile, status, firstName, lastName) {
|
|
@@ -95,57 +101,64 @@ let User = (_dec = (0, _typeorm.Entity)({
|
|
|
95
101
|
initializer: function () {
|
|
96
102
|
return undefined;
|
|
97
103
|
}
|
|
98
|
-
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
104
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "cognito_sub", [_dec3, _dec4], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: function () {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "email", [_dec5], {
|
|
99
112
|
configurable: true,
|
|
100
113
|
enumerable: true,
|
|
101
114
|
writable: true,
|
|
102
115
|
initializer: function () {
|
|
103
116
|
return "";
|
|
104
117
|
}
|
|
105
|
-
}),
|
|
118
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "mobile", [_dec6], {
|
|
106
119
|
configurable: true,
|
|
107
120
|
enumerable: true,
|
|
108
121
|
writable: true,
|
|
109
122
|
initializer: function () {
|
|
110
123
|
return "";
|
|
111
124
|
}
|
|
112
|
-
}),
|
|
125
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec7], {
|
|
113
126
|
configurable: true,
|
|
114
127
|
enumerable: true,
|
|
115
128
|
writable: true,
|
|
116
129
|
initializer: function () {
|
|
117
130
|
return "";
|
|
118
131
|
}
|
|
119
|
-
}),
|
|
132
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "first_name", [_dec8], {
|
|
120
133
|
configurable: true,
|
|
121
134
|
enumerable: true,
|
|
122
135
|
writable: true,
|
|
123
136
|
initializer: function () {
|
|
124
137
|
return "";
|
|
125
138
|
}
|
|
126
|
-
}),
|
|
139
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "last_name", [_dec9], {
|
|
127
140
|
configurable: true,
|
|
128
141
|
enumerable: true,
|
|
129
142
|
writable: true,
|
|
130
143
|
initializer: function () {
|
|
131
144
|
return "";
|
|
132
145
|
}
|
|
133
|
-
}),
|
|
146
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
|
|
134
147
|
configurable: true,
|
|
135
148
|
enumerable: true,
|
|
136
149
|
writable: true,
|
|
137
150
|
initializer: null
|
|
138
|
-
}),
|
|
151
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec11], {
|
|
139
152
|
configurable: true,
|
|
140
153
|
enumerable: true,
|
|
141
154
|
writable: true,
|
|
142
155
|
initializer: null
|
|
143
|
-
}),
|
|
156
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec12], {
|
|
144
157
|
configurable: true,
|
|
145
158
|
enumerable: true,
|
|
146
159
|
writable: true,
|
|
147
160
|
initializer: null
|
|
148
|
-
}),
|
|
161
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "organisations", [_dec13, _dec14], {
|
|
149
162
|
configurable: true,
|
|
150
163
|
enumerable: true,
|
|
151
164
|
writable: true,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class userCognitoSub1643154226214 {
|
|
4
|
+
name = 'userCognitoSub1643154226214'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "user"."user" ADD "cognito_sub" character varying(36)`);
|
|
8
|
+
await queryRunner.query(`CREATE INDEX "IDX_1e75d2289be8e3905810ff9b10" ON "user"."user" ("cognito_sub") `);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async down(queryRunner) {
|
|
12
|
+
await queryRunner.query(`DROP INDEX "user"."IDX_1e75d2289be8e3905810ff9b10"`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "user"."user_role" ALTER COLUMN "user_id" SET NOT NULL`);
|
|
14
|
+
}
|
|
15
|
+
}
|