package com.example.skychasemk.repository;

import com.example.skychasemk.model.Destination;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface DestinationRepository extends JpaRepository<Destination, Integer> {
    @Query("SELECT d.name FROM Destination d")
    List<String> findAllCities();
    //@Query("SELECT d.destinationID FROM Destination d")
    Destination findByName(String departureCity);
}
