diff --git a/Alloy SQL Model Example/app/models/user_icons.js b/Alloy SQL Model Example/app/models/user_icons.js new file mode 100644 index 0000000..f92cf41 --- /dev/null +++ b/Alloy SQL Model Example/app/models/user_icons.js @@ -0,0 +1,38 @@ +exports.definition = { + + config: { + "columns": { + "user_icon_id":"INT PRIMARY KEY AUTOINCREMENT", + "user_id":"tinyint", + "icon_id":"int", + "updated":"datetime" + }, + "adapter": { + "type": "sql", + "collection_name": "user_icons", + "idAttribute": "user_icon_id" + } + }, + + extendModel: function(Model) { + _.extend(Model.prototype, { + + // extended functions go here + + }); // end extend + + return Model; + }, + + + extendCollection: function(Collection) { + _.extend(Collection.prototype, { + + // extended functions go here + + }); // end extend + + return Collection; + } + +}