Skip to content

Instantly share code, notes, and snippets.

@tarlepp
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save tarlepp/6113c388dd3caa1cbfd3 to your computer and use it in GitHub Desktop.

Select an option

Save tarlepp/6113c388dd3caa1cbfd3 to your computer and use it in GitHub Desktop.
// User Model
attributes: {
username: {
type: 'string',
required: true,
unique: true,
},
sender: {
model: conversation
},
recipient: {
model: conversation
}
}
// Conversation model
attributes: {
messages: {
collection: 'message',
via: 'conversation'
}
}
// Message model
attributes: {
text: {
type: 'string'
},
conversation: {
model: 'conversation'
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment