Coverage for src/kwai/modules/training/training_command.py: 100%

20 statements  

« prev     ^ index     » next       coverage.py v7.6.10, created at 2024-01-01 00:00 +0000

1"""Module that defines common input for the use cases of Trainings.""" 

2 

3from dataclasses import dataclass 

4 

5from kwai.core.domain.use_case import TextCommand 

6 

7 

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

9class Coach: 

10 """Input for a coach associated with a training.""" 

11 

12 id: int 

13 head: bool = False 

14 present: bool = False 

15 payed: bool = False 

16 

17 

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

19class TrainingCommand: 

20 """Input for the create or update Training use case.""" 

21 

22 start_date: str 

23 end_date: str 

24 active: bool 

25 cancelled: bool 

26 location: str 

27 texts: list[TextCommand] 

28 remark: str 

29 definition: int | None 

30 coaches: list[Coach] 

31 teams: list[int]