Coverage for kwai/modules/training/trainings/value_objects.py: 100%
18 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 value objects for the bounded context trainings."""
3from dataclasses import dataclass
5from kwai.core.domain.value_objects.identifier import IntIdentifier
6from kwai.core.domain.value_objects.owner import Owner
7from kwai.core.domain.value_objects.traceable_time import TraceableTime
8from kwai.modules.training.coaches.coach import CoachEntity
11@dataclass(kw_only=True, frozen=True, slots=True)
12class Season:
13 """A season.
15 Attributes:
16 id: The id of the season.
17 name: The name of the season.
18 """
20 id: IntIdentifier
21 name: str
24@dataclass(kw_only=True, frozen=True, slots=True)
25class TrainingCoach:
26 """A coach attached to a training."""
28 coach: CoachEntity
29 owner: Owner
30 present: bool = False
31 type: int = 0
32 payed: bool = False
33 remark: str = ""
34 traceable_time: TraceableTime = TraceableTime()