12 changed files with 330 additions and 14 deletions
-
52src/Shentun.WebPeis.Application.Contracts/QuestionRegisters/QuestionRegisterAnswerDto.cs
-
26src/Shentun.WebPeis.Application.Contracts/QuestionRegisters/QuestionRegisterDto.cs
-
34src/Shentun.WebPeis.Application.Contracts/QuestionRegisters/QuestionRegisterItemDto.cs
-
142src/Shentun.WebPeis.Application/QuestionRegisters/QuestionRegisterAppService.cs
-
16src/Shentun.WebPeis.Domain.Shared/Enums/AnswerResultTypeFlag.cs
-
16src/Shentun.WebPeis.Domain.Shared/Enums/AnswerTypeFlag.cs
-
17src/Shentun.WebPeis.Domain/Models/QuestionAnswer.cs
-
4src/Shentun.WebPeis.Domain/Models/QuestionRegisterAnswer.cs
-
23src/Shentun.WebPeis.EntityFrameworkCore/Configures/QuestionAnswerConfigure.cs
-
4src/Shentun.WebPeis.EntityFrameworkCore/Configures/QuestionConfigure.cs
-
2src/Shentun.WebPeis.EntityFrameworkCore/Configures/QuestionRegisterAnswerChildConfigure.cs
-
4src/Shentun.WebPeis.EntityFrameworkCore/Configures/QuestionRegisterAnswerConfigure.cs
@ -0,0 +1,52 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.QuestionRegisters |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 问卷答案
|
||||
|
/// </summary>
|
||||
|
public class QuestionRegisterAnswerDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public Guid QuestionRegisterAnswerId { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 答案ID
|
||||
|
/// </summary>
|
||||
|
public Guid QuestionAnswerId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 自填写内容
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string? Content { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 答案
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string QuestionAnswerName { get; set; } = null!; |
||||
|
|
||||
|
|
||||
|
public int DisplayOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 子答案类别
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public char? ChildAnswerType { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 答案结果类别
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public char? AnswerResultType { get; set; } |
||||
|
|
||||
|
public char IsSelected { get; set; } = 'N'; |
||||
|
|
||||
|
public List<QuestionRegisterAnswerDto> Childs = new List<QuestionRegisterAnswerDto>(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.QuestionRegisters |
||||
|
{ |
||||
|
public class QuestionRegisterDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public Guid QuestionRegisterId { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 人员ID
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public Guid PersonId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 登记的问卷项目
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public virtual ICollection<QuestionRegisterItemDto> QuestionRegisterItems { get; set; } = new List<QuestionRegisterItemDto>(); |
||||
|
|
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.QuestionRegisters |
||||
|
{ |
||||
|
public class QuestionRegisterItemDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public Guid QuestionRegisterItemId { get; set; } |
||||
|
public Guid QuestionId { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 题目
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public string QuestionName { get; set; } = null!; |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 显示顺序
|
||||
|
/// </summary>
|
||||
|
public int DisplayOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 答案类别
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public char? AnswerType { get; set; } |
||||
|
|
||||
|
public virtual ICollection<QuestionRegisterAnswerDto> QuestionRegisterAnswers { get; set; } = new List<QuestionRegisterAnswerDto>(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.Enums |
||||
|
{ |
||||
|
public class AnswerResultTypeFlag |
||||
|
{ |
||||
|
[Description("选择")] |
||||
|
public const char Choice = '0'; |
||||
|
|
||||
|
[Description("自己填写")] |
||||
|
public const char Content = '1'; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace Shentun.WebPeis.Enums |
||||
|
{ |
||||
|
public class AnswerTypeFlag |
||||
|
{ |
||||
|
[Description("单选")] |
||||
|
public const char SingleChoice = '0'; |
||||
|
|
||||
|
[Description("多选")] |
||||
|
public const char MultipleChoice = '1'; |
||||
|
} |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue