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

1"""Module that defines a value objects for the bounded context trainings.""" 

2 

3from dataclasses import dataclass 

4 

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 

9 

10 

11@dataclass(kw_only=True, frozen=True, slots=True) 

12class Season: 

13 """A season. 

14 

15 Attributes: 

16 id: The id of the season. 

17 name: The name of the season. 

18 """ 

19 

20 id: IntIdentifier 

21 name: str 

22 

23 

24@dataclass(kw_only=True, frozen=True, slots=True) 

25class TrainingCoach: 

26 """A coach attached to a training.""" 

27 

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()