重构项目结构,移除Assignment相关功能,优化Submission模块
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
Some checks failed
TechAct / explore-gitea-actions (push) Failing after 12s
This commit is contained in:
19
Entities/DTO/QuestionType/CreateQuestionTypeDto.cs
Normal file
19
Entities/DTO/QuestionType/CreateQuestionTypeDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class CreateQuestionTypeDto
|
||||
{
|
||||
[Required(ErrorMessage = "题型名称是必填项。")]
|
||||
[StringLength(20, ErrorMessage = "题型名称不能超过 20 个字符。")]
|
||||
public string TypeName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "科目ID是必填项。")]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
[StringLength(20, ErrorMessage = "评分规则不能超过 20 个字符。")]
|
||||
public string ScoreRule { get; set; }
|
||||
}
|
||||
}
|
||||
22
Entities/DTO/QuestionType/QuestionTypeDto.cs
Normal file
22
Entities/DTO/QuestionType/QuestionTypeDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class QuestionTypeDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "题型名称是必填项。")]
|
||||
[StringLength(20, ErrorMessage = "题型名称不能超过 20 个字符。")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "科目ID是必填项。")]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
[StringLength(20, ErrorMessage = "评分规则不能超过 20 个字符。")]
|
||||
public string ScoreRule { get; set; }
|
||||
}
|
||||
}
|
||||
19
Entities/DTO/QuestionType/QuestionTypeResponseDto.cs
Normal file
19
Entities/DTO/QuestionType/QuestionTypeResponseDto.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class QuestionTypeResponseDto
|
||||
{
|
||||
public Guid TypeId { get; set; }
|
||||
public string TypeName { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
public string SubjectName { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string ScoreRule { get; set; }
|
||||
|
||||
// Navigation properties for response
|
||||
public int QuestionCount { get; set; }
|
||||
public List<string> QuestionTitles { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
23
Entities/DTO/QuestionType/UpdateQuestionTypeDto.cs
Normal file
23
Entities/DTO/QuestionType/UpdateQuestionTypeDto.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class UpdateQuestionTypeDto
|
||||
{
|
||||
[Required(ErrorMessage = "题型ID是必填项。")]
|
||||
public Guid TypeId { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "题型名称是必填项。")]
|
||||
[StringLength(20, ErrorMessage = "题型名称不能超过 20 个字符。")]
|
||||
public string TypeName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "科目ID是必填项。")]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
[StringLength(20, ErrorMessage = "评分规则不能超过 20 个字符。")]
|
||||
public string ScoreRule { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user