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

10 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 

9from kwai_core.domain.value_objects.unique_id import UniqueId 

10 

11 

12class CoachIdentifier(IntIdentifier): 

13 """Identifier for a coach.""" 

14 

15 

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

17class CoachEntity(DataclassEntity): 

18 """A coach. 

19 

20 Attributes: 

21 name: The name of the coach. 

22 active: Is this coach active? 

23 uuid: The Unique id of the member associated to this coach. 

24 """ 

25 

26 ID: ClassVar[Type] = CoachIdentifier 

27 

28 name: Name 

29 active: bool 

30 uuid: UniqueId