📦 NEW: backend: randomQuote Function
This commit is contained in:
24
api/models/quotes.js
Normal file
24
api/models/quotes.js
Normal file
@ -0,0 +1,24 @@
|
||||
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
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user