sozsoft-platform/api/src/Sozsoft.Platform.Application.Contracts/Intranet/SurveyDto.cs

69 lines
2 KiB
C#
Raw Normal View History

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; }
2026-05-06 07:54:04 +00:00
/// <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; }
}
2026-05-06 07:54:04 +00:00
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; }
}