mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
25 lines
540 B
JavaScript
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
|
|
} |