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

11 statements  

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

1"""Module that defines all dataclasses for the tables containing coaches.""" 

2 

3from dataclasses import dataclass 

4 

5from kwai_core.db.table_row import TableRow 

6 

7 

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

9class MemberRow(TableRow): 

10 """Represent a row of the members table.""" 

11 

12 __table_name__ = "judo_members" 

13 

14 id: int 

15 uuid: str 

16 

17 

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

19class PersonRow(TableRow): 

20 """Represent a row of the persons table.""" 

21 

22 __table_name__ = "persons" 

23 

24 id: int 

25 lastname: str 

26 firstname: str 

27 

28 

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

30class CoachRow(TableRow): 

31 """Represent a row of the coaches table.""" 

32 

33 __table_name__ = "coaches" 

34 

35 id: int 

36 member_id: int 

37 active: int