Initial
This commit is contained in:
52
LehrerApp.Core/Models/ReadableSnapshot.cs
Normal file
52
LehrerApp.Core/Models/ReadableSnapshot.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
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; } = "";
|
||||
}
|
||||
Reference in New Issue
Block a user