package com.sundot.airport.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sundot.airport.exam.domain.DailyAnswerRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <b>功能名：</b>DailyAnswerRecordMapper<br>
 * <b>说明：</b> 答题记录Mapper <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Simon Lin
 */
@Mapper
public interface DailyAnswerRecordMapper extends BaseMapper<DailyAnswerRecord> {

    /**
     * 查询用户最近N次答题记录数量
     *
     * @param userId 用户ID
     * @param limit 限制数量
     * @return 记录数量
     */
    int countRecentRecords(@Param("userId") Long userId, @Param("limit") int limit);
}
