package com.example.skychasemk.repository;

import com.example.skychasemk.model.Booking;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BookingRepository extends JpaRepository<Booking, Integer> {
    @Query("SELECT b.flightId FROM Booking b WHERE b.flightId=:flightId")
    List<Booking> findBookingsByFlightId(@Param("flightId") Integer flightId);
}
