Coverage for bc/kwai-bc-training/src/kwai_bc_training/coaches/coach.py: 100%

9 statements  

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

1"""Module that defines a coach entity.""" 

2 

3from dataclasses import dataclass 

4from typing import ClassVar, Type 

5 

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 

9 

10 

11class CoachIdentifier(IntIdentifier): 

12 """Identifier for a coach.""" 

13 

14 

15@dataclass(kw_only=True, eq=False, slots=True, frozen=True) 

16class CoachEntity(DataclassEntity): 

17 """A coach. 

18 

19 Attributes: 

20 name: The name of the coach. 

21 active: Is this coach active? 

22 

23 """ 

24 

25 ID: ClassVar[Type] = CoachIdentifier 

26 

27 name: Name 

28 active: bool