mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
33 lines
668 B
JavaScript
33 lines
668 B
JavaScript
const { DataTypes, Model } = require('sequelize')
|
|
|
|
module.exports = (sequelize) => {
|
|
class User extends Model { }
|
|
|
|
User.init({
|
|
id: {
|
|
type: DataTypes.UUID,
|
|
defaultValue: DataTypes.UUIDV4,
|
|
primaryKey: true
|
|
},
|
|
username: DataTypes.STRING,
|
|
email: DataTypes.STRING,
|
|
pash: DataTypes.STRING,
|
|
type: DataTypes.STRING,
|
|
token: DataTypes.STRING,
|
|
isActive: {
|
|
type: DataTypes.BOOLEAN,
|
|
defaultValue: false
|
|
},
|
|
isLocked: {
|
|
type: DataTypes.BOOLEAN,
|
|
defaultValue: false
|
|
},
|
|
lastSeen: DataTypes.DATE,
|
|
extraData: DataTypes.JSON
|
|
}, {
|
|
sequelize,
|
|
modelName: 'user'
|
|
})
|
|
|
|
return User
|
|
} |