periodicjs
Version:
Periodic is a rapid enterprise application framework for data driven web and mobile applications.
50 lines (45 loc) • 781 B
JavaScript
;
const Sequelize = require('sequelize');
const scheme = {
_id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
},
title: {
type: Sequelize.STRING,
},
name: {
type: Sequelize.STRING,
},
description: {
type: Sequelize.TEXT,
},
datatype: {
type: Sequelize.STRING,
},
// data: {
// },
defaultvalue: {
type: Sequelize.STRING,
}
};
const options = {
underscored: true,
timestamps: true,
indexes: [{
fields: ['createdat'],
}],
};
const associations = [
];
module.exports = {
scheme,
options,
associations,
coreDataOptions: {
docid: ['_id', 'name'],
sort: { createdat: -1, },
search: ['title', 'name', ],
},
};