As a developer, I want a service to interact with the KnowledgeLevel collection
Requirements
Implement a KnowledgeLevelService that interacts with the database. It should have the following methods:
KnowledgeLevel get(ResourceUid uid): retrieve a specific KnowledgeLevel
List<KnowledgeLevel> getNextToReview(int limit, {DateTime? untilDate, List<ResourceUid> restrain = [], bool orderByAdditionalReview = false}): retrieve the next elements to review, untilDate is included into the search and the result should be ordered by next_review ASC
void update(KnowledgeLevel update): update a specific KnowledgeLevel, if the element doesn't exist it's added
void updateMultiple(List<KnowledgeLevel> update): bulk update, if one element doesn't exist it's added
void delete(ResourceUid knowledgeLevelUid): delete a specific KnowledgeLevel
What needs to be done
Implement under src/core/services, a KnowledgeLevelsService that implements the methods from the requirements.
For the getNextToReview method, orderByAdditionalReview order the results by ascendent additional_review_before_next_review
As a developer, I want a service to interact with the
KnowledgeLevel
collectionRequirements
Implement a
KnowledgeLevelService
that interacts with the database. It should have the following methods:KnowledgeLevel get(ResourceUid uid)
: retrieve a specificKnowledgeLevel
List<KnowledgeLevel> getNextToReview(int limit, {DateTime? untilDate, List<ResourceUid> restrain = [], bool orderByAdditionalReview = false})
: retrieve the next elements to review,untilDate
is included into the search and the result should be ordered bynext_review
ASCvoid update(KnowledgeLevel update)
: update a specificKnowledgeLevel
, if the element doesn't exist it's addedvoid updateMultiple(List<KnowledgeLevel> update)
: bulk update, if one element doesn't exist it's addedvoid delete(ResourceUid knowledgeLevelUid)
: delete a specificKnowledgeLevel
What needs to be done
Implement under
src/core/services
, aKnowledgeLevelsService
that implements the methods from the requirements.For the
getNextToReview
method,orderByAdditionalReview
order the results by ascendentadditional_review_before_next_review
Dependencies
Child of #218
Depends on:
224
Dev notes