95 lines
1.8 KiB
Plaintext
Raw Normal View History

2016-03-18 11:12:50 +01:00
'use strict';
/**
* Module dependencies
*/
// Public node modules.
const _ = require('lodash');
// Settings for the `<%= globalID %>` model.
const settings = require('./<%= globalID %>.settings.json');
/**
* Export the `<%= globalID %>` model
*/
module.exports = {
/**
* Basic settings
*/
// The identity to use.
identity: settings.identity,
// The connection to use.
connection: settings.connection,
// Do you want to respect schema?
schema: settings.schema,
// Limit for a get request on the list.
limit: settings.limit,
// Merge simple attributes from settings with those ones.
attributes: _.merge(settings.attributes, {
}),
// Do you automatically want to have time data?
autoCreatedAt: settings.autoCreatedAt,
autoUpdatedAt: settings.autoUpdatedAt
/**
* Lifecycle callbacks on validate
*/
// Before validating value
// beforeValidate: function (values, next) {
// next();
// }
/**
* Lifecycle callbacks on create
*/
// Before creating a value.
// beforeCreate: (model, attrs, options) => {
// return new Promise();
// },
// After creating a value.
// afterCreate: (model, attrs, options) => {
// return new Promise();
// },
/**
* Lifecycle callbacks on update
*/
// Before updating a value.
// beforeUpdate: (model, attrs, options) => {
// return new Promise();
// },
// After updating a value.
// afterUpdate: (model, attrs, options) => {
// return new Promise();
// },
/**
* Lifecycle callbacks on destroy
*/
// Before updating a value.
// beforeDestroy: (model, attrs, options) => {
// return new Promise();
// },
// After updating a value.
// afterDestroy: (model, attrs, options) => {
// return new Promise();
// }
};