UNPKG

final-orm

Version:

> Please check out https://github.com/oknoah/final and https://github.com/oknoah/final/packages/arangolize for similar projects that MAY be more up to date

27 lines (19 loc) 784 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _schema = require('../schemas/schema'); var _schema2 = _interopRequireDefault(_schema); var _fieldType = require('../fields/field-type'); var _fieldType2 = _interopRequireDefault(_fieldType); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } class EdgeSchema extends _schema2.default { constructor(userSchema = null, basePath = [], isRootSchema = true) { super(userSchema, basePath, isRootSchema); if (isRootSchema) { this.fields.push(new _fieldType2.default(basePath, ['_from'], String, null, true)); this.fields.push(new _fieldType2.default(basePath, ['_to'], String, null, true)); } } } exports.default = EdgeSchema;