48 lines
1.6 KiB
C#
48 lines
1.6 KiB
C#
namespace LehrerApp.Core.Models;
|
||
|
||
public class Exam
|
||
{
|
||
public Guid Id { get; set; } = Guid.NewGuid();
|
||
public Guid GroupId { get; set; }
|
||
public string Title { get; set; } = ""; // "Arbeit Nr. 2 – Redox"
|
||
public DateOnly Date { get; set; }
|
||
public string Subject { get; set; } = "";
|
||
public int? ExamNumber { get; set; }
|
||
public List<ExamTask> Tasks { get; set; } = []; // nested – kein JOIN
|
||
public List<GradingKeyEntry> GradingKey { get; set; } = [];
|
||
public ExamStatus Status { get; set; } = ExamStatus.Planned;
|
||
public string? Notes { get; set; }
|
||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||
}
|
||
|
||
public class ExamTask
|
||
{
|
||
public int Nr { get; set; }
|
||
public string? Title { get; set; }
|
||
public double MaxPoints { get; set; }
|
||
public double Weight { get; set; } = 1.0;
|
||
}
|
||
|
||
public class GradingKeyEntry
|
||
{
|
||
public string Grade { get; set; } = ""; // "1","2"... oder "15","14"...
|
||
public double MinPercent { get; set; }
|
||
}
|
||
|
||
// Ergebnisse separat – für Notenspiegel ohne Aufgabentext laden
|
||
public class ExamResult
|
||
{
|
||
public Guid Id { get; set; } = Guid.NewGuid();
|
||
public Guid ExamId { get; set; }
|
||
public Guid StudentId { get; set; }
|
||
public List<double> Points { get; set; } = []; // Index = Aufgabe Nr - 1
|
||
public double TotalPoints { get; set; }
|
||
public string? Grade { get; set; }
|
||
public bool Absent { get; set; }
|
||
public string? Comment { get; set; }
|
||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||
}
|
||
|
||
public enum ExamStatus { Planned, Conducted, Graded, Returned }
|