audiobookshelf/server/models/Genre.js

19 lines
333 B
JavaScript
Raw Normal View History

2023-03-12 20:51:45 +01:00
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
}