Skip to content

Instantly share code, notes, and snippets.

@eveiga
Created July 20, 2012 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eveiga/3150943 to your computer and use it in GitHub Desktop.
Save eveiga/3150943 to your computer and use it in GitHub Desktop.
sequelize models
module.exports = function(db){
var self = {
Widget : db.client.define('Widget', {
name: db.module.STRING,
lang: db.module.STRING
}),
ActiveElement : db.client.define('ActiveElement', {})
};
self.Widget.hasMany(self.ActiveElement);
self.ActiveElement.hasMany(self.Widget);
return self;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment