Created
May 22, 2016 04:03
-
-
Save vjefri/e6fac1a4b01fb104edbdf79feca9138c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// models/tweet.js | |
'use strict'; | |
const Nodal = require('nodal'); | |
const User = Nodal.require('app/models/user.js'); // import me | |
class Tweet extends Nodal.Model {} | |
Tweet.setDatabase(Nodal.require('db/main.js')); | |
Tweet.setSchema(Nodal.my.Schema.models.Tweet); | |
Tweet.joinsTo(User, {multiple: true}) // add me | |
return Tweet; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment