using Entities.Contracts;
using Entities.DTO;
using TechHelper.Services;

namespace TechHelper.Server.Services
{
	public interface IExamService : IBaseService<AssignmentDto, Guid>
	{
		/// <summary>
		/// 根据 ID 获取试卷 DTO。
		/// </summary>
		Task<AssignmentDto> GetExamByIdAsync(Guid id);

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

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


		/// <summary>
		/// 提交一份试卷
		/// </summary>
		/// <param name="submissionDto">提交试卷的完整信息</param>
		/// <returns></returns>
		Task<ApiResponse> SubmissionAssignment(SubmissionDto submissionDto);

		/// <summary>
		/// 为所有学生指定试卷
		/// </summary>
		/// <param name="id"> 试卷ID </param>
		/// <returns></returns>
		Task<ApiResponse> AssignmentToAllStudentsAsync(Guid assignmentId, Guid TeacherId);

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


		/// <summary>
		/// 获取学生所有提交过的试卷
		/// </summary>
		/// <param name="id"></param>
		/// <returns></returns>
		Task<ApiResponse> GetAllSubmissionAsync(Guid id);


	}
}
