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