"""Student data model""" from typing import Optional from dataclasses import dataclass @dataclass class Student: student_id: str user_id: Optional[str] cgpa: float sgpa_sem1: Optional[float] sgpa_sem2: Optional[float] sgpa_sem3: Optional[float] sgpa_sem4: Optional[float] sgpa_sem5: Optional[float] sgpa_sem6: Optional[float] sgpa_sem7: Optional[float] sgpa_sem8: Optional[float] tenth_pct: Optional[float] twelfth_pct: Optional[float] extracurricular_text: Optional[str] = None certifications_text: Optional[str] = None internship_text: Optional[str] = None def to_dict(self): return { 'student_id': self.student_id, 'user_id': self.user_id, 'cgpa': self.cgpa, 'sgpa_sem1': self.sgpa_sem1, 'sgpa_sem2': self.sgpa_sem2, 'sgpa_sem3': self.sgpa_sem3, 'sgpa_sem4': self.sgpa_sem4, 'sgpa_sem5': self.sgpa_sem5, 'sgpa_sem6': self.sgpa_sem6, 'sgpa_sem7': self.sgpa_sem7, 'sgpa_sem8': self.sgpa_sem8, 'tenth_pct': self.tenth_pct, 'twelfth_pct': self.twelfth_pct, 'extracurricular_text': self.extracurricular_text, 'certifications_text': self.certifications_text, 'internship_text': self.internship_text }