package com.petshop.backend.repository;

import com.petshop.backend.entity.Conversation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ConversationRepository extends JpaRepository<Conversation, Long> {
    List<Conversation> findByCustomerIdOrderByUpdatedAtDesc(Long customerId);
    List<Conversation> findByStaffIdOrderByUpdatedAtDesc(Long staffId);
    List<Conversation> findByStaffIdIsNullOrderByUpdatedAtDesc();
    List<Conversation> findAllByOrderByUpdatedAtDesc();
}
