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

import de.avatic.lcc.dto.generic.LocationDTO;
import de.avatic.lcc.model.nodes.Node;
import de.avatic.lcc.model.premises.route.RouteNode;
import org.springframework.stereotype.Service;

@Service
public class LocationTransformer {
    public LocationDTO toLocationDTO(Node entity) {
        return new LocationDTO(entity.getGeoLat().doubleValue(), entity.getGeoLng().doubleValue());
    }

    public LocationDTO toLocationDTO(RouteNode entity) {
        return new LocationDTO(entity.getGeoLat().doubleValue(), entity.getGeoLng().doubleValue());
    }
}
