package molders

// |@@| C

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

type CreatePlantFormMolder struct {
}

func (this *CreatePlantFormMolder) ToEntity(form *forms.CreatePlantForm, entity *mdl.Plant) (*mdl.Plant, []string) {
	var changes []string
	entity.Data = form.Data
	entity.Description = form.Description
	entity.Exposition = form.Exposition
	entity.Harvested = form.Harvested
	entity.Name = form.Name
	entity.Perennial = form.Perennial
	entity.Reference = form.Reference
	entity.Size = form.Size
	return entity, changes
}
func (this *CreatePlantFormMolder) ToForm(form *forms.CreatePlantForm, entity *mdl.Plant) *forms.CreatePlantForm {
	form.Data = entity.Data
	form.Description = entity.Description
	form.Exposition = entity.Exposition
	form.Harvested = entity.Harvested
	form.Name = entity.Name
	form.Perennial = entity.Perennial
	form.Reference = entity.Reference
	form.Size = entity.Size
	return form
}
