models/FeedItems.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 {
      votes: {
        relation: Model.HasManyRelation,
        modelClass: `${__dirname}/Votes`,
        join: {
          from: 'feed_items.id',
          to: 'votes.feed_item_id'
        }
      },
      user: {
        relation: Model.BelongsToOneRelation,
        modelClass: `${__dirname}/Users`,
        join: {
          from: 'feed_items.user_id',
          to: 'users.id'
        }
      },
    };
  }
static get relationMappings ( ) { return { votes : { relation : Model . HasManyRelation , modelClass : ` ${ __dirname } ` , join : { from : 'feed_items.id' , to : 'votes.feed_item_id' } } , user : { relation : Model . BelongsToOneRelation , modelClass : ` ${ __dirname } ` , join : { from : 'feed_items.user_id' , to : 'users.id' } } , } ; }
This object defines the relations to other models.
This object defines the relations to other models .