Coverage for src/kwai/modules/portal/domain/author.py: 100%
13 statements
« prev ^ index » next coverage.py v7.7.1, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2024-01-01 00:00 +0000
1"""Module for defining the Author entity."""
3from dataclasses import dataclass
4from typing import ClassVar, Type
6from kwai.core.domain.entity import DataclassEntity
7from kwai.core.domain.value_objects.identifier import IntIdentifier
8from kwai.core.domain.value_objects.unique_id import UniqueId
11class AuthorIdentifier(IntIdentifier):
12 """Identifier for an author entity."""
15@dataclass(kw_only=True, eq=False, slots=True, frozen=True)
16class AuthorEntity(DataclassEntity):
17 """An author entity."""
19 ID: ClassVar[Type] = AuthorIdentifier
21 uuid: UniqueId
22 name: str = ""
23 active: bool = True
24 remark: str = ""