audiobookshelf/server/models/Library.js

25 lines
540 B
JavaScript
Raw Permalink 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,
2023-03-19 21:19:22 +01:00
modelName: 'library'
2023-03-12 20:51:45 +01:00
})
return Library
}