53 lines
1.6 KiB
C#
53 lines
1.6 KiB
C#
using LehrerApp.Core.Models;
|
||
|
||
namespace LehrerApp.Core.Models;
|
||
|
||
/// <summary>
|
||
/// Lesbarer Snapshot der lokalen Datenbank für die WebApp.
|
||
/// Wird periodisch vom Desktop exportiert und auf dem Server hinterlegt.
|
||
///
|
||
/// Bewusst NICHT enthalten:
|
||
/// - Documentation (vertraulich, bleibt lokal)
|
||
/// - Vollständige Notizen (nur Noten-Übersichten)
|
||
/// - Sync-interne Daten
|
||
/// </summary>
|
||
public class ReadableSnapshot
|
||
{
|
||
public DateTime ExportedAt { get; set; } = DateTime.UtcNow;
|
||
public string SchoolYear { get; set; } = "";
|
||
|
||
public List<Student> Students { get; set; } = [];
|
||
public List<LearningGroup> Groups { get; set; } = [];
|
||
public List<Enrollment> Enrollments { get; set; } = [];
|
||
|
||
// Klausuren mit Aufgaben aber ohne Ergebnisse
|
||
public List<Exam> Exams { get; set; } = [];
|
||
|
||
// Ergebnisse separat – kann bei Bedarf weggelassen werden
|
||
public List<ExamResult> ExamResults { get; set; } = [];
|
||
|
||
// Sonstige Noten
|
||
public List<Grade> Grades { get; set; } = [];
|
||
|
||
// Unterrichtsplanung
|
||
public List<Unit> Units { get; set; } = [];
|
||
public List<Lesson> Lessons { get; set; } = [];
|
||
|
||
// Aufgaben (kein Zeiterfassungs-Detail)
|
||
public List<WorkTask> Tasks { get; set; } = [];
|
||
|
||
/// <summary>
|
||
/// Metadaten für die WebApp – wie alt ist der Snapshot?
|
||
/// </summary>
|
||
public SnapshotMeta Meta { get; set; } = new();
|
||
}
|
||
|
||
public class SnapshotMeta
|
||
{
|
||
public int StudentCount { get; set; }
|
||
public int GroupCount { get; set; }
|
||
public int ExamCount { get; set; }
|
||
public DateTime OldestData { get; set; }
|
||
public string ExportedByDevice { get; set; } = "";
|
||
}
|