package molders

// |@@| C

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

type CreatePlantationFormMolder struct {
}

func (this *CreatePlantationFormMolder) ToEntity(form *forms.CreatePlantationForm, entity *mdl.Plantation) (*mdl.Plantation, []string) {
	var changes []string
	entity.Name = form.Name
	entity.PlantedAt = form.PlantedAt
	entity.PlantId = form.PlantId
	entity.GardenId = form.GardenId
	return entity, changes
}
func (this *CreatePlantationFormMolder) ToForm(form *forms.CreatePlantationForm, entity *mdl.Plantation) *forms.CreatePlantationForm {
	form.Name = entity.Name
	form.PlantedAt = entity.PlantedAt
	form.PlantId = entity.PlantId
	form.GardenId = entity.GardenId
	return form
}
