audiobookshelf/server/models/User.js

26 lines
543 B
JavaScript
Raw Normal View History

const { DataTypes, Model } = require('sequelize')
module.exports = (sequelize) => {
class User extends Model { }
User.init({
2023-03-12 20:51:45 +01:00
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
primaryKey: true
},
username: DataTypes.STRING,
email: DataTypes.STRING,
2023-03-12 20:51:45 +01:00
pash: DataTypes.STRING,
type: DataTypes.STRING,
token: DataTypes.STRING,
isActive: DataTypes.BOOLEAN,
isLocked: DataTypes.BOOLEAN,
lastSeen: DataTypes.DATE
}, {
sequelize,
modelName: 'User'
})
return User
}