From 2cce8bbfd54f4eacdadd93ed58de05da8fda8cb6 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Tue, 31 Jul 2018 01:09:43 +0530 Subject: [PATCH] feat(news): Add popularity model --- common/models/popularity.js | 5 +++++ common/models/popularity.json | 21 +++++++++++++++++++++ server/model-config.json | 4 ++++ 3 files changed, 30 insertions(+) create mode 100644 common/models/popularity.js create mode 100644 common/models/popularity.json diff --git a/common/models/popularity.js b/common/models/popularity.js new file mode 100644 index 0000000000..87476dd17d --- /dev/null +++ b/common/models/popularity.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = function(Popularity) { + +}; diff --git a/common/models/popularity.json b/common/models/popularity.json new file mode 100644 index 0000000000..fbad861e47 --- /dev/null +++ b/common/models/popularity.json @@ -0,0 +1,21 @@ +{ + "name": "popularity", + "plural": "popularities", + "base": "PersistedModel", + "idInjection": true, + "options": { + "validateUpsert": true + }, + "properties": { + "events": { + "type": [ + "object" + ], + "required": true + } + }, + "validations": [], + "relations": {}, + "acls": [], + "methods": {} +} diff --git a/server/model-config.json b/server/model-config.json index 3daafa8ca9..249f082590 100644 --- a/server/model-config.json +++ b/server/model-config.json @@ -90,5 +90,9 @@ "article": { "dataSource": "db", "public": true + }, + "popularity": { + "dataSource": "db", + "public": true } }