Skip to content
Snippets Groups Projects
Commit aa716191 authored by HAUTBOIS Aurelie's avatar HAUTBOIS Aurelie
Browse files

add user data to initialization.md

parent 43e757b8
No related branches found
No related tags found
No related merge requests found
Pipeline #10543 passed
......@@ -53,3 +53,34 @@ You can see more on [cozy documentation](https://docs.cozy.io/en/cozy-doctypes/d
}
}
```
### UserData creation
We create a userData and store it in the couchDB under the doctype userData name '**com.grandlyon.ecolyo.userDataName'.** During this process, the objects related to the dataEntity will be be converted to an user version which contains informations about the user(example: user progress, the fluids connected and so on).
To illustrate this, let's show an example of the conversion of quizEntity to userQuiz :
```jsx
DuelEntity {
id: string
title: string
description: string
duration: Duration
}
```
Becomes :
```jsx
UserQuiz {
id: string
title: string
description: string
duration: Duration
threshold: number
state: UserDuelState
startDate: string | null
fluidTypes: FluidType[]
userConsumption: number
}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment