UNPKG

@mvx/model

Version:

@mvx/model is model for mvc frameworker on server.

27 lines (25 loc) 699 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ForeignKey = void 0; var Field_1 = require("./Field"); var ioc_1 = require("@tsdi/ioc"); /** * ForeignKey decorator. */ exports.ForeignKey = Field_1.createFieldDecorator('ForeignKey', [ function (ctx, next) { var arg = ctx.currArg; if (ioc_1.isString(arg)) { ctx.metadata.foreignKey = arg; ctx.next(next); } }, function (ctx, next) { var arg = ctx.currArg; if (ioc_1.isClass(arg)) { ctx.metadata.refType = arg; ctx.next(next); } } ]); //# sourceMappingURL=../sourcemaps/decorators/ForeignKey.js.map