UNPKG

sails-generate-forestay

Version:

Build dynamic user interfaces quickly and easily! Use the forestay generator to scaffold complete CRUD interfaces using just your SailsJS model attributes.

57 lines (53 loc) 1.84 kB
/** * Contact.js * * @description :: A model definition. Represents a database table/collection/etc. * @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models */ module.exports = { forestay: { index: { itemsPerPage: 10, showId: true, showCreatedAt: true, showUpdatedAt: true, beforeRender: function (req, res, forestay, next) { return next(null, forestay) }, footerHtml: `<p style='font-size: 8px'>Note that these CRUD scaffolds are really meant only for administration purposes, and not for public users to use. Use at your own risk</p>` }, createUpdate: { labelWidth: 200 }, title: 'Forestay <%= upperForestay %>', onSaveLoadIndex: false, urlPrefix: '/<%= lowerForestay %>/' }, attributes: { // ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗ // ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗ // ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝ // example // fullName: { // // type: 'string', // required: true, // description: 'Full legal name', // maxLength: 120, // example: 'Lisa Microwave van der Jenny', // meta: { // forestay:{ // label: "Contact Name", // // } // // } // }, // ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗ // ║╣ ║║║╠╩╗║╣ ║║╚═╗ // ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═ // ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗ // ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗ // ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝ } }