This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/api/models/quotes.js
2020-04-22 12:21:02 +02:00

24 lines
539 B
JavaScript

const Sequelize = require('sequelize');
const sequelize = require('../assets/utils/database');
module.exports = sequelize.define('quote', {
id: {
type: Sequelize.INTEGER,
allowNull: false,
autoIncrement: true,
primaryKey: true
},
quote: {
type: Sequelize.STRING,
allowNull: false,
},
author: {
type: Sequelize.STRING,
allowNull: false,
},
isValidated: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: 0
}
});