package com.example.skychasemk.repository;

import com.example.skychasemk.model.Payment;
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 PaymentRepository extends JpaRepository<Payment, Integer> {
    @Query("SELECT p FROM Payment p WHERE p.userID = :userID")
    List<Payment> findByUserId(@Param("userID") Long userID);
}

