68 lines
2 KiB
C#
68 lines
2 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using Volo.Abp.Application.Dtos;
|
||
|
||
namespace Sozsoft.Platform.Intranet;
|
||
|
||
public class SurveyDto : FullAuditedEntityDto<Guid>
|
||
{
|
||
public string Title { get; set; }
|
||
public string Description { get; set; }
|
||
public DateTime Deadline { get; set; }
|
||
public int Responses { get; set; }
|
||
public string Status { get; set; } // draft | active | closed
|
||
public bool IsAnonymous { get; set; }
|
||
|
||
public List<SurveyQuestionDto> Questions { get; set; }
|
||
|
||
/// <summary>Mevcut kullanıcının bu ankete verdiği cevap. Anonim anketlerde veya henüz cevaplanmadıysa null.</summary>
|
||
public SurveyResponseDto MyResponse { get; set; }
|
||
}
|
||
|
||
public class SurveyQuestionDto : FullAuditedEntityDto<Guid>
|
||
{
|
||
public Guid SurveyId { get; set; }
|
||
public string QuestionText { get; set; }
|
||
public string Type { get; set; } // rating | multiple-choice | text | textarea | yes-no
|
||
public int Order { get; set; }
|
||
public bool IsRequired { get; set; }
|
||
|
||
public List<SurveyQuestionOptionDto> Options { get; set; }
|
||
}
|
||
|
||
public class SurveyQuestionOptionDto : FullAuditedEntityDto<Guid>
|
||
{
|
||
public Guid QuestionId { get; set; }
|
||
public string Text { get; set; }
|
||
public int Order { get; set; }
|
||
}
|
||
|
||
public class SurveyResponseDto : FullAuditedEntityDto<Guid>
|
||
{
|
||
public Guid SurveyId { get; set; }
|
||
public Guid? UserId { get; set; }
|
||
public DateTime SubmissionTime { get; set; }
|
||
|
||
public List<SurveyAnswerDto> Answers { get; set; }
|
||
}
|
||
|
||
public class SurveyAnswerDto : FullAuditedEntityDto<Guid>
|
||
{
|
||
public Guid ResponseId { get; set; }
|
||
public Guid QuestionId { get; set; }
|
||
public string QuestionType { get; set; }
|
||
public string Value { get; set; }
|
||
}
|
||
|
||
public class SubmitSurveyInput
|
||
{
|
||
public Guid SurveyId { get; set; }
|
||
public List<SubmitSurveyAnswerInput> Answers { get; set; }
|
||
}
|
||
|
||
public class SubmitSurveyAnswerInput
|
||
{
|
||
public Guid QuestionId { get; set; }
|
||
public string QuestionType { get; set; }
|
||
public string Value { get; set; }
|
||
}
|