Coverage for kwai/core/domain/value_objects/owner.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.3.0, created at 2023-09-05 17:55 +0000

1"""Module that defines a value object for an owner of an entity.""" 

2 

3from dataclasses import dataclass 

4 

5from kwai.core.domain.value_objects.identifier import IntIdentifier 

6from kwai.core.domain.value_objects.name import Name 

7from kwai.core.domain.value_objects.unique_id import UniqueId 

8 

9 

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

11class Owner: 

12 """A value object for an owner of an entity. 

13 

14 Attributes: 

15 id: The id of the owner (user) 

16 uuid: The unique id of the owner (user) 

17 name: The name of the owner 

18 """ 

19 

20 id: IntIdentifier 

21 uuid: UniqueId 

22 name: Name