""" Schemas Pydantic pour l'import CSV d'élèves. """ from datetime import date from typing import Optional, List, Dict, Any from pydantic import Field from schemas.common import BaseSchema class ImportedStudentInfo(BaseSchema): """Information sur un élève importé.""" first_name: str last_name: str email: Optional[str] = None line_number: int raw_name: str class SkippedStudentInfo(BaseSchema): """Information sur un élève ignoré lors de l'import.""" line: int name: str reason: str class ImportErrorInfo(BaseSchema): """Information sur une erreur d'import.""" line: int error: str class CSVImportResponse(BaseSchema): """Réponse de l'import CSV.""" success: bool total_lines: int imported_count: int skipped_count: int error_count: int imported_students: List[ImportedStudentInfo] skipped_students: List[SkippedStudentInfo] errors: List[ImportErrorInfo] message: str