using Entities.DTO;
///*
/// 创建一个新的试卷。
/// 删除一个试卷。
/// 修改一个试卷。
/// 查看试卷详情。
/// 
/// Teacher
/// 获取指定用户的所有试卷预览。
/// 获取试卷的所有指定
///


namespace TechHelper.Services.Beta
{
	public interface IExamService : IBaseService<ExamDto, Guid>
	{

		///// <summary>
		///// 获取指定用户的所有试卷预览。
		///// </summary>
		//Task<ApiResponse> GetAllExamPreviewsAsync(Guid userId);

		/// <summary>
		/// 创建一个新的试卷。
		/// </summary>
		/// <returns>创建成功的试卷ID</returns>
		Task<ApiResponse> CreateExamAsync(ExamDto examDto);

		/// <summary>
		/// 为指定的班级指派一个试卷
		/// </summary>
		/// <param name="TeacherId"> 老师ID </param>
		/// <param name="assignmentId"> 试卷ID </param>
		/// <param name="classId"> 班级ID </param>
		/// <returns></returns>
		Task<ApiResponse> AssignmentToClassAsync(Guid TeacherId , Guid assignmentId, Guid classId);

		/// <summary>
		/// 为指定学生指派一个试卷
		/// </summary>
		/// <param name="assignementId"></param>
		/// <param name="studentId"></param>
		/// <returns></returns>
		Task<ApiResponse> AssignmentToStudentsAsync(AssigExamToStudentsDto examToStudentsDto);


		/// <summary>
		/// 获取该试卷在指定班级指派了多少人
		/// </summary>
		/// <param name="examToClassDto"></param>
		/// <returns></returns>
		Task<ApiResponse> GetExamSubmissionDetailInClassAsync(AssigExamToClassDto examToClassDto);




		Task<ApiResponse> GetExamTotalErrorDistributionInClassAsync(AssigExamToClassDto examToClassDto);


		public record ExamDistributionDto(Dictionary<string, int> ErrorTypeDistribution, 
			Dictionary<string, int> ErrorLessonDistribution,
			IEnumerable<float> ScoreDistribution);

	}
}
