var db = require('../config');
var Link = require('./link.js')

var Click = db.Model.extend({
  tableName: 'clicks',
  hasTimestamps: true,
  link: function() {
    return this.belongsTo(Link, 'link_id');
  }
});

module.exports = Click;

@@ -28,20 +28,53 @@
 ');%0Avar 
-Link
+User = require('./user.js')%0Avar Event
  = requi
@@ -79,20 +79,21 @@
 uire('./
-link
+event
 .js')%0A%0Av
@@ -95,21 +95,22 @@
 ')%0A%0Avar 
-Click
+Invite
  = db.Mo
@@ -140,13 +140,14 @@
 e: '
-click
+invite
 s',%0A
@@ -171,20 +171,20 @@
 true,%0A  
-link
+user
 : functi
@@ -210,29 +210,96 @@
 his.
-belongsTo(Link, 'link
+hasOne(User, 'user_id');%0A  %7D,%0A  event: function() %7B%0A    return this.hasOne(Event, 'event
 _id'
@@ -331,11 +331,12 @@
 s = 
-Click
+Invite
 ;%0A

Complete basic models and collections for users, events and invites