models/Votes.js
// This object defines the relations to other models.
This object defines the relations to other models.
This object defines the relations to other models .
static get relationMappings() {
    return {
      user: {
        relation: Model.BelongsToOneRelation,
        modelClass: `${__dirname}/Users`,
        join: {
          from: 'votes.user_id',
          to: 'users.id'
        }
      },
      feed_item: {
        relation: Model.BelongsToOneRelation,
        modelClass: `${__dirname}/FeedItems`,
        join: {
          from: 'votes.feed_item_id',
          to: 'feed_items.id'
        }
      }
    };
  }
static get relationMappings ( ) { return { user : { relation : Model . BelongsToOneRelation , modelClass : ` ${ __dirname } ` , join : { from : 'votes.user_id' , to : 'users.id' } } , feed_item : { relation : Model . BelongsToOneRelation , modelClass : ` ${ __dirname } ` , join : { from : 'votes.feed_item_id' , to : 'feed_items.id' } } } ; }
This object defines the relations to other models.
This object defines the relations to other models .