audiobookshelf/server/models/User.js
2023-03-12 14:51:45 -05:00

25 lines
514 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,
pash: DataTypes.STRING,
type: DataTypes.STRING,
token: DataTypes.STRING,
isActive: DataTypes.BOOLEAN,
isLocked: DataTypes.BOOLEAN,
lastSeen: DataTypes.DATE
}, {
sequelize,
modelName: 'User'
})
return User
}