Coverage for bc/kwai-bc-training/src/kwai_bc_training/coaches/coach.py: 100%
10 statements
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2024-01-01 00:00 +0000
1"""Module that defines a coach entity."""
3from dataclasses import dataclass
4from typing import ClassVar, Type
6from kwai_core.domain.entity import DataclassEntity
7from kwai_core.domain.value_objects.identifier import IntIdentifier
8from kwai_core.domain.value_objects.name import Name
9from kwai_core.domain.value_objects.unique_id import UniqueId
12class CoachIdentifier(IntIdentifier):
13 """Identifier for a coach."""
16@dataclass(kw_only=True, eq=False, slots=True, frozen=True)
17class CoachEntity(DataclassEntity):
18 """A coach.
20 Attributes:
21 name: The name of the coach.
22 active: Is this coach active?
23 uuid: The Unique id of this coach.
24 head: Is this coach a head coach?
25 """
27 ID: ClassVar[Type] = CoachIdentifier
29 name: Name
30 active: bool
31 uuid: UniqueId
32 head: bool