added questions output (SHIT CODE)
This commit is contained in:
parent
7d76a9f67c
commit
ddfb5eff54
11 changed files with 93 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
namespace SurveyBackend.DTOs.Question;
|
||||
|
||||
public class CreateQuestionDTO
|
||||
public class CreateQuestionDto
|
||||
{
|
||||
public required string Title { get; set; }
|
||||
public required int SurveyId { get; set; }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
namespace SurveyBackend.DTOs.Question;
|
||||
|
||||
public class OutputAnswerVariantDto
|
||||
{
|
||||
public required int Id { get; set; }
|
||||
public required int QuestionId { get; set; }
|
||||
public required string Text { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace SurveyBackend.DTOs.Question;
|
||||
|
||||
public class OutputMultipleAnswerQuestionDto : OutputQuestionBaseDto
|
||||
{
|
||||
public List<OutputAnswerVariantDto> AnswerVariants { get; set; } = [];
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
namespace SurveyBackend.DTOs.Question;
|
||||
|
||||
public abstract class OutputQuestionBaseDto
|
||||
{
|
||||
public required int Id { get; set; }
|
||||
public required int SurveyId { get; set; }
|
||||
public required string Title { get; set; }
|
||||
public required string QuestionType { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace SurveyBackend.DTOs.Question;
|
||||
|
||||
public class OutputSingleAnswerQuestionDto : OutputQuestionBaseDto
|
||||
{
|
||||
public List<OutputAnswerVariantDto> AnswerVariants { get; set; } = [];
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace SurveyBackend.DTOs.Question;
|
||||
|
||||
public class OutputTextQuestionDto : OutputQuestionBaseDto
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
namespace SurveyBackend.DTOs.Survey;
|
||||
|
||||
public class CreateSurveyDTO
|
||||
public class CreateSurveyDto
|
||||
{
|
||||
public required string Title { get; set; }
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue