1
0
mirror of https://github.com/advplyr/audiobookshelf.git synced 2025-04-02 01:16:54 +02:00
audiobookshelf/server/models/Library.js
2023-03-19 15:19:22 -05:00

25 lines
540 B
JavaScript

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,
lastScanVersion: DataTypes.STRING
}, {
sequelize,
modelName: 'library'
})
return Library
}