diff --git a/scripts/response/activity.JS b/scripts/response/activity.JS new file mode 100644 index 0000000..86dbb8f --- /dev/null +++ b/scripts/response/activity.JS @@ -0,0 +1,20 @@ +const DBParser = require(`./parser.JS`); + +class Activity extends DBParser { + /* + Modify user information. + + @param {Object} ENTRY the selected entry, or the entries + */ + constructor(ENTRY) { + super(DATA, { + "_id": "ID", + "username": "username", + "description": "description", + "duration": "duration", + "date": "date" + }); + } +} + +module.exports = Activity; \ No newline at end of file diff --git a/scripts/response/log.JS b/scripts/response/log.JS new file mode 100644 index 0000000..cb8b42d --- /dev/null +++ b/scripts/response/log.JS @@ -0,0 +1,17 @@ +const DBParser = require(`./parser.JS`) + +DBParser.Log = class Log extends DBParser { + /* + Clean the log information. + + @param {Object} ENTRY the selected entry, or the entries + */ + constructor(ENTRY) { + super(ENTRY, { + "_id": "ID", + "username": "name", + "count": "count", + "log": "activities" + }); + }; +} \ No newline at end of file diff --git a/scripts/DBParser.JS b/scripts/response/parser.JS similarity index 52% rename from scripts/DBParser.JS rename to scripts/response/parser.JS index 6f884c2..26d6962 100644 --- a/scripts/DBParser.JS +++ b/scripts/response/parser.JS @@ -50,51 +50,4 @@ class DBParser { } -DBParser.User = class User extends DBParser { - /* - Modify user information. - - @param {Object} ENTRY the selected entry, or the entries - */ - constructor(DATA) { - super(DATA, { - "_id": "ID", - "username": "name" - }); - } -} - -DBParser.Activity = class Activity extends DBParser { - /* - Modify user information. - - @param {Object} ENTRY the selected entry, or the entries - */ - constructor(ENTRY) { - super(DATA, { - "_id": "ID", - "username": "username", - "description": "description", - "duration": "duration", - "date": "date" - }); - } -} - -DBParser.Log = class Log extends DBParser { - /* - Clean the log information. - - @param {Object} ENTRY the selected entry, or the entries - */ - constructor(ENTRY) { - super(ENTRY, { - "_id": "ID", - "username": "name", - "count": "count", - "log": "activities" - }); - }; -} - module.exports = DBParser; \ No newline at end of file diff --git a/scripts/response/user.JS b/scripts/response/user.JS new file mode 100644 index 0000000..8585d25 --- /dev/null +++ b/scripts/response/user.JS @@ -0,0 +1,17 @@ +const DBParser = require(`./parser.JS`); + +class User extends DBParser { + /* + Modify user information. + + @param {Object} ENTRY the selected entry, or the entries + */ + constructor(DATA) { + super(DATA, { + "_id": "ID", + "username": "name" + }); + } +} + +module.exports = User; \ No newline at end of file