Files
lunchrun.me/api/models/Invitee.js
2014-06-24 22:49:02 -05:00

37 lines
680 B
JavaScript

/**
* Invitee
*
* @module :: Model
* @description :: A short summary of how this model works and what it represents.
* @docs :: http://sailsjs.org/#!documentation/models
*/
module.exports = {
attributes: {
name: {
type: 'string',
required: true
},
email: {
type: 'email',
required: true
},
order: {
type: 'string'
},
isCreator: {
type: 'boolean'
},
run_id: {
type: 'string'
}
},
afterCreate: function(values, next) {
EmailService.sendOrderEmail(values);
next();
},
};