aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/models
diff options
context:
space:
mode:
authorMarvin Borner2018-10-30 19:39:59 +0100
committerMarvin Borner2018-10-30 19:39:59 +0100
commitf585fea9f15958260e6af29feb1e9cc72bde64e3 (patch)
tree553b944b1e65755a0961d63e1bd745d2401dd152 /src/models
parent94dcb2a098e978ff56eb711ae3c0b7abcb8d69ca (diff)
Added user object in post answer
Diffstat (limited to 'src/models')
-rw-r--r--src/models/posts.model.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/models/posts.model.js b/src/models/posts.model.js
index e46117c..a48d2f6 100644
--- a/src/models/posts.model.js
+++ b/src/models/posts.model.js
@@ -6,6 +6,10 @@ const DataTypes = Sequelize.DataTypes;
module.exports = function (app) {
const sequelizeClient = app.get('sequelizeClient');
const posts = sequelizeClient.define('posts', {
+ userId: {
+ type: DataTypes.INTEGER,
+ allowNull: false
+ },
text: {
type: DataTypes.STRING,
allowNull: false