audiobookshelf/server/models/Genre.js
2023-03-12 14:51:45 -05:00

19 lines
333 B
JavaScript

const { DataTypes, Model } = require('sequelize')
module.exports = (sequelize) => {
class Genre extends Model { }
Genre.init({
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true
},
name: DataTypes.STRING
}, {
sequelize,
modelName: 'Genre'
})
return Genre
}