UNPKG

@mvx/model

Version:

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

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