11 Commits

Author SHA1 Message Date
410a509faa chore: apply credo suggestions (#3)
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Mainly add module docs and fix some aliases.
2022-04-22 00:49:00 +00:00
Joao P Dubas
1597d34a2d [extra-01] adjust training query to filter by period 2021-06-28 00:31:44 +00:00
Joao P Dubas
a69b771847 [extra-01] training has a period validity
We move from start/end date to a period date range to represent the
interval where a training take place.

Besides that, new constraints are added to ensure a trainings of a user
can't overlap. These constraints reflect in changeset validation.
2021-06-28 00:31:36 +00:00
Joao P Dubas
da77d81200 [day-05] preload training alongside user
Preload training and exercises when fetching an user and expose this
information in graphql.
2021-06-26 18:08:29 +00:00
Joao P Dubas
58c4601203 [day-04] add exercise schema
So a training is a collection of exercises that have a description and a
protocol to be followed.
2021-06-26 17:26:14 +00:00
Joao P Dubas
ea5616addf [day-04] add training schema
With this we can represent a traning program for a user.
2021-06-26 17:25:53 +00:00
Joao P Dubas
3709cd265a [day-02] add context to create/get a user
Create context module to create and fetch a user.
2021-06-22 23:57:10 +00:00
Joao P Dubas
d578bc6cf3 [day-02] validate user input
Also improve migration to reflect requirements in validation done
through `Ecto.Changeset`.
2021-06-22 23:56:07 +00:00
Joao P Dubas
97af827bc2 [day-02] add user schema and migration
Add elixir struct to represent an user and its corresponding
representation on the database.
2021-06-22 23:55:02 +00:00
Joao P Dubas
fc73f30dd0 [day-01] setup imc calc and route 2021-06-22 01:56:40 +00:00
Joao P Dubas
8658384030 [day-01] phoenix project setup
Create new phoenix project
2021-06-22 01:55:16 +00:00