audiobookshelf/server/models/Genre.js

20 lines
366 B
JavaScript
Raw Permalink 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
},
2023-03-18 22:56:57 +01:00
name: DataTypes.STRING,
cleanName: DataTypes.STRING
2023-03-12 20:51:45 +01:00
}, {
sequelize,
2023-03-19 21:19:22 +01:00
modelName: 'genre'
2023-03-12 20:51:45 +01:00
})
return Genre
}