212 lines
6.7 KiB
C#
212 lines
6.7 KiB
C#
using LehrerApp.Core.Models;
|
|
|
|
namespace LehrerApp.Core.Interfaces;
|
|
|
|
public interface IStudentRepository
|
|
{
|
|
Student? GetById(Guid id);
|
|
List<Student> GetAll(bool includeInactive = false);
|
|
List<Student> GetByGroup(Guid groupId);
|
|
StudentReferenceSummary GetReferenceSummary(Guid studentId);
|
|
void Save(Student student);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IGroupRepository
|
|
{
|
|
LearningGroup? GetById(Guid id);
|
|
List<LearningGroup> GetAll(bool includeInactive = false);
|
|
List<LearningGroup> GetBySchoolYear(string schoolYear, bool includeInactive = false);
|
|
void Save(LearningGroup group);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ISeatingPlanRepository
|
|
{
|
|
SeatingPlan? GetById(Guid id);
|
|
List<SeatingPlan> GetByGroup(Guid groupId);
|
|
void Save(SeatingPlan plan);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IGroupMembershipRepository
|
|
{
|
|
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
|
|
{
|
|
Exam? GetById(Guid id);
|
|
List<Exam> GetAll();
|
|
List<Exam> GetByGroup(Guid groupId);
|
|
void Save(Exam exam);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IExamResultRepository
|
|
{
|
|
List<ExamResult> GetByExam(Guid examId);
|
|
List<ExamResult> GetByStudent(Guid studentId);
|
|
ExamResult? GetByExamAndStudent(Guid examId, Guid studentId);
|
|
void Save(ExamResult result);
|
|
void SaveMany(List<ExamResult> results);
|
|
}
|
|
public interface IGradingKeyTemplateRepository
|
|
{
|
|
List<GradingKeyTemplate> GetAll();
|
|
List<GradingKeyTemplate> GetByGradingSystem(GradingSystem system);
|
|
GradingKeyTemplate? GetById(Guid id);
|
|
void Save(GradingKeyTemplate template);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IGradeRepository
|
|
{
|
|
List<Grade> GetByStudentAndGroup(Guid studentId, Guid groupId);
|
|
List<Grade> GetByGroup(Guid groupId);
|
|
void Save(Grade grade);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IGradingSchemeRepository
|
|
{
|
|
GradingScheme? GetByGroup(Guid groupId);
|
|
GradingScheme? GetDefaultForType(GroupType type);
|
|
void Save(GradingScheme scheme);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IReportGradeRepository
|
|
{
|
|
List<ReportGrade> GetByGroup(Guid groupId);
|
|
ReportGrade? GetByStudentGroupPeriod(Guid studentId, Guid groupId, string period);
|
|
void Save(ReportGrade grade);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IUnitRepository
|
|
{
|
|
Unit? GetById(Guid id);
|
|
List<Unit> GetByGroup(Guid groupId);
|
|
void Save(Unit unit);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ILessonRepository
|
|
{
|
|
List<Lesson> GetByUnit(Guid unitId);
|
|
List<Lesson> GetByGroupAndDate(Guid groupId, DateOnly date);
|
|
List<Lesson> GetByGroupAndRange(Guid groupId, DateOnly from, DateOnly to);
|
|
void Save(Lesson lesson);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ITimetableSlotRepository
|
|
{
|
|
List<TimetableSlot> GetAll();
|
|
List<TimetableSlot> GetByGroup(Guid groupId);
|
|
void Save(TimetableSlot slot);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ISchoolHolidayRepository
|
|
{
|
|
List<SchoolHoliday> GetAll();
|
|
void Save(SchoolHoliday holiday);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ISupervisionDutyRepository
|
|
{
|
|
List<SupervisionDuty> GetAll();
|
|
void Save(SupervisionDuty duty);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ISubstitutionEntryRepository
|
|
{
|
|
List<SubstitutionEntry> GetAll();
|
|
List<SubstitutionEntry> GetByDate(DateOnly date);
|
|
void Save(SubstitutionEntry entry);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IDocumentationRepository
|
|
{
|
|
List<Documentation> GetByStudent(Guid studentId);
|
|
List<Documentation> GetByStudentAndType(Guid studentId, DocumentationType type);
|
|
/// Alle nicht gelöschten Einträge, über alle Schüler hinweg (z.B. für Dashboard-Auswertungen).
|
|
List<Documentation> GetAll();
|
|
void Save(Documentation doc);
|
|
/// Markiert den Eintrag als gelöscht, statt ihn hart zu entfernen (5.1.4).
|
|
void Delete(Guid id);
|
|
/// Entfernt den Eintrag endgültig — nur für die Löschfristen-Bereinigung (5.4.2).
|
|
void HardDelete(Guid id);
|
|
}
|
|
public interface IWorkTaskRepository
|
|
{
|
|
List<WorkTask> GetByStatus(WorkTaskStatus status);
|
|
List<WorkTask> GetAll();
|
|
void Save(WorkTask task);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ITimeEntryRepository
|
|
{
|
|
List<TimeEntry> GetByDate(DateOnly date);
|
|
List<TimeEntry> GetByDateRange(DateOnly from, DateOnly to);
|
|
List<TimeEntry> GetByTask(Guid taskId);
|
|
void Save(TimeEntry entry);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IParticipationSessionRepository
|
|
{
|
|
List<ParticipationSession> GetByGroup(Guid groupId);
|
|
ParticipationSession? GetById(Guid id);
|
|
void Save(ParticipationSession session);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IParticipationRepository
|
|
{
|
|
List<ParticipationEntry> GetBySession(Guid sessionId);
|
|
List<ParticipationEntry> GetByStudent(Guid studentId);
|
|
ParticipationEntry? GetBySessionAndStudent(Guid sessionId, Guid studentId);
|
|
void Save(ParticipationEntry entry);
|
|
void SaveMany(List<ParticipationEntry> entries);
|
|
void DeleteBySession(Guid sessionId);
|
|
}
|
|
public interface IParticipationAspectRepository
|
|
{
|
|
List<ParticipationAspect> GetDefaults();
|
|
List<ParticipationAspect> GetByGroup(Guid groupId);
|
|
// Wie GetByGroup, aber inkl. deaktivierter Aspekte — für die Verwaltungsansicht (3.1),
|
|
// damit ein deaktivierter Aspekt dort sichtbar bleibt und wieder aktiviert werden kann.
|
|
List<ParticipationAspect> GetAllByGroup(Guid groupId);
|
|
void Save(ParticipationAspect aspect);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IParticipationSectionRepository
|
|
{
|
|
List<ParticipationSection> GetByGroup(Guid groupId);
|
|
void Save(ParticipationSection section);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ISubjectRepository
|
|
{
|
|
List<Subject> GetAll();
|
|
Subject? GetById(Guid id);
|
|
Subject? GetByName(string name);
|
|
void Save(Subject subject);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface ICompetencyDomainRepository
|
|
{
|
|
List<CompetencyDomain> GetBySubjectAndGrade(Guid subjectId, int gradeLevel);
|
|
CompetencyDomain? GetById(Guid id);
|
|
void Save(CompetencyDomain domain);
|
|
void Delete(Guid id);
|
|
void DeleteBySubjectAndGrade(Guid subjectId, int gradeLevel);
|
|
void ReplaceForSubjectAndGrade(Guid subjectId, int gradeLevel, List<CompetencyDomain> domains);
|
|
}
|
|
public interface IShorthandCodeRepository
|
|
{
|
|
List<ShorthandCode> GetAll();
|
|
void Save(ShorthandCode code);
|
|
void Delete(Guid id);
|
|
}
|
|
public interface IAlternativeLessonPathRepository
|
|
{
|
|
List<AlternativeLessonPath> GetAll();
|
|
AlternativeLessonPath? GetById(Guid id);
|
|
void Save(AlternativeLessonPath path);
|
|
void Delete(Guid id);
|
|
}
|