@loopback/sequelize 0.5.2 → 0.5.4
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/sequelize/sequelize.datasource.base.d.ts +1 -1
- package/dist/sequelize/sequelize.datasource.base.js +2 -3
- package/dist/sequelize/sequelize.datasource.base.js.map +1 -1
- package/dist/sequelize/sequelize.repository.base.d.ts +19 -4
- package/dist/sequelize/sequelize.repository.base.js +26 -6
- package/dist/sequelize/sequelize.repository.base.js.map +1 -1
- package/dist/sequelize/utils.d.ts +8 -0
- package/dist/sequelize/utils.js +21 -1
- package/dist/sequelize/utils.js.map +1 -1
- package/package.json +13 -11
- package/src/sequelize/sequelize.datasource.base.ts +4 -5
- package/src/sequelize/sequelize.repository.base.ts +58 -14
- package/src/sequelize/utils.ts +18 -0
- package/dist/.sandbox/23319CTsyje/application.js +0 -15
- package/dist/.sandbox/23319CTsyje/controllers/book-category.controller.js +0 -41
- package/dist/.sandbox/23319CTsyje/controllers/book.controller.js +0 -210
- package/dist/.sandbox/23319CTsyje/controllers/category.controller.js +0 -198
- package/dist/.sandbox/23319CTsyje/controllers/developer.controller.js +0 -177
- package/dist/.sandbox/23319CTsyje/controllers/doctor-patient.controller.js +0 -112
- package/dist/.sandbox/23319CTsyje/controllers/doctor.controller.js +0 -177
- package/dist/.sandbox/23319CTsyje/controllers/index.js +0 -23
- package/dist/.sandbox/23319CTsyje/controllers/patient.controller.js +0 -165
- package/dist/.sandbox/23319CTsyje/controllers/product.controller.js +0 -177
- package/dist/.sandbox/23319CTsyje/controllers/programming-languange.controller.js +0 -204
- package/dist/.sandbox/23319CTsyje/controllers/task.controller.js +0 -210
- package/dist/.sandbox/23319CTsyje/controllers/test.controller.base.js +0 -27
- package/dist/.sandbox/23319CTsyje/controllers/todo-list-todo.controller.js +0 -113
- package/dist/.sandbox/23319CTsyje/controllers/todo-list.controller.js +0 -177
- package/dist/.sandbox/23319CTsyje/controllers/todo-todo-list.controller.js +0 -41
- package/dist/.sandbox/23319CTsyje/controllers/todo.controller.js +0 -177
- package/dist/.sandbox/23319CTsyje/controllers/transaction.controller.js +0 -157
- package/dist/.sandbox/23319CTsyje/controllers/user-todo-list.controller.js +0 -113
- package/dist/.sandbox/23319CTsyje/controllers/user.controller.js +0 -210
- package/dist/.sandbox/23319CTsyje/datasources/config.js +0 -65
- package/dist/.sandbox/23319CTsyje/datasources/primary.datasource.js +0 -28
- package/dist/.sandbox/23319CTsyje/datasources/secondary.datasource.js +0 -28
- package/dist/.sandbox/23319CTsyje/models/appointment.model.js +0 -37
- package/dist/.sandbox/23319CTsyje/models/book.model.js +0 -48
- package/dist/.sandbox/23319CTsyje/models/category.model.js +0 -32
- package/dist/.sandbox/23319CTsyje/models/developer.model.js +0 -47
- package/dist/.sandbox/23319CTsyje/models/doctor.model.js +0 -44
- package/dist/.sandbox/23319CTsyje/models/index.js +0 -17
- package/dist/.sandbox/23319CTsyje/models/patient.model.js +0 -32
- package/dist/.sandbox/23319CTsyje/models/product.model.js +0 -41
- package/dist/.sandbox/23319CTsyje/models/programming-language.model.js +0 -39
- package/dist/.sandbox/23319CTsyje/models/task.model.js +0 -74
- package/dist/.sandbox/23319CTsyje/models/todo-list.model.js +0 -45
- package/dist/.sandbox/23319CTsyje/models/todo.model.js +0 -44
- package/dist/.sandbox/23319CTsyje/models/user.model.js +0 -92
- package/dist/.sandbox/23319CTsyje/repositories/appointment.repository.js +0 -20
- package/dist/.sandbox/23319CTsyje/repositories/book.repository.js +0 -25
- package/dist/.sandbox/23319CTsyje/repositories/category.repository.js +0 -20
- package/dist/.sandbox/23319CTsyje/repositories/developer.repository.js +0 -25
- package/dist/.sandbox/23319CTsyje/repositories/doctor.repository.js +0 -27
- package/dist/.sandbox/23319CTsyje/repositories/index.js +0 -17
- package/dist/.sandbox/23319CTsyje/repositories/patient.repository.js +0 -20
- package/dist/.sandbox/23319CTsyje/repositories/product.repository.js +0 -20
- package/dist/.sandbox/23319CTsyje/repositories/programming-language.repository.js +0 -20
- package/dist/.sandbox/23319CTsyje/repositories/task.repository.js +0 -26
- package/dist/.sandbox/23319CTsyje/repositories/todo-list.repository.js +0 -25
- package/dist/.sandbox/23319CTsyje/repositories/todo.repository.js +0 -25
- package/dist/.sandbox/23319CTsyje/repositories/user.repository.js +0 -25
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserController = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
const rest_1 = require("@loopback/rest");
|
|
7
|
-
const models_1 = require("../models");
|
|
8
|
-
const repositories_1 = require("../repositories");
|
|
9
|
-
const test_controller_base_1 = require("./test.controller.base");
|
|
10
|
-
let UserController = class UserController extends test_controller_base_1.TestControllerBase {
|
|
11
|
-
constructor(userRepository) {
|
|
12
|
-
super(userRepository);
|
|
13
|
-
this.userRepository = userRepository;
|
|
14
|
-
}
|
|
15
|
-
async create(user) {
|
|
16
|
-
return this.userRepository.create(user);
|
|
17
|
-
}
|
|
18
|
-
async createAll(users) {
|
|
19
|
-
return this.userRepository.createAll(users);
|
|
20
|
-
}
|
|
21
|
-
async count(where) {
|
|
22
|
-
return this.userRepository.count(where);
|
|
23
|
-
}
|
|
24
|
-
async find(filter) {
|
|
25
|
-
return this.userRepository.find(filter);
|
|
26
|
-
}
|
|
27
|
-
async updateAll(user, where) {
|
|
28
|
-
return this.userRepository.updateAll(user, where);
|
|
29
|
-
}
|
|
30
|
-
async findById(id, filter) {
|
|
31
|
-
return this.userRepository.findById(id, filter);
|
|
32
|
-
}
|
|
33
|
-
async updateById(id, user) {
|
|
34
|
-
await this.userRepository.updateById(id, user);
|
|
35
|
-
}
|
|
36
|
-
async replaceById(id, user) {
|
|
37
|
-
await this.userRepository.replaceById(id, user);
|
|
38
|
-
}
|
|
39
|
-
async deleteById(id) {
|
|
40
|
-
await this.userRepository.deleteById(id);
|
|
41
|
-
}
|
|
42
|
-
async syncSequelizeModel() {
|
|
43
|
-
await this.beforeEach();
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
exports.UserController = UserController;
|
|
47
|
-
tslib_1.__decorate([
|
|
48
|
-
(0, rest_1.post)('/users'),
|
|
49
|
-
(0, rest_1.response)(200, {
|
|
50
|
-
description: 'User model instance',
|
|
51
|
-
content: { 'application/json': { schema: (0, rest_1.getModelSchemaRef)(models_1.User) } },
|
|
52
|
-
}),
|
|
53
|
-
tslib_1.__param(0, (0, rest_1.requestBody)({
|
|
54
|
-
content: {
|
|
55
|
-
'application/json': {
|
|
56
|
-
schema: (0, rest_1.getModelSchemaRef)(models_1.User, {
|
|
57
|
-
title: 'NewUser',
|
|
58
|
-
exclude: ['id'],
|
|
59
|
-
}),
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
})),
|
|
63
|
-
tslib_1.__metadata("design:type", Function),
|
|
64
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
65
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
66
|
-
], UserController.prototype, "create", null);
|
|
67
|
-
tslib_1.__decorate([
|
|
68
|
-
(0, rest_1.post)('/users-bulk'),
|
|
69
|
-
(0, rest_1.response)(200, {
|
|
70
|
-
description: 'User model instances',
|
|
71
|
-
content: {
|
|
72
|
-
'application/json': {
|
|
73
|
-
schema: {
|
|
74
|
-
type: 'array',
|
|
75
|
-
items: (0, rest_1.getModelSchemaRef)(models_1.User),
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}),
|
|
80
|
-
tslib_1.__param(0, (0, rest_1.requestBody)({
|
|
81
|
-
content: {
|
|
82
|
-
'application/json': {
|
|
83
|
-
schema: {
|
|
84
|
-
type: 'array',
|
|
85
|
-
items: (0, rest_1.getModelSchemaRef)(models_1.User, {
|
|
86
|
-
title: 'NewUser',
|
|
87
|
-
exclude: ['id'],
|
|
88
|
-
}),
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
})),
|
|
93
|
-
tslib_1.__metadata("design:type", Function),
|
|
94
|
-
tslib_1.__metadata("design:paramtypes", [Array]),
|
|
95
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
96
|
-
], UserController.prototype, "createAll", null);
|
|
97
|
-
tslib_1.__decorate([
|
|
98
|
-
(0, rest_1.get)('/users/count'),
|
|
99
|
-
(0, rest_1.response)(200, {
|
|
100
|
-
description: 'User model count',
|
|
101
|
-
content: { 'application/json': { schema: repository_1.CountSchema } },
|
|
102
|
-
}),
|
|
103
|
-
tslib_1.__param(0, rest_1.param.where(models_1.User)),
|
|
104
|
-
tslib_1.__metadata("design:type", Function),
|
|
105
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
106
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
107
|
-
], UserController.prototype, "count", null);
|
|
108
|
-
tslib_1.__decorate([
|
|
109
|
-
(0, rest_1.get)('/users'),
|
|
110
|
-
(0, rest_1.response)(200, {
|
|
111
|
-
description: 'Array of User model instances',
|
|
112
|
-
content: {
|
|
113
|
-
'application/json': {
|
|
114
|
-
schema: {
|
|
115
|
-
type: 'array',
|
|
116
|
-
items: (0, rest_1.getModelSchemaRef)(models_1.User, { includeRelations: true }),
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
}),
|
|
121
|
-
tslib_1.__param(0, rest_1.param.filter(models_1.User)),
|
|
122
|
-
tslib_1.__metadata("design:type", Function),
|
|
123
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
124
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
125
|
-
], UserController.prototype, "find", null);
|
|
126
|
-
tslib_1.__decorate([
|
|
127
|
-
(0, rest_1.patch)('/users'),
|
|
128
|
-
(0, rest_1.response)(200, {
|
|
129
|
-
description: 'User PATCH success count',
|
|
130
|
-
content: { 'application/json': { schema: repository_1.CountSchema } },
|
|
131
|
-
}),
|
|
132
|
-
tslib_1.__param(0, (0, rest_1.requestBody)({
|
|
133
|
-
content: {
|
|
134
|
-
'application/json': {
|
|
135
|
-
schema: (0, rest_1.getModelSchemaRef)(models_1.User, { partial: true }),
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
})),
|
|
139
|
-
tslib_1.__param(1, rest_1.param.where(models_1.User)),
|
|
140
|
-
tslib_1.__metadata("design:type", Function),
|
|
141
|
-
tslib_1.__metadata("design:paramtypes", [models_1.User, Object]),
|
|
142
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
143
|
-
], UserController.prototype, "updateAll", null);
|
|
144
|
-
tslib_1.__decorate([
|
|
145
|
-
(0, rest_1.get)('/users/{id}'),
|
|
146
|
-
(0, rest_1.response)(200, {
|
|
147
|
-
description: 'User model instance',
|
|
148
|
-
content: {
|
|
149
|
-
'application/json': {
|
|
150
|
-
schema: (0, rest_1.getModelSchemaRef)(models_1.User, { includeRelations: true }),
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
}),
|
|
154
|
-
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
155
|
-
tslib_1.__param(1, rest_1.param.filter(models_1.User, { exclude: 'where' })),
|
|
156
|
-
tslib_1.__metadata("design:type", Function),
|
|
157
|
-
tslib_1.__metadata("design:paramtypes", [Number, Object]),
|
|
158
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
159
|
-
], UserController.prototype, "findById", null);
|
|
160
|
-
tslib_1.__decorate([
|
|
161
|
-
(0, rest_1.patch)('/users/{id}'),
|
|
162
|
-
(0, rest_1.response)(204, {
|
|
163
|
-
description: 'User PATCH success',
|
|
164
|
-
}),
|
|
165
|
-
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
166
|
-
tslib_1.__param(1, (0, rest_1.requestBody)({
|
|
167
|
-
content: {
|
|
168
|
-
'application/json': {
|
|
169
|
-
schema: (0, rest_1.getModelSchemaRef)(models_1.User, { partial: true }),
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
})),
|
|
173
|
-
tslib_1.__metadata("design:type", Function),
|
|
174
|
-
tslib_1.__metadata("design:paramtypes", [Number, models_1.User]),
|
|
175
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
176
|
-
], UserController.prototype, "updateById", null);
|
|
177
|
-
tslib_1.__decorate([
|
|
178
|
-
(0, rest_1.put)('/users/{id}'),
|
|
179
|
-
(0, rest_1.response)(204, {
|
|
180
|
-
description: 'User PUT success',
|
|
181
|
-
}),
|
|
182
|
-
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
183
|
-
tslib_1.__param(1, (0, rest_1.requestBody)()),
|
|
184
|
-
tslib_1.__metadata("design:type", Function),
|
|
185
|
-
tslib_1.__metadata("design:paramtypes", [Number, models_1.User]),
|
|
186
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
187
|
-
], UserController.prototype, "replaceById", null);
|
|
188
|
-
tslib_1.__decorate([
|
|
189
|
-
(0, rest_1.del)('/users/{id}'),
|
|
190
|
-
(0, rest_1.response)(204, {
|
|
191
|
-
description: 'User DELETE success',
|
|
192
|
-
}),
|
|
193
|
-
tslib_1.__param(0, rest_1.param.path.number('id')),
|
|
194
|
-
tslib_1.__metadata("design:type", Function),
|
|
195
|
-
tslib_1.__metadata("design:paramtypes", [Number]),
|
|
196
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
197
|
-
], UserController.prototype, "deleteById", null);
|
|
198
|
-
tslib_1.__decorate([
|
|
199
|
-
(0, rest_1.get)('/users/sync-sequelize-model'),
|
|
200
|
-
(0, rest_1.response)(200),
|
|
201
|
-
tslib_1.__metadata("design:type", Function),
|
|
202
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
203
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
204
|
-
], UserController.prototype, "syncSequelizeModel", null);
|
|
205
|
-
exports.UserController = UserController = tslib_1.__decorate([
|
|
206
|
-
tslib_1.__param(0, (0, repository_1.repository)(repositories_1.UserRepository)),
|
|
207
|
-
tslib_1.__metadata("design:paramtypes", [repositories_1.UserRepository])
|
|
208
|
-
], UserController);
|
|
209
|
-
//# sourceMappingURL=user.controller.js.map
|
|
210
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/controllers/user.controller.js.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.datasourceTestConfig = void 0;
|
|
4
|
-
exports.datasourceTestConfig = {
|
|
5
|
-
primary: {
|
|
6
|
-
postgresql: {
|
|
7
|
-
name: 'primary',
|
|
8
|
-
connector: 'postgresql',
|
|
9
|
-
host: 'localhost',
|
|
10
|
-
port: 5001,
|
|
11
|
-
user: 'postgres',
|
|
12
|
-
password: 'super-secret',
|
|
13
|
-
database: 'postgres',
|
|
14
|
-
},
|
|
15
|
-
sqlite3: {
|
|
16
|
-
name: 'primary',
|
|
17
|
-
host: '0.0.0.0',
|
|
18
|
-
connector: 'sqlite3',
|
|
19
|
-
database: 'transaction-primary',
|
|
20
|
-
file: ':memory:',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
secondary: {
|
|
24
|
-
postgresql: {
|
|
25
|
-
name: 'secondary',
|
|
26
|
-
connector: 'postgresql',
|
|
27
|
-
host: 'localhost',
|
|
28
|
-
port: 5002,
|
|
29
|
-
user: 'postgres',
|
|
30
|
-
password: 'super-secret',
|
|
31
|
-
database: 'postgres',
|
|
32
|
-
},
|
|
33
|
-
sqlite3: {
|
|
34
|
-
name: 'secondary',
|
|
35
|
-
host: '0.0.0.0',
|
|
36
|
-
connector: 'sqlite3',
|
|
37
|
-
database: 'transaction-secondary',
|
|
38
|
-
file: ':memory:',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
url: {
|
|
42
|
-
postgresql: {
|
|
43
|
-
name: 'using-url',
|
|
44
|
-
connector: 'postgresql',
|
|
45
|
-
url: 'postgres://postgres:super-secret@localhost:5002/postgres',
|
|
46
|
-
},
|
|
47
|
-
sqlite3: {
|
|
48
|
-
name: 'using-url',
|
|
49
|
-
url: 'sqlite::memory:',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
wrongPassword: {
|
|
53
|
-
postgresql: {
|
|
54
|
-
name: 'wrongPassword',
|
|
55
|
-
connector: 'postgresql',
|
|
56
|
-
url: 'postgres://postgres:super-secret-wrong@localhost:5002/postgres',
|
|
57
|
-
},
|
|
58
|
-
sqlite3: {
|
|
59
|
-
name: 'wrongPassword',
|
|
60
|
-
url: 'sqlite::memory:',
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=config.js.map
|
|
65
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/datasources/config.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PrimaryDataSource = exports.config = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@loopback/core");
|
|
6
|
-
const sequelize_1 = require("../../../sequelize");
|
|
7
|
-
const config_1 = require("./config");
|
|
8
|
-
// DEVELOPMENT NOTE:
|
|
9
|
-
// "Few Test cases for database transaction features won't work for in-memory
|
|
10
|
-
// database configuration like sqlite3, change this to postgresql while developing to run
|
|
11
|
-
// all test cases of transactional repo including those of isolation levels.
|
|
12
|
-
// but ensure it's set to sqlite3 before commiting changes."
|
|
13
|
-
exports.config = config_1.datasourceTestConfig['primary']['sqlite3'];
|
|
14
|
-
let PrimaryDataSource = class PrimaryDataSource extends sequelize_1.SequelizeDataSource {
|
|
15
|
-
constructor(dsConfig = exports.config) {
|
|
16
|
-
super(dsConfig);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
exports.PrimaryDataSource = PrimaryDataSource;
|
|
20
|
-
PrimaryDataSource.dataSourceName = 'primary';
|
|
21
|
-
PrimaryDataSource.defaultConfig = exports.config;
|
|
22
|
-
exports.PrimaryDataSource = PrimaryDataSource = tslib_1.__decorate([
|
|
23
|
-
(0, core_1.lifeCycleObserver)('datasource'),
|
|
24
|
-
tslib_1.__param(0, (0, core_1.inject)('datasources.config.primary', { optional: true })),
|
|
25
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
26
|
-
], PrimaryDataSource);
|
|
27
|
-
//# sourceMappingURL=primary.datasource.js.map
|
|
28
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/datasources/primary.datasource.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SecondaryDataSource = exports.config = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const core_1 = require("@loopback/core");
|
|
6
|
-
const sequelize_1 = require("../../../sequelize");
|
|
7
|
-
const config_1 = require("./config");
|
|
8
|
-
// DEVELOPMENT NOTE:
|
|
9
|
-
// "Few Test cases for database transaction features won't work for in-memory
|
|
10
|
-
// database configuration like sqlite3, change this to postgresql while developing to run
|
|
11
|
-
// all test cases of transactional repo including those of isolation levels.
|
|
12
|
-
// but ensure it's set to sqlite3 before commiting changes."
|
|
13
|
-
exports.config = config_1.datasourceTestConfig['secondary']['sqlite3'];
|
|
14
|
-
let SecondaryDataSource = class SecondaryDataSource extends sequelize_1.SequelizeDataSource {
|
|
15
|
-
constructor(dsConfig = exports.config) {
|
|
16
|
-
super(dsConfig);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
exports.SecondaryDataSource = SecondaryDataSource;
|
|
20
|
-
SecondaryDataSource.dataSourceName = 'secondary';
|
|
21
|
-
SecondaryDataSource.defaultConfig = exports.config;
|
|
22
|
-
exports.SecondaryDataSource = SecondaryDataSource = tslib_1.__decorate([
|
|
23
|
-
(0, core_1.lifeCycleObserver)('datasource'),
|
|
24
|
-
tslib_1.__param(0, (0, core_1.inject)('datasources.config.secondary', { optional: true })),
|
|
25
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
26
|
-
], SecondaryDataSource);
|
|
27
|
-
//# sourceMappingURL=secondary.datasource.js.map
|
|
28
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/datasources/secondary.datasource.js.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Appointment = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
let Appointment = class Appointment extends repository_1.Entity {
|
|
7
|
-
constructor(data) {
|
|
8
|
-
super(data);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
exports.Appointment = Appointment;
|
|
12
|
-
tslib_1.__decorate([
|
|
13
|
-
(0, repository_1.property)({
|
|
14
|
-
type: 'number',
|
|
15
|
-
id: true,
|
|
16
|
-
generated: true,
|
|
17
|
-
}),
|
|
18
|
-
tslib_1.__metadata("design:type", Number)
|
|
19
|
-
], Appointment.prototype, "id", void 0);
|
|
20
|
-
tslib_1.__decorate([
|
|
21
|
-
(0, repository_1.property)({
|
|
22
|
-
type: 'number',
|
|
23
|
-
}),
|
|
24
|
-
tslib_1.__metadata("design:type", Number)
|
|
25
|
-
], Appointment.prototype, "doctorId", void 0);
|
|
26
|
-
tslib_1.__decorate([
|
|
27
|
-
(0, repository_1.property)({
|
|
28
|
-
type: 'number',
|
|
29
|
-
}),
|
|
30
|
-
tslib_1.__metadata("design:type", Number)
|
|
31
|
-
], Appointment.prototype, "patientId", void 0);
|
|
32
|
-
exports.Appointment = Appointment = tslib_1.__decorate([
|
|
33
|
-
(0, repository_1.model)(),
|
|
34
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
35
|
-
], Appointment);
|
|
36
|
-
//# sourceMappingURL=appointment.model.js.map
|
|
37
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/appointment.model.js.map
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Book = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
const category_model_1 = require("./category.model");
|
|
7
|
-
let Book = class Book extends repository_1.Entity {
|
|
8
|
-
constructor(data) {
|
|
9
|
-
super(data);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.Book = Book;
|
|
13
|
-
tslib_1.__decorate([
|
|
14
|
-
(0, repository_1.property)({
|
|
15
|
-
type: 'number',
|
|
16
|
-
id: true,
|
|
17
|
-
generated: true,
|
|
18
|
-
}),
|
|
19
|
-
tslib_1.__metadata("design:type", Number)
|
|
20
|
-
], Book.prototype, "id", void 0);
|
|
21
|
-
tslib_1.__decorate([
|
|
22
|
-
(0, repository_1.property)({
|
|
23
|
-
type: 'string',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
tslib_1.__metadata("design:type", String)
|
|
27
|
-
], Book.prototype, "title", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, repository_1.property)({
|
|
30
|
-
type: 'number',
|
|
31
|
-
postgresql: {
|
|
32
|
-
dataType: 'float',
|
|
33
|
-
precision: 20,
|
|
34
|
-
scale: 4,
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
tslib_1.__metadata("design:type", Number)
|
|
38
|
-
], Book.prototype, "rating", void 0);
|
|
39
|
-
tslib_1.__decorate([
|
|
40
|
-
(0, repository_1.belongsTo)(() => category_model_1.Category),
|
|
41
|
-
tslib_1.__metadata("design:type", Number)
|
|
42
|
-
], Book.prototype, "categoryId", void 0);
|
|
43
|
-
exports.Book = Book = tslib_1.__decorate([
|
|
44
|
-
(0, repository_1.model)(),
|
|
45
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
46
|
-
], Book);
|
|
47
|
-
//# sourceMappingURL=book.model.js.map
|
|
48
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/book.model.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Category = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
let Category = class Category extends repository_1.Entity {
|
|
7
|
-
constructor(data) {
|
|
8
|
-
super(data);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
exports.Category = Category;
|
|
12
|
-
tslib_1.__decorate([
|
|
13
|
-
(0, repository_1.property)({
|
|
14
|
-
type: 'number',
|
|
15
|
-
id: true,
|
|
16
|
-
generated: true,
|
|
17
|
-
}),
|
|
18
|
-
tslib_1.__metadata("design:type", Number)
|
|
19
|
-
], Category.prototype, "id", void 0);
|
|
20
|
-
tslib_1.__decorate([
|
|
21
|
-
(0, repository_1.property)({
|
|
22
|
-
type: 'string',
|
|
23
|
-
required: true,
|
|
24
|
-
}),
|
|
25
|
-
tslib_1.__metadata("design:type", String)
|
|
26
|
-
], Category.prototype, "name", void 0);
|
|
27
|
-
exports.Category = Category = tslib_1.__decorate([
|
|
28
|
-
(0, repository_1.model)(),
|
|
29
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
30
|
-
], Category);
|
|
31
|
-
//# sourceMappingURL=category.model.js.map
|
|
32
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/category.model.js.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Developer = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
const programming_language_model_1 = require("./programming-language.model");
|
|
7
|
-
let Developer = class Developer extends repository_1.Entity {
|
|
8
|
-
constructor(data) {
|
|
9
|
-
super(data);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.Developer = Developer;
|
|
13
|
-
tslib_1.__decorate([
|
|
14
|
-
(0, repository_1.property)({
|
|
15
|
-
type: 'number',
|
|
16
|
-
id: true,
|
|
17
|
-
generated: true,
|
|
18
|
-
}),
|
|
19
|
-
tslib_1.__metadata("design:type", Number)
|
|
20
|
-
], Developer.prototype, "id", void 0);
|
|
21
|
-
tslib_1.__decorate([
|
|
22
|
-
(0, repository_1.property)({
|
|
23
|
-
type: 'string',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
tslib_1.__metadata("design:type", String)
|
|
27
|
-
], Developer.prototype, "name", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, repository_1.referencesMany)(() => programming_language_model_1.ProgrammingLanguage, {}, {
|
|
30
|
-
type: ['string'],
|
|
31
|
-
postgresql: { dataType: 'varchar[]' },
|
|
32
|
-
}),
|
|
33
|
-
tslib_1.__metadata("design:type", Array)
|
|
34
|
-
], Developer.prototype, "programmingLanguageIds", void 0);
|
|
35
|
-
tslib_1.__decorate([
|
|
36
|
-
(0, repository_1.property)({
|
|
37
|
-
type: 'string',
|
|
38
|
-
hidden: true,
|
|
39
|
-
}),
|
|
40
|
-
tslib_1.__metadata("design:type", String)
|
|
41
|
-
], Developer.prototype, "apiSecret", void 0);
|
|
42
|
-
exports.Developer = Developer = tslib_1.__decorate([
|
|
43
|
-
(0, repository_1.model)(),
|
|
44
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
45
|
-
], Developer);
|
|
46
|
-
//# sourceMappingURL=developer.model.js.map
|
|
47
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/developer.model.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Doctor = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
const appointment_model_1 = require("./appointment.model");
|
|
7
|
-
const patient_model_1 = require("./patient.model");
|
|
8
|
-
let Doctor = class Doctor extends repository_1.Entity {
|
|
9
|
-
constructor(data) {
|
|
10
|
-
super(data);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
exports.Doctor = Doctor;
|
|
14
|
-
tslib_1.__decorate([
|
|
15
|
-
(0, repository_1.property)({
|
|
16
|
-
type: 'number',
|
|
17
|
-
id: true,
|
|
18
|
-
generated: true,
|
|
19
|
-
}),
|
|
20
|
-
tslib_1.__metadata("design:type", Number)
|
|
21
|
-
], Doctor.prototype, "id", void 0);
|
|
22
|
-
tslib_1.__decorate([
|
|
23
|
-
(0, repository_1.property)({
|
|
24
|
-
type: 'string',
|
|
25
|
-
required: true,
|
|
26
|
-
}),
|
|
27
|
-
tslib_1.__metadata("design:type", String)
|
|
28
|
-
], Doctor.prototype, "name", void 0);
|
|
29
|
-
tslib_1.__decorate([
|
|
30
|
-
(0, repository_1.hasMany)(() => patient_model_1.Patient, {
|
|
31
|
-
through: {
|
|
32
|
-
model: () => appointment_model_1.Appointment,
|
|
33
|
-
keyFrom: 'doctorId',
|
|
34
|
-
keyTo: 'patientId',
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
tslib_1.__metadata("design:type", Array)
|
|
38
|
-
], Doctor.prototype, "patients", void 0);
|
|
39
|
-
exports.Doctor = Doctor = tslib_1.__decorate([
|
|
40
|
-
(0, repository_1.model)(),
|
|
41
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
42
|
-
], Doctor);
|
|
43
|
-
//# sourceMappingURL=doctor.model.js.map
|
|
44
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/doctor.model.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./appointment.model"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./book.model"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./category.model"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./developer.model"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./doctor.model"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./patient.model"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./product.model"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./programming-language.model"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./task.model"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./todo-list.model"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./todo.model"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./user.model"), exports);
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
17
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/index.js.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Patient = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
let Patient = class Patient extends repository_1.Entity {
|
|
7
|
-
constructor(data) {
|
|
8
|
-
super(data);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
exports.Patient = Patient;
|
|
12
|
-
tslib_1.__decorate([
|
|
13
|
-
(0, repository_1.property)({
|
|
14
|
-
type: 'number',
|
|
15
|
-
id: true,
|
|
16
|
-
generated: true,
|
|
17
|
-
}),
|
|
18
|
-
tslib_1.__metadata("design:type", Number)
|
|
19
|
-
], Patient.prototype, "id", void 0);
|
|
20
|
-
tslib_1.__decorate([
|
|
21
|
-
(0, repository_1.property)({
|
|
22
|
-
type: 'string',
|
|
23
|
-
required: true,
|
|
24
|
-
}),
|
|
25
|
-
tslib_1.__metadata("design:type", String)
|
|
26
|
-
], Patient.prototype, "name", void 0);
|
|
27
|
-
exports.Patient = Patient = tslib_1.__decorate([
|
|
28
|
-
(0, repository_1.model)(),
|
|
29
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
30
|
-
], Patient);
|
|
31
|
-
//# sourceMappingURL=patient.model.js.map
|
|
32
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/patient.model.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Product = exports.TableInSecondaryDB = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
exports.TableInSecondaryDB = 'products';
|
|
7
|
-
let Product = class Product extends repository_1.Entity {
|
|
8
|
-
constructor(data) {
|
|
9
|
-
super(data);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.Product = Product;
|
|
13
|
-
tslib_1.__decorate([
|
|
14
|
-
(0, repository_1.property)({
|
|
15
|
-
type: 'number',
|
|
16
|
-
id: true,
|
|
17
|
-
generated: true,
|
|
18
|
-
}),
|
|
19
|
-
tslib_1.__metadata("design:type", Number)
|
|
20
|
-
], Product.prototype, "id", void 0);
|
|
21
|
-
tslib_1.__decorate([
|
|
22
|
-
(0, repository_1.property)({
|
|
23
|
-
type: 'string',
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
tslib_1.__metadata("design:type", String)
|
|
27
|
-
], Product.prototype, "name", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, repository_1.property)({
|
|
30
|
-
type: 'number',
|
|
31
|
-
}),
|
|
32
|
-
tslib_1.__metadata("design:type", Number)
|
|
33
|
-
], Product.prototype, "price", void 0);
|
|
34
|
-
exports.Product = Product = tslib_1.__decorate([
|
|
35
|
-
(0, repository_1.model)({
|
|
36
|
-
name: exports.TableInSecondaryDB,
|
|
37
|
-
}),
|
|
38
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
39
|
-
], Product);
|
|
40
|
-
//# sourceMappingURL=product.model.js.map
|
|
41
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/product.model.js.map
|