package com.example.skychasemk.repository;

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

import java.util.List;

public interface SupportTicketRepository extends JpaRepository<SupportTicket, Integer> {
    @Query("SELECT s FROM SupportTicket s WHERE s.status='OPEN'")
    List<SupportTicket> findTickets();

    @Query("SELECT s FROM SupportTicket s WHERE s.status='RESOLVED'")
    List<SupportTicket> findResolvedTickets();
}
