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
« 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."""
3from dataclasses import dataclass
5from kwai.core.domain.use_case import TextCommand
8@dataclass(kw_only=True, frozen=True, slots=True)
9class Coach:
10 """Input for a coach associated with a training."""
12 id: int
13 head: bool = False
14 present: bool = False
15 payed: bool = False
18@dataclass(kw_only=True, frozen=True, slots=True)
19class TrainingCommand:
20 """Input for the create or update Training use case."""
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]