Initial
This commit is contained in:
97
LehrerApp.Core/Interfaces/IRepositories.cs
Normal file
97
LehrerApp.Core/Interfaces/IRepositories.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
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, string schoolYear);
|
||||
void Save(Student student);
|
||||
void Delete(Guid id);
|
||||
}
|
||||
|
||||
public interface IGroupRepository
|
||||
{
|
||||
LearningGroup? GetById(Guid id);
|
||||
List<LearningGroup> GetAll();
|
||||
List<LearningGroup> GetBySchoolYear(string schoolYear);
|
||||
void Save(LearningGroup group);
|
||||
void Delete(Guid id);
|
||||
}
|
||||
|
||||
public interface IEnrollmentRepository
|
||||
{
|
||||
List<Enrollment> GetByStudent(Guid studentId);
|
||||
List<Enrollment> GetByGroup(Guid groupId);
|
||||
List<Enrollment> GetByGroupAndYear(Guid groupId, string schoolYear);
|
||||
void Save(Enrollment enrollment);
|
||||
void Delete(Guid id);
|
||||
}
|
||||
|
||||
public interface IExamRepository
|
||||
{
|
||||
Exam? GetById(Guid id);
|
||||
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 IGradeRepository
|
||||
{
|
||||
List<Grade> GetByStudentAndGroup(Guid studentId, Guid groupId);
|
||||
List<Grade> GetByGroup(Guid groupId);
|
||||
void Save(Grade 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 IDocumentationRepository
|
||||
{
|
||||
List<Documentation> GetByStudent(Guid studentId);
|
||||
List<Documentation> GetByStudentAndType(Guid studentId, DocumentationType type);
|
||||
void Save(Documentation doc);
|
||||
void Delete(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);
|
||||
}
|
||||
Reference in New Issue
Block a user