46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
namespace backend.DTOs;
|
|
|
|
public class QuestionDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string QuestionText { get; set; } = string.Empty;
|
|
public List<string> Options { get; set; } = new();
|
|
}
|
|
|
|
public class QuizSubmitRequest
|
|
{
|
|
public int UserId { get; set; }
|
|
public List<AnswerDto> Answers { get; set; } = new();
|
|
}
|
|
|
|
public class AnswerDto
|
|
{
|
|
public int QuestionId { get; set; }
|
|
public int SelectedOption { get; set; }
|
|
}
|
|
|
|
public class QuizSubmitResponse
|
|
{
|
|
public int ParticipationPoints { get; set; }
|
|
public int CorrectCount { get; set; }
|
|
public int TotalQuizPoints { get; set; }
|
|
public int TotalScore { get; set; }
|
|
}
|
|
|
|
public class UserQuizResponse
|
|
{
|
|
public List<UserQuestionDto> Questions { get; set; } = new();
|
|
public int ParticipationPoints { get; set; }
|
|
public int CorrectCount { get; set; }
|
|
public int TotalQuizPoints { get; set; }
|
|
}
|
|
|
|
public class UserQuestionDto
|
|
{
|
|
public int Id { get; set; }
|
|
public string QuestionText { get; set; } = string.Empty;
|
|
public List<string> Options { get; set; } = new();
|
|
public int SelectedOption { get; set; }
|
|
public bool IsCorrect { get; set; }
|
|
}
|