audiobookshelf/server/models/Library.js

25 lines
540 B
JavaScript
Raw Normal View History

2023-03-12 20:51:45 +01:00
const { DataTypes, Model } = require('sequelize')
module.exports = (sequelize) => {
class Library extends Model { }
Library.init({
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true
},
name: DataTypes.STRING,
displayOrder: DataTypes.INTEGER,
icon: DataTypes.STRING,
mediaType: DataTypes.STRING,
provider: DataTypes.STRING,
lastScan: DataTypes.DATE,
2023-03-15 23:42:35 +01:00
lastScanVersion: DataTypes.STRING
2023-03-12 20:51:45 +01:00
}, {
sequelize,
modelName: 'Library'
})
return Library
}