WIP: EOL
This commit is contained in:
parent
7ed1e05284
commit
49e05cac10
23 changed files with 613 additions and 253 deletions
|
|
@ -15,6 +15,7 @@ func NewTrainingRepository(db *sql.DB) *TrainingRepository {
|
|||
}
|
||||
|
||||
func (r *TrainingRepository) Create(t *training.Training) error {
|
||||
t.ID = training.NewID()
|
||||
_, err := r.db.Exec("INSERT INTO training (id, name, days, description, price) VALUES ($1, $2, $3)", t.ID, t.Name, t.Days, t.Description, t.Price)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue