package com.pharmacopoeia.repository;

import com.pharmacopoeia.entity.AnswerRecord;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface AnswerRecordRepository extends JpaRepository<AnswerRecord, Long> {
    List<AnswerRecord> findByUserIdAndQuestionId(Long userId, String questionId);
    List<AnswerRecord> findByUserIdOrderByCreatedAtDesc(Long userId);
    long countByUserIdAndIsCorrectTrue(Long userId);
}
