Coverage for src/kwai/modules/portal/news_item_command.py: 100%
12 statements
« prev ^ index » next coverage.py v7.6.10, created at 2024-01-01 00:00 +0000
« prev ^ index » next coverage.py v7.6.10, created at 2024-01-01 00:00 +0000
1"""Module that defines common command for create/update news items."""
3from dataclasses import dataclass
5from kwai.core.domain.use_case import TextCommand
8@dataclass(kw_only=True, frozen=True, slots=True)
9class NewsItemCommand:
10 """Common input for the use cases "Create News Items" and "Update News Items"."""
12 enabled: bool
13 texts: list[TextCommand]
14 application: int
15 publish_datetime: str
16 end_datetime: str | None
17 promotion: int
18 promotion_end_datetime: str | None
19 remark: str