aufräumen

This commit is contained in:
2026-08-12 17:45:02 +02:00
parent 0823a023c9
commit a1e722ace1
27 changed files with 542 additions and 197 deletions
+6 -6
View File
@@ -6,7 +6,7 @@ public interface IStudentRepository
{
Student? GetById(Guid id);
List<Student> GetAll(bool includeInactive = false);
List<Student> GetByGroup(Guid groupId, string schoolYear);
List<Student> GetByGroup(Guid groupId);
void Save(Student student);
void Delete(Guid id);
}
@@ -18,12 +18,12 @@ public interface IGroupRepository
void Save(LearningGroup group);
void Delete(Guid id);
}
public interface IEnrollmentRepository
public interface IGroupMembershipRepository
{
List<Enrollment> GetByStudent(Guid studentId);
List<Enrollment> GetByGroup(Guid groupId);
List<Enrollment> GetByGroupAndYear(Guid groupId, string schoolYear);
void Save(Enrollment enrollment);
List<GroupMembership> GetByStudent(Guid studentId);
List<GroupMembership> GetByGroup(Guid groupId);
GroupMembership? GetByStudentAndGroup(Guid studentId, Guid groupId);
void Save(GroupMembership membership);
void Delete(Guid id);
}
public interface IExamRepository
-1
View File
@@ -6,7 +6,6 @@ public class Exam
public Guid GroupId { get; set; }
public string Title { get; set; } = "";
public DateOnly Date { get; set; }
public string Subject { get; set; } = "";
public int? ExamNumber { get; set; }
public List<ExamTask> Tasks { get; set; } = [];
public List<GradingKeyEntry> GradingKey { get; set; } = [];
+12 -9
View File
@@ -5,7 +5,6 @@ public class LearningGroup
public Guid Id { get; set; } = Guid.NewGuid();
public string Name { get; set; } = "";
public GroupType Type { get; set; }
public string? Subject { get; set; }
public Guid? SubjectId { get; set; }
public string SchoolYear { get; set; } = "";
public int GradeLevel { get; set; }
@@ -17,19 +16,23 @@ public class LearningGroup
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
public class Enrollment
/// <summary>
/// Mitgliedschaft eines Schülers in einer Lerngruppe. Das Schuljahr gehört zur
/// Lerngruppe und wird deshalb hier nicht ein zweites Mal gespeichert.
/// </summary>
public class GroupMembership
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid GroupId { get; set; }
public string SchoolYear { get; set; } = "";
public DateOnly EnrolledAt { get; set; } = DateOnly.FromDateTime(DateTime.Today);
public EnrollmentPeriod Period { get; set; } = EnrollmentPeriod.FullYear;
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid GroupId { get; set; }
/// <summary>Tag, an dem die Zuordnung in der App angelegt wurde.</summary>
public DateOnly AddedOn { get; set; } = DateOnly.FromDateTime(DateTime.Today);
public MembershipPeriod Period { get; set; } = MembershipPeriod.FullYear;
public DateOnly? JoinedAt { get; set; }
public DateOnly? LeftAt { get; set; }
public Niveau? Niveau { get; set; }
}
public enum EnrollmentPeriod { FullYear, H1Only, H2Only, Custom }
public enum MembershipPeriod { FullYear, H1Only, H2Only, Custom }
public enum GroupType { Class, Course }
public enum GradingSystem { Grades1To6, Points0To15 }
public enum Niveau { E, G, Foerder }
-2
View File
@@ -16,9 +16,7 @@ public class ParticipationEntry
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid SessionId { get; set; }
public Guid GroupId { get; set; }
public Guid StudentId { get; set; }
public DateOnly Date { get; set; } = DateOnly.FromDateTime(DateTime.Today);
public List<AspectRating> Ratings { get; set; } = [];
public List<CompetencyRating> CompetencyRatings { get; set; } = [];
public string? Note { get; set; }
-3
View File
@@ -5,7 +5,6 @@ public class Grade
public Guid Id { get; set; } = Guid.NewGuid();
public Guid StudentId { get; set; }
public Guid GroupId { get; set; }
public string SchoolYear { get; set; } = "";
public GradeCategory Category { get; set; }
public string Value { get; set; } = "";
public DateOnly Date { get; set; }
@@ -20,8 +19,6 @@ public class Unit
public Guid Id { get; set; } = Guid.NewGuid();
public Guid GroupId { get; set; }
public string Title { get; set; } = "";
public string Subject { get; set; } = "";
public string SchoolYear { get; set; } = "";
public DateOnly? StartDate { get; set; }
public DateOnly? EndDate { get; set; }
public List<string> Competencies { get; set; } = [];