From 8a36ec6c299492b80c09e3ccc08616bf7dcc4d9a Mon Sep 17 00:00:00 2001 From: Kapil Jain Date: Wed, 9 Oct 2019 16:05:33 -0400 Subject: [PATCH] added createdAt date for follow --- backend/src/models/User.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/src/models/User.js b/backend/src/models/User.js index 4bab080ca..22a7d59c5 100644 --- a/backend/src/models/User.js +++ b/backend/src/models/User.js @@ -28,12 +28,18 @@ module.exports = { relationship: 'FOLLOWS', target: 'User', direction: 'out', + properties: { + createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() } + }, }, followedBy: { type: 'relationship', relationship: 'FOLLOWS', target: 'User', direction: 'in', + properties: { + createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() } + }, }, friends: { type: 'relationship', relationship: 'FRIENDS', target: 'User', direction: 'both' }, disabledBy: { @@ -97,6 +103,9 @@ module.exports = { relationship: 'SHOUTED', target: 'Post', direction: 'out', + properties: { + createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() } + }, }, isIn: { type: 'relationship',