periodicjs
Version:
Periodic is a rapid enterprise application framework for data driven web and mobile applications.
31 lines (30 loc) • 627 B
JavaScript
;
const lowkie = require('lowkie');
const Schema = lowkie.Schema;
const ObjectId = Schema.ObjectId;
const scheme = {
id: ObjectId,
userroleid: Number,
title: String,
name: String,
privileges: [{
type: ObjectId,
ref: 'Userprivilege'
}],
author: {
type: ObjectId,
ref: 'User'
},
description: String,
random: Number
};
module.exports = {
scheme,
options: {},
coreDataOptions: {
docid: '_id',
sort: { createdat: -1, },
search: ['title', 'name', 'description'],
population: 'privileges author',
}
};