mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
20 lines
366 B
JavaScript
20 lines
366 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,
|
|
cleanName: DataTypes.STRING
|
|
}, {
|
|
sequelize,
|
|
modelName: 'genre'
|
|
})
|
|
|
|
return Genre
|
|
} |