Use native esm
This commit is contained in:
parent
c4354a6600
commit
70bd12a4d6
37 changed files with 379 additions and 119 deletions
|
@ -1,24 +0,0 @@
|
|||
export default function (sequelize, DataTypes) {
|
||||
const Artist = sequelize.define('artist', {
|
||||
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
|
||||
name: DataTypes.TEXT,
|
||||
streamUrl: DataTypes.TEXT,
|
||||
purchaseUrl: DataTypes.TEXT,
|
||||
artworkSmall: DataTypes.TEXT,
|
||||
artworkLarge: DataTypes.TEXT,
|
||||
}, {
|
||||
paranoid: true,
|
||||
indexes: [
|
||||
{
|
||||
fields: ['name'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
Artist.associate = function associate(models) {
|
||||
Artist.hasMany(models.track);
|
||||
Artist.hasMany(models.album);
|
||||
};
|
||||
|
||||
return Artist;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue