21 lines
490 B
JavaScript
21 lines
490 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,
|
||
|
}
|
||
|
})
|
||
|
}
|