You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

13 lines
423 B

module.exports = (sequelize, DataTypes) => {
var Ranking = sequelize.define('Ranking', {
rank: DataTypes.DOUBLE
});
Ranking.associate = function (models) {
models.Ranking.hasOne(models.Tag, { as: 'tagContext' });
models.Ranking.hasOne(models.Artist, { as: 'artistContext' });
models.Ranking.belongsToMany(models.Song, { through: 'SongRankings' });
};
return Ranking;
};