package mongodb

import "golang.source-fellows.com/training-fellow/booking/internal/model"

type Training struct {
	Name         string
	NumberOfDays int
}

func mapToMongoTraining(training *model.Training) Training {
	return Training{
		Name:         training.Name(),
		NumberOfDays: training.NumberOfDays(),
	}
}

func mapToModelTraining(training Training) *model.Training {
	return model.NewTrainingWithNumberOfDays(training.Name, training.NumberOfDays)
}
