From f4a88120c460cb65c78a14f7cf728bdac457baec Mon Sep 17 00:00:00 2001 From: HAUTBOIS Aurelie <aurelie.hautbois@ext.soprasteria.com> Date: Wed, 20 Jan 2021 12:06:05 +0100 Subject: [PATCH] update doctypes.md --- docs/ecolyo/project_architecture/doctypes.md | 49 ++++++++++++++------ 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/docs/ecolyo/project_architecture/doctypes.md b/docs/ecolyo/project_architecture/doctypes.md index bbbf9b7..1fb2ed2 100644 --- a/docs/ecolyo/project_architecture/doctypes.md +++ b/docs/ecolyo/project_architecture/doctypes.md @@ -63,6 +63,7 @@ This doctype is used to store all information about the user. | challengeHash | string | Hash used to verify the content of challenges | | duelHash | string | Hash used to verify the content of duels | | quizHash | string | Hash used to verify the content of quiz | +| explorationHash | string | Hash used to verify the content of exploration | | isFirstConnection | boolean | Boolean used to inform if the user connects for the first time | | haveSeenFavoriteModal | boolean | Boolean used to inform if user has seen the favorite modal | | haveSeenLastReport | boolean | Boolean used to inform if user has seen the last report | @@ -84,6 +85,7 @@ This doctype is used to store all information about the user. "isFirstConnection": false, "monthlyReportDate": "2021-01-03T00:00:00.000+01:00", "quizHash": "11372a56c03edef1d6656f8a76d5ec457174f2c1", + "explorationHash": "cdbc7a84d041318253a10b3cc0c02f9020c78c0b", "sendReportNotification": false } ``` @@ -162,6 +164,9 @@ This doctype is used to store all challenges. "quiz": { "data": { "_id": "QUIZ001", "_type": "com.grandlyon.ecolyo.quiz" } }, + "exploration": { + "data": { "_id": "EXPLORATION001", "_type": "com.grandlyon.ecolyo.exploration" } + }, "duel": { "data": { "_id": "DUEL001", "_type": "com.grandlyon.ecolyo.duel" } } @@ -181,18 +186,19 @@ This doctype is used to store all additionnal information about a challenge star ### Structure -| Field | Type | Description | -| ---------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| id | string | userChallenge id | -| title | string | userChallenge title | -| state | UserChallengeState | state of the challenge<br><br>UserChallengeState enum<br>- _LOCKED = 0_<br>- _UNLOCKED = 1_<br>- _ONGOING = 2_<br>- _DUEL = 3_<br>- _DONE = 4_ | -| target | number | Number of stars required to unlock the duel | -| progress | number | Number of stars earned by the user | -| quiz | UserQuiz | Complete Quiz object with progress | -| duel | UserDuelEntity | Complete Duel object with progress included | -| success | UserChallengeSuccess | Success state of the challenge<br><br>UserChallengeSuccess enum<br>- _ONGOING = 0_<br>- _LOST = 1_<br>- _WIN = 2_ | -| startDate | string null | starting date of the the challenge | -| endingDate | string null | ending date of the challenge | +| Field | Type | Description | +| ----------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| id | string | userChallenge id | +| title | string | userChallenge title | +| state | UserChallengeState | state of the challenge<br><br>UserChallengeState enum<br>- _LOCKED = 0_<br>- _UNLOCKED = 1_<br>- _ONGOING = 2_<br>- _DUEL = 3_<br>- _DONE = 4_ | +| target | number | Number of stars required to unlock the duel | +| progress | ChallengeProgress | Number of stars earned by the user for each challenge<br><br>ChallengeProgress enum<br>- _quizzProgress: number_<br>- _explorationProgress: number_<br>- _actionProgress: number_ | +| quiz | UserQuiz | Complete Quiz object with progress | +| exploration | UserExploration | Complete Exploration object with progress | +| duel | UserDuelEntity | Complete Duel object with progress included | +| success | UserChallengeSuccess | Success state of the challenge<br><br>UserChallengeSuccess enum<br>- _ONGOING = 0_<br>- _LOST = 1_<br>- _WIN = 2_ | +| startDate | string null | starting date of the the challenge | +| endingDate | string null | ending date of the challenge | ### Example @@ -219,7 +225,11 @@ This doctype is used to store all additionnal information about a challenge star }, "endingDate": null, "id": "CHALLENGE0001", - "progress": 15, + "progress": { + "actionProgress": 0, + "explorationProgress": 0, + "quizProgress": 0 + }, "quiz": { "customQuestion": { "interval": 30, @@ -315,6 +325,19 @@ This doctype is used to store all additionnal information about a challenge star "result": 5, "state": 2 }, + "exploration": { + "id": "EXPLORATION001", + "date": "2021-01-13T17:03:11.964Z", + "description": "Consultez 3 fois Ecolyo", + "ecogesture_id": "", + "fluid_condition": [], + "message_success": "Vous vous êtes connecté 3 fois à Ecolyo", + "priority_by_condition": 1, + "progress": 0, + "state": 2, + "target": 3, + "type": 2 + }, "startDate": "2021-01-04T00:00:00.000Z", "state": 3, "success": 0, -- GitLab