20 lines
458 B
JavaScript
20 lines
458 B
JavaScript
const Sequelize = require('sequelize');
|
|
const sequelize = require('../assets/utils/database');
|
|
|
|
module.exports = sequelize.define('task', {
|
|
id: {
|
|
type: Sequelize.INTEGER,
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
primaryKey: true
|
|
},
|
|
task: {
|
|
type: Sequelize.STRING,
|
|
allowNull: false,
|
|
},
|
|
isCompleted: {
|
|
type: Sequelize.BOOLEAN,
|
|
allowNull: false,
|
|
defaultValue: 0
|
|
}
|
|
}); |