23 lines
613 B
Python
23 lines
613 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from backend.model.assessment import Assessment
|
|
from backend.model.student import Student
|
|
|
|
|
|
@dataclass
|
|
class Tribe:
|
|
name: str
|
|
level: str
|
|
students: list[Student] = field(default_factory=list)
|
|
assessments: list[Assessment] = field(default_factory=list)
|
|
|
|
def register_assessment(self, assessment: Assessment) -> None:
|
|
self.assessments.append(assessment)
|
|
|
|
def register_student(self, student: Student) -> None:
|
|
self.students.append(student)
|