重构项目结构,移除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:
26
Entities/DTO/Textbook/CreateTextbookDto.cs
Normal file
26
Entities/DTO/Textbook/CreateTextbookDto.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建教材数据传输对象
|
||||
/// </summary>
|
||||
public class CreateTextbookDto
|
||||
{
|
||||
[Required(ErrorMessage = "教材标题是必填项。")]
|
||||
[StringLength(100, ErrorMessage = "教材标题不能超过 100 个字符。")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "年级是必选项。")]
|
||||
public string Grade { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "出版社是必选项。")]
|
||||
public string Publisher { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "学科领域是必选项。")]
|
||||
public string SubjectArea { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
||||
28
Entities/DTO/Textbook/TextbookDto.cs
Normal file
28
Entities/DTO/Textbook/TextbookDto.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// 教材数据传输对象
|
||||
/// </summary>
|
||||
public class TextbookDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "教材标题是必填项。")]
|
||||
[StringLength(100, ErrorMessage = "教材标题不能超过 100 个字符。")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "年级是必选项。")]
|
||||
public string Grade { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "出版社是必选项。")]
|
||||
public string Publisher { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "学科领域是必选项。")]
|
||||
public string SubjectArea { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
||||
22
Entities/DTO/Textbook/TextbookResponseDto.cs
Normal file
22
Entities/DTO/Textbook/TextbookResponseDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// 教材响应数据传输对象
|
||||
/// </summary>
|
||||
public class TextbookResponseDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Grade { get; set; }
|
||||
public string Publisher { get; set; }
|
||||
public string SubjectArea { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
// 导航属性
|
||||
public int LessonCount { get; set; }
|
||||
public List<string> LessonTitles { get; set; } = new List<string>();
|
||||
}
|
||||
}
|
||||
29
Entities/DTO/Textbook/UpdateTextbookDto.cs
Normal file
29
Entities/DTO/Textbook/UpdateTextbookDto.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// 更新教材数据传输对象
|
||||
/// </summary>
|
||||
public class UpdateTextbookDto
|
||||
{
|
||||
[Required(ErrorMessage = "教材ID是必填项。")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "教材标题是必填项。")]
|
||||
[StringLength(100, ErrorMessage = "教材标题不能超过 100 个字符。")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "年级是必选项。")]
|
||||
public string Grade { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "出版社是必选项。")]
|
||||
public string Publisher { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "学科领域是必选项。")]
|
||||
public string SubjectArea { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user