package molders

// |@@| C

import (
	"gardening/src/dat/forms"
	"gardening/src/mdl"
)

type CreateGardenTaskFormMolder struct {
}

func (this *CreateGardenTaskFormMolder) ToEntity(form *forms.CreateGardenTaskForm, entity *mdl.GardenTask) (*mdl.GardenTask, []string) {
	var changes []string
	entity.Description = form.Description
	entity.Name = form.Name
	entity.StartDate = form.StartDate
	entity.GardenId = form.GardenId
	entity.PlantationId = form.PlantationId
	return entity, changes
}
func (this *CreateGardenTaskFormMolder) ToForm(form *forms.CreateGardenTaskForm, entity *mdl.GardenTask) *forms.CreateGardenTaskForm {
	form.Description = entity.Description
	form.Name = entity.Name
	form.StartDate = entity.StartDate
	form.GardenId = entity.GardenId
	form.PlantationId = entity.PlantationId
	return form
}
