Open tschawax opened 1 year ago
@horenso Thx for creating this issue! Please update top post:
Did you look through all UC? Is it a good idea to stuff everything to PlantsSummaryDto? For #476 we will need nearly all of plant's data.
when creating dates can already be calculated, see #724
This issue will only be needed when cycle information will be made available in plant attributes #476.
Tasks
[ ] existing model
PlantsSummaryDto
(backend/src/model/dto.rs) has to be extended with a new list-fieldlife_cycle
(backend/src/model/enum/life_cycle.rs), so that the endpoint invocations of/api/plants/{id}
and/api/plants
also contain a plant's life cycle in the response[ ] life_cycle is a list containing any combination of its 3 possible values (annual, biennial, perennial) or just an empty list in case a plant has no life cycle value in the DB
endpoint definition of plants endpoints can be found here: backend/src/controller/plants.rs
currently, the response when calling
/api/plants/{id}
(or/api/plants
for a list of plants) looks like this:new response should look like this:
Use case
plants_layer
Related Pull request
724