UI
Some checks failed
Tech / explore-gitea-actions (push) Has been cancelled

This commit is contained in:
SpecialX
2025-08-31 11:29:26 +08:00
parent 017cc2169c
commit c59762a392
65 changed files with 3996 additions and 330 deletions

View File

@@ -21,7 +21,7 @@ namespace Entities.Contracts
,
}
public enum Grade : byte
public enum GradeEnum : byte
{
Unknown = 0,
= 1,
@@ -69,14 +69,25 @@ namespace Entities.Contracts
public enum AssignmentStructType : byte
{
Root,
Question,
Composite,
Group,
Struct,
SubQuestion,
Option
}
public enum ExamType : byte
{
MidtermExam, // 期中
FinalExam, // 期末
MonthlyExam, // 月考
WeeklyExam, // 周考
DailyTest, // 平时测试
AITest, // AI测试
}
public enum SubmissionStatus
{

View File

@@ -41,6 +41,10 @@ namespace Entities.Contracts
[Column("score")]
public float Score { get; set; }
public string Name { get; set; } = string.Empty;
public ExamType ExamType { get; set; } = ExamType.DailyTest;
[Column("created_by")]
public Guid CreatorId { get; set; }

View File

@@ -48,7 +48,7 @@ namespace Entities.Contracts
[Column("lesson")]
public Guid? LessonId { get; set; }
[Required]
[Column("created_by")]
public Guid CreatorId { get; set; }

View File

@@ -49,6 +49,12 @@ namespace Entities.Contracts
[Column("deleted")]
public bool IsDeleted { get; set; }
public byte TotalQuesNum { get; set; }
public byte ErrorQuesNum { get; set; }
public byte TotalScore { get; set; }
[Required]
[Column("status")]
public SubmissionStatus Status { get; set; }

View File

@@ -15,7 +15,7 @@ namespace Entities.Contracts
[Key]
public Guid Id { get; set; }
public Grade Grade { get; set; } = Grade.Unknown;
public GradeEnum Grade { get; set; } = GradeEnum.Unknown;
public string Title { get; set; } = string.Empty;

View File

@@ -21,6 +21,9 @@ namespace Entities.DTO
public DateTime DueDate { get; set; }
public Guid CreatorId { get; set; }
public string Name { get; set; } = string.Empty;
public ExamType ExamType { get; set; } = ExamType.DailyTest;
public AssignmentQuestionDto ExamStruct { get; set; } = new AssignmentQuestionDto();
}
}

View File

@@ -16,6 +16,7 @@ namespace Entities.DTO
public byte Index { get; set; } = 0;
public float Score { get; set; } = 0;
public string Sequence { get; set; } = string.Empty;
public bool BCorrect { get; set; } = true;
public Layout Layout { get; set; } = Layout.horizontal;
public AssignmentStructType StructType { get; set; } = AssignmentStructType.Question;

8
Entities/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
# ./Entities/Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS entities
WORKDIR /src
COPY ../Entities/*.csproj ./Entities/
RUN dotnet restore "Entities/Entities.csproj"
COPY ../Entities/. ./Entities/
RUN dotnet publish "Entities/Entities.csproj" -c Release -o /publish