feat: add mapper for student and it loads
This commit is contained in:
@@ -20,3 +20,6 @@ class Student:
|
||||
if isinstance(other, Student):
|
||||
return self.id == other.id
|
||||
return False
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return hash(self.id)
|
||||
|
||||
@@ -26,8 +26,5 @@ class Tribe:
|
||||
return self.name == other.name
|
||||
return False
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<Tribe {self.name=}>"
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
return {"name": self.name, "level": self.level}
|
||||
|
||||
Reference in New Issue
Block a user