RealDevSquad / RealDevSquad/website-backend
Modify the data models for User Status
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
The current datamodel for User Status is as follows
{
"id": "String",
"userId": "String",
"currentStatus": {
"state": "OOO | IDLE | ACTIVE",
"updatedAt": "TimeStamp",
"from": "TimeStamp",
"until": "TimeStamp",
"message": "String"
},
"futureStatus": {
"state": "OOO | IDLE | ACTIVE",
"updatedAt": "TimeStamp",
"from": "TimeStamp",
"until": "TimeStamp",
"message": "String"
},
"monthlyHours": {
"committed": "Number",
"updatedAt": "TimeStamp"
}
}
According to @ankushdharkar's comments here, we should change this as follows.
{
"id": "String",
"userId": "String",
"status": {
"current": {
"state": "OOO | IDLE | ACTIVE",
"updatedAt": "TimeStamp",
"from": "TimeStamp",
"until": "TimeStamp",
"message": "String"
},
"future": {
"state": "OOO | IDLE | ACTIVE",
"updatedAt": "TimeStamp",
"from": "TimeStamp",
"until": "TimeStamp",
"message": "String"
}
},
"monthlyHours": {
"committed": "Number",
"updatedAt": "TimeStamp"
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the User Status data model and its usages in the backend, then compare them with the proposed nested status structure in the issue. Done means the model and affected references consistently use status.current and status.future while preserving monthlyHours.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100