TU-CP18 / cp18-backend

0 stars 1 forks source link

Create API endpoint for cleanliness to enable APP to connect #108

Closed jonathanbader closed 5 years ago

jonathanbader commented 5 years ago

Description:

Acceptance criteria:

nschoen commented 5 years ago

Simple CRUD with numbers should be fine. In a real application one would implement a kind of weighted average with newer ratings having a higher weight and older ratings a lower weight. When the car is washed all previous rating will have the weight 0. The system would then probably propose a new wash appointment depending of the time elapsed since the last wash, average cleanliness rating etc.... We could write about that in the final document.

For now we could also just use the issue model. Currently I use the prefixes "front", "driver", "rear", "coDriver" and "interior" in the issue.part attribute. Maybe we can just use "cleanlinessExterior" and "cleanlinessInterior" as additional prefixes to track it. In the frontend (FM, SD) we can then just display the different issues/ratings depending on the issue.part. The rating will then be saved in the issue.description string attribute.

nschoen commented 5 years ago

Attributes for the cleanliness endpoint:

and then just show the latest rating in the FM app.