✨ Changements majeurs: - Suppression complète du code Flask legacy - Migration backend FastAPI vers racine /backend - Migration frontend Vue.js vers racine /frontend - Suppression de notytex-v2/ (code monté à la racine) ✅ Validations: - Backend démarre correctement (port 8000) - API /api/v2/health répond healthy - 99/99 tests unitaires passent - Frontend configuré avec proxy Vite 📝 Documentation: - README.md réécrit pour v2 - Instructions de démarrage mises à jour - .gitignore adapté pour backend/frontend/ 🎯 Architecture finale: notytex/ ├── backend/ # FastAPI + SQLAlchemy + Pydantic ├── frontend/ # Vue 3 + Vite + TailwindCSS ├── docs/ # Documentation └── school_management.db # Base de données (inchangée) Jalon 6 complété: Application v2 prête pour utilisation!
50 lines
1001 B
Python
50 lines
1001 B
Python
"""
|
|
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
|