using Entities.Contracts;
using Entities.DTO;

namespace TechHelper.Server.Repositories
{
	public interface IExamRepository
	{
		/// <summary>
		/// 根据ID异步获取一个完整的试卷实体，包括所有子题组和题目。
		/// </summary>
		/// <param name="assignmentId">试卷ID</param>
		/// <returns>完整的 Assignment 实体，如果找不到则返回 null。</returns>
		Task<Exam?> GetFullExamByIdAsync(Guid assignmentId);

		/// <summary>
		/// 获取指定用户创建的所有试卷的预览信息。
		/// </summary>
		/// <param name="userId">用户ID</param>
		/// <returns>Assignment 实体集合。</returns>
		Task<IEnumerable<Exam>> GetExamPreviewsByUserAsync(Guid userId);

		/// <summary>
		/// 向数据库添加一个新的试卷。
		/// </summary>
		/// <param name="assignment">要添加的试卷实体。</param>
		Task AddAsync(Exam assignment);
		Task AddAsync(Submission submission);




		Task AddAsync(ExamQuestion assignment);

		Task AddAsync(Question assignment);

		Task<IEnumerable<Exam>> GetAllSubmissionPreviewsByUserAsync(Guid id);
	}
}
