UNPKG

sails-permissions-sequelize

Version:

Sequelize version of : Comprehensive user permissions and entitlements system for sails.js and Waterline. Supports user authentication with passport.js, role-based permissioning, object ownership, and row-level security.

50 lines (46 loc) 896 B
/** * RequestLog.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ 'use strict'; module.exports = { autoPK: false, autoCreatedBy: false, autoUpdatedAt: false, attributes: { id: { type: Sequelize.STRING, primaryKey: true }, ipAddress: { type: Sequelize.STRING }, method: { type: Sequelize.STRING }, url: { type: Sequelize.STRING, validate: { isUrl: true } }, body: { type: Sequelize.JSON }, // user: { // model: 'User' // }, model: { type: Sequelize.STRING } }, associate: function associate() { RequestLog.hasOne(User); }, options: { tableName: 'requestlog', classMethods: {}, instanceMethods: {}, hooks: {} } };