cnc-speed-calculator/sequelize/models/user.model.js
Sebastien Clement 39a02da5f4 🔨 Add manager
2021-01-30 20:33:06 +01:00

26 lines
620 B
JavaScript

const { DataTypes } = require('sequelize');
module.exports = (sequelize) => {
sequelize.define('user', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: DataTypes.INTEGER
},
username: {
allowNull: false,
type: DataTypes.STRING,
unique: true
},
password: {
allowNull: false,
type: DataTypes.STRING,
},
is_admin: {
allowNull: false,
defaultValue: false,
type: DataTypes.BOOLEAN
}
})
}