mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
25 lines
536 B
JavaScript
25 lines
536 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,
|
||
|
scanVersion: DataTypes.STRING
|
||
|
}, {
|
||
|
sequelize,
|
||
|
modelName: 'Library'
|
||
|
})
|
||
|
|
||
|
return Library
|
||
|
}
|