package dev.fyloz.trial.colorrecipesexplorer.model.dto;

import dev.fyloz.trial.colorrecipesexplorer.model.Company;
import dev.fyloz.trial.colorrecipesexplorer.model.Recipe;
import lombok.Data;

import java.util.List;

@Data
public class RecipeEditorFormDto {

    private Long id;

    private String name;

    private Company company;

    private String description;

    private Integer sample;

    private String approbationDate;

    private String remark;

    private String note;

    private List<String> step;

    public Recipe getRecipe() {
        return new Recipe(id, name, company, description, sample, approbationDate, remark, note);
    }

    public Recipe update(Recipe original) {
        original.setName(name);
        original.setCompany(company);
        original.setDescription(description);
        original.setSample(sample);
        original.setApprobationDate(approbationDate);
        original.setRemark(remark);
        original.setNote(note);

        return original;
    }

}
