Jahresplanimport und Ablgeich von Untis
This commit is contained in:
@@ -776,6 +776,24 @@ public class UntisSlotMappingRepository(LiteDbContext db) : IUntisSlotMappingRep
|
||||
public void Delete(Guid id) => db.UntisSlotMappings.Delete(id);
|
||||
}
|
||||
|
||||
// Wie UntisSnapshotEntry rein lokal: Der Jahresplan ist ein wiederherstellbarer Cache eines
|
||||
// externen Feeds. db.OnChange würde bei jedem vollständigen Abruf hunderte Sync-Ereignisse erzeugen.
|
||||
public class AnnualPlanEventRepository(LiteDbContext db) : IAnnualPlanEventRepository
|
||||
{
|
||||
public List<AnnualPlanEvent> GetAll() =>
|
||||
db.AnnualPlanEvents.FindAll().OrderBy(e => e.StartDate).ThenBy(e => e.StartTime).ToList();
|
||||
|
||||
public List<AnnualPlanEvent> GetByRange(DateOnly from, DateOnly to) =>
|
||||
db.AnnualPlanEvents.Find(e => e.StartDate <= to && e.EndDate >= from)
|
||||
.OrderBy(e => e.StartDate).ThenBy(e => e.StartTime).ToList();
|
||||
|
||||
public AnnualPlanEvent? GetByExternalId(string externalId) =>
|
||||
db.AnnualPlanEvents.FindOne(e => e.ExternalId == externalId);
|
||||
|
||||
public void Save(AnnualPlanEvent entry) => db.AnnualPlanEvents.Upsert(entry);
|
||||
public void Delete(Guid id) => db.AnnualPlanEvents.Delete(id);
|
||||
}
|
||||
|
||||
public class CompetencyDomainRepository(LiteDbContext db) : ICompetencyDomainRepository
|
||||
{
|
||||
public List<CompetencyDomain> GetBySubjectAndGrade(Guid subjectId, int gradeLevel) =>
|
||||
|
||||
Reference in New Issue
Block a user