Arangodb foxx模型中的属性选项
有没有办法指定Foxx.Model的可接受值 理想的情况是:Arangodb foxx模型中的属性选项,arangodb,nosql,Arangodb,Nosql,有没有办法指定Foxx.Model的可接受值 理想的情况是: var ExampleModel = Foxx.Model.Extend({}, { attributes: { field: { type: "string", required: true, values: ['one', 'two'] } } }); 提前感谢。自上次发布ArangoDB以来,这是可能的。它具有,因此您现在可以执行以下操作: var Foxx = require("org/ar
var ExampleModel = Foxx.Model.Extend({},
{
attributes: {
field: { type: "string", required: true, values: ['one', 'two'] }
}
});
提前感谢。自上次发布ArangoDB以来,这是可能的。它具有,因此您现在可以执行以下操作:
var Foxx = require("org/arangodb/foxx");
var joi = require("joi");
var ExampleModle = Foxx.Model.extend({
schema: {
field: joi.string().required().valid(['one', 'two'])
}
});
有关更多信息,请参阅。很有趣,非常感谢,这绝对可以