Coverage for kwai/modules/training/teams/team.py: 90%
10 statements
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
1"""Module that defines a team entity."""
2from kwai.core.domain.entity import Entity
3from kwai.core.domain.value_objects.identifier import IntIdentifier
5TeamIdentifier = IntIdentifier
8class TeamEntity(Entity[TeamIdentifier]):
9 """A team.
11 Attributes:
12 _id: The id of the team.
13 _name: The name of the team.
14 """
16 def __init__(self, *, id_: TeamIdentifier | None = None, name: str):
17 super().__init__(id_ or TeamIdentifier())
18 self._name = name
20 @property
21 def name(self) -> str:
22 """Return the name of the team."""
23 return self._name