package de.avatic.lcc.service.transformer.generic;

import de.avatic.lcc.dto.generic.MaterialDTO;
import de.avatic.lcc.model.db.materials.Material;
import org.springframework.stereotype.Service;

@Service
public class MaterialTransformer {

    public MaterialDTO toMaterialDTO(Material entity) {

        MaterialDTO dtoEntry = new MaterialDTO();

        dtoEntry.setId(entity.getId());
        dtoEntry.setPartNumber(entity.getPartNumber());
        dtoEntry.setName(entity.getName());
        dtoEntry.setHsCode(entity.getHsCode());

        dtoEntry.setDeprecated(entity.getDeprecated());

        return dtoEntry;


    }
}
