[day-04] add training schema

With this we can represent a traning program for a user.
This commit is contained in:
Joao P Dubas
2021-06-26 17:21:29 +00:00
parent 96a3e2e9f0
commit ea5616addf
4 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
defmodule Wabanex.Trainings.Create do
alias Wabanex.{Training, Repo}
def call(params) do
params
|> Training.changeset()
|> Repo.insert()
end
end