using Entities.Contracts;
using Entities.DTO;

namespace TechHelper.Services.Beta
{
    /// <summary>
    /// 提交详情服务接口（Beta版本）
    /// 提供提交详情相关的业务逻辑操作
    /// </summary>
    public interface ISubmissionDetailService : IBaseService<SubmissionDetailDto, Guid>
    {
        /// <summary>
        /// 获取提交详情列表
        /// </summary>
        /// <param name="submissionId">提交ID</param>
        /// <returns>提交详情列表</returns>
        Task<ApiResponse> GetBySubmissionIdAsync(Guid submissionId);

        /// <summary>
        /// 获取学生的提交详情
        /// </summary>
        /// <param name="studentId">学生ID</param>
        /// <param name="examId">考试ID</param>
        /// <returns>提交详情列表</returns>
        Task<ApiResponse> GetByStudentAndExamAsync(Guid studentId, Guid examId);

        /// <summary>
        /// 批量创建提交详情
        /// </summary>
        /// <param name="submissionId">提交ID</param>
        /// <param name="details">提交详情列表</param>
        /// <returns>创建结果</returns>
        Task<ApiResponse> BatchCreateAsync(Guid submissionId, List<SubmissionDetailDto> details);

        /// <summary>
        /// 批量更新提交详情
        /// </summary>
        /// <param name="details">提交详情列表</param>
        /// <returns>更新结果</returns>
        Task<ApiResponse> BatchUpdateAsync(List<SubmissionDetailDto> details);

        /// <summary>
        /// 更新提交详情评分
        /// </summary>
        /// <param name="detailId">提交详情ID</param>
        /// <param name="points">分数</param>
        /// <param name="feedback">反馈</param>
        /// <returns>更新结果</returns>
        Task<ApiResponse> UpdateScoreAsync(Guid detailId, float? points, string? feedback);

        /// <summary>
        /// 获取错题详情
        /// </summary>
        /// <param name="studentId">学生ID</param>
        /// <param name="examId">考试ID</param>
        /// <returns>错题详情列表</returns>
        Task<ApiResponse> GetErrorDetailsAsync(Guid studentId, Guid examId);

        /// <summary>
        /// 获取正确题详情
        /// </summary>
        /// <param name="studentId">学生ID</param>
        /// <param name="examId">考试ID</param>
        /// <returns>正确题详情列表</returns>
        Task<ApiResponse> GetCorrectDetailsAsync(Guid studentId, Guid examId);

        /// <summary>
        /// 获取未批改的提交详情
        /// </summary>
        /// <param name="teacherId">教师ID</param>
        /// <returns>未批改的提交详情列表</returns>
        Task<ApiResponse> GetUngradedDetailsAsync(Guid teacherId);

        /// <summary>
        /// 批量更新提交详情状态
        /// </summary>
        /// <param name="submissionId">提交ID</param>
        /// <param name="status">状态</param>
        /// <returns>更新结果</returns>
        Task<ApiResponse> UpdateStatusAsync(Guid submissionId, SubmissionStatus status);
    }
}
