first commit
This commit is contained in:
45
backend/DTOs/QuizDtos.cs
Normal file
45
backend/DTOs/QuizDtos.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user