using Core.Entities; using Core.Notes; namespace Core.Models; /// /// Result of parsing a student notes field CSV. /// public class StudentNotesImportResult { public List Matches { get; set; } = []; public List Issues { get; set; } = []; public List Errors { get; set; } = []; public List Warnings { get; set; } = []; public IReadOnlyList FieldNames { get; set; } = []; public bool IsSuccess => Errors.Count == 0; public int StudentsWithChanges => Matches.Count(m => m.Merge.Changed); } public class StudentNotesImportMatch { public required Student Student { get; set; } public string RawStudentName { get; set; } = string.Empty; public int RowNumber { get; set; } public int StudentScore { get; set; } public List IncomingFields { get; set; } = []; public required ImportedFieldsMergeResult Merge { get; set; } } public class StudentNotesImportIssue { public int RowNumber { get; set; } public string RawStudentName { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; }