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

18 statements  

« prev     ^ index     » next       coverage.py v7.6.10, 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 

16 

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

18class PersonRow(TableRow): 

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

20 

21 __table_name__ = "persons" 

22 

23 id: int 

24 lastname: str 

25 firstname: str 

26 

27 

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

29class CoachRow(TableRow): 

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

31 

32 __table_name__ = "coaches" 

33 

34 id: int 

35 member_id: int 

36 active: int