重构项目结构,移除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:
17
Entities/DTO/Lesson/CreateLessonDto.cs
Normal file
17
Entities/DTO/Lesson/CreateLessonDto.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class CreateLessonDto
|
||||
{
|
||||
[Required(ErrorMessage = "课程标题是必填项")]
|
||||
[StringLength(255, ErrorMessage = "课程标题长度不能超过255个字符")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(1000, ErrorMessage = "课程描述长度不能超过1000个字符")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "教材ID是必填项")]
|
||||
public Guid TextbookID { get; set; }
|
||||
}
|
||||
}
|
||||
10
Entities/DTO/Lesson/LessonDto.cs
Normal file
10
Entities/DTO/Lesson/LessonDto.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public record LessonDto(Guid Id, string Title, string Description, Guid TextBookId);
|
||||
}
|
||||
14
Entities/DTO/Lesson/LessonResponseDto.cs
Normal file
14
Entities/DTO/Lesson/LessonResponseDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class LessonResponseDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public Guid TextbookID { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
}
|
||||
}
|
||||
20
Entities/DTO/Lesson/UpdateLessonDto.cs
Normal file
20
Entities/DTO/Lesson/UpdateLessonDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Entities.DTO
|
||||
{
|
||||
public class UpdateLessonDto
|
||||
{
|
||||
[Required(ErrorMessage = "课程ID是必填项")]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "课程标题是必填项")]
|
||||
[StringLength(255, ErrorMessage = "课程标题长度不能超过255个字符")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(1000, ErrorMessage = "课程描述长度不能超过1000个字符")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[Required(ErrorMessage = "教材ID是必填项")]
|
||||
public Guid TextbookID { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user