@loopback/sequelize 0.5.2 → 0.5.3
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.repository.base.d.ts +19 -4
- package/dist/sequelize/sequelize.repository.base.js +10 -1
- package/dist/sequelize/sequelize.repository.base.js.map +1 -1
- package/package.json +12 -11
- package/src/sequelize/sequelize.repository.base.ts +37 -8
- 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,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
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProgrammingLanguage = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
let ProgrammingLanguage = class ProgrammingLanguage extends repository_1.Entity {
|
|
7
|
-
constructor(data) {
|
|
8
|
-
super(data);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
exports.ProgrammingLanguage = ProgrammingLanguage;
|
|
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
|
-
], ProgrammingLanguage.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
|
-
], ProgrammingLanguage.prototype, "name", void 0);
|
|
27
|
-
tslib_1.__decorate([
|
|
28
|
-
(0, repository_1.property)({
|
|
29
|
-
type: 'string',
|
|
30
|
-
hidden: true,
|
|
31
|
-
}),
|
|
32
|
-
tslib_1.__metadata("design:type", String)
|
|
33
|
-
], ProgrammingLanguage.prototype, "secret", void 0);
|
|
34
|
-
exports.ProgrammingLanguage = ProgrammingLanguage = tslib_1.__decorate([
|
|
35
|
-
(0, repository_1.model)(),
|
|
36
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
37
|
-
], ProgrammingLanguage);
|
|
38
|
-
//# sourceMappingURL=programming-language.model.js.map
|
|
39
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/programming-language.model.js.map
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Task = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
let Task = class Task extends repository_1.Entity {
|
|
7
|
-
constructor(data) {
|
|
8
|
-
super(data);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
exports.Task = Task;
|
|
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
|
-
], Task.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
|
-
], Task.prototype, "title", void 0);
|
|
27
|
-
tslib_1.__decorate([
|
|
28
|
-
(0, repository_1.property)({
|
|
29
|
-
type: 'string',
|
|
30
|
-
defaultFn: 'uuid',
|
|
31
|
-
}),
|
|
32
|
-
tslib_1.__metadata("design:type", String)
|
|
33
|
-
], Task.prototype, "uuidv1", void 0);
|
|
34
|
-
tslib_1.__decorate([
|
|
35
|
-
(0, repository_1.property)({
|
|
36
|
-
type: 'string',
|
|
37
|
-
defaultFn: 'uuidv4',
|
|
38
|
-
}),
|
|
39
|
-
tslib_1.__metadata("design:type", String)
|
|
40
|
-
], Task.prototype, "uuidv4", void 0);
|
|
41
|
-
tslib_1.__decorate([
|
|
42
|
-
(0, repository_1.property)({
|
|
43
|
-
type: 'string',
|
|
44
|
-
defaultFn: 'shortid',
|
|
45
|
-
}),
|
|
46
|
-
tslib_1.__metadata("design:type", String)
|
|
47
|
-
], Task.prototype, "shortId", void 0);
|
|
48
|
-
tslib_1.__decorate([
|
|
49
|
-
(0, repository_1.property)({
|
|
50
|
-
type: 'string',
|
|
51
|
-
defaultFn: 'nanoid',
|
|
52
|
-
}),
|
|
53
|
-
tslib_1.__metadata("design:type", String)
|
|
54
|
-
], Task.prototype, "nanoId", void 0);
|
|
55
|
-
tslib_1.__decorate([
|
|
56
|
-
(0, repository_1.property)({
|
|
57
|
-
type: 'number',
|
|
58
|
-
defaultFn: 'customAlias',
|
|
59
|
-
}),
|
|
60
|
-
tslib_1.__metadata("design:type", Number)
|
|
61
|
-
], Task.prototype, "customAlias", void 0);
|
|
62
|
-
tslib_1.__decorate([
|
|
63
|
-
(0, repository_1.property)({
|
|
64
|
-
type: Date,
|
|
65
|
-
defaultFn: 'now',
|
|
66
|
-
}),
|
|
67
|
-
tslib_1.__metadata("design:type", Date)
|
|
68
|
-
], Task.prototype, "createdAt", void 0);
|
|
69
|
-
exports.Task = Task = tslib_1.__decorate([
|
|
70
|
-
(0, repository_1.model)(),
|
|
71
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
72
|
-
], Task);
|
|
73
|
-
//# sourceMappingURL=task.model.js.map
|
|
74
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/task.model.js.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TodoList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
const todo_model_1 = require("./todo.model");
|
|
7
|
-
let TodoList = class TodoList extends repository_1.Entity {
|
|
8
|
-
constructor(data) {
|
|
9
|
-
super(data);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.TodoList = TodoList;
|
|
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
|
-
], TodoList.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
|
-
], TodoList.prototype, "title", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, repository_1.hasMany)(() => todo_model_1.Todo, {
|
|
30
|
-
keyTo: 'todoListId',
|
|
31
|
-
}),
|
|
32
|
-
tslib_1.__metadata("design:type", Array)
|
|
33
|
-
], TodoList.prototype, "todos", void 0);
|
|
34
|
-
tslib_1.__decorate([
|
|
35
|
-
(0, repository_1.property)({
|
|
36
|
-
type: 'number',
|
|
37
|
-
}),
|
|
38
|
-
tslib_1.__metadata("design:type", Number)
|
|
39
|
-
], TodoList.prototype, "user", void 0);
|
|
40
|
-
exports.TodoList = TodoList = tslib_1.__decorate([
|
|
41
|
-
(0, repository_1.model)(),
|
|
42
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
43
|
-
], TodoList);
|
|
44
|
-
//# sourceMappingURL=todo-list.model.js.map
|
|
45
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/todo-list.model.js.map
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Todo = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const repository_1 = require("@loopback/repository");
|
|
6
|
-
const todo_list_model_1 = require("./todo-list.model");
|
|
7
|
-
let Todo = class Todo extends repository_1.Entity {
|
|
8
|
-
constructor(data) {
|
|
9
|
-
super(data);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.Todo = Todo;
|
|
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
|
-
], Todo.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
|
-
], Todo.prototype, "title", void 0);
|
|
28
|
-
tslib_1.__decorate([
|
|
29
|
-
(0, repository_1.property)({
|
|
30
|
-
name: 'is_complete',
|
|
31
|
-
type: 'boolean',
|
|
32
|
-
}),
|
|
33
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
34
|
-
], Todo.prototype, "isComplete", void 0);
|
|
35
|
-
tslib_1.__decorate([
|
|
36
|
-
(0, repository_1.belongsTo)(() => todo_list_model_1.TodoList, { name: 'todoList' }, { name: 'todo_list_id' }),
|
|
37
|
-
tslib_1.__metadata("design:type", Number)
|
|
38
|
-
], Todo.prototype, "todoListId", void 0);
|
|
39
|
-
exports.Todo = Todo = tslib_1.__decorate([
|
|
40
|
-
(0, repository_1.model)(),
|
|
41
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
42
|
-
], Todo);
|
|
43
|
-
//# sourceMappingURL=todo.model.js.map
|
|
44
|
-
//# sourceMappingURL=/Users/dianalau/code/loopback/loopback-next/extensions/sequelize/dist/__tests__/fixtures/models/todo.model.js.map
|