MF
s workout-managment, so i have 3 roles:
Coache
Client
User (this is for all - 2 roles )
Project structure Controller -> Service -> Repository. I use JWT token to identify user
s role. Also for mapping pojos with dtos i use MapStruct API.Business case for Client : Get my workout by id (../workouts/1)
I want to get something like this:
{ "id":1, "startTime": "2021-03-08T02:27:10.000+00:00", "endTime": "2021-03-08T02:27:05.000+00:00", "coach": { "id": 2, "firstName": "Andrew", "lastName": "Fediuchenko", "sex": "M", "email": "mif2@gmail.com", "payment": 300, "rang": "TOP_COACH" }, "gym": { "id": 2, "phone": "+380661232623", "email": "ovr.gym@gmail.com", } }