1
0
Fork 0
arangodb/js/server/modules/@arangodb/foxx/templates/dcModel.js.tmpl

20 lines
404 B
Cheetah

'use strict';
const _ = require('lodash');
const joi = require('joi');
module.exports = {
schema: {
// Describe the attributes with joi here
_key: joi.string()
},
forClient(obj) {
// Implement outgoing transformations here
obj = _.omit(obj, ['_id', '_rev', '_oldRev']);
return obj;
},
fromClient(obj) {
// Implement incoming transformations here
return obj;
}
};