UNPKG

@loopback/repository

Version:

Define and implement a common set of interfaces for interacting with databases

25 lines 751 B
"use strict"; // Copyright IBM Corp. and LoopBack contributors 2017,2019. All Rights Reserved. // Node module: @loopback/repository // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT Object.defineProperty(exports, "__esModule", { value: true }); exports.ModelType = void 0; const object_1 = require("./object"); /** * Model type */ class ModelType extends object_1.ObjectType { constructor(modelClass) { super(modelClass); this.modelClass = modelClass; this.name = 'model'; } serialize(value) { if (value == null) return value; return value.toJSON(); } } exports.ModelType = ModelType; //# sourceMappingURL=model.js.map