1 | ;
|
2 | // Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved.
|
3 | // Node module: @loopback/repository
|
4 | // This file is licensed under the MIT License.
|
5 | // License text available at https://opensource.org/licenses/MIT
|
6 | Object.defineProperty(exports, "__esModule", { value: true });
|
7 | exports.ModelType = void 0;
|
8 | const object_1 = require("./object");
|
9 | /**
|
10 | * Model type
|
11 | */
|
12 | class ModelType extends object_1.ObjectType {
|
13 | constructor(modelClass) {
|
14 | super(modelClass);
|
15 | this.modelClass = modelClass;
|
16 | this.name = 'model';
|
17 | }
|
18 | serialize(value) {
|
19 | if (value == null)
|
20 | return value;
|
21 | return value.toJSON();
|
22 | }
|
23 | }
|
24 | exports.ModelType = ModelType;
|
25 | //# sourceMappingURL=model.js.map |
\ | No newline at end of file |