feat: add source websites with automated endpoint analysis, target queue dispatch ordering, and markdown styling

This commit is contained in:
mamad
2026-08-28 22:05:48 +03:30
parent 462ad3be93
commit 446f3ea041
11 changed files with 1100 additions and 32 deletions
+17
View File
@@ -20,6 +20,22 @@ class SourceChannel:
is_active: bool = True
created_at: Optional[str] = None
@dataclass
class SourceWebsite:
id: Optional[int]
name: str
url: str
category_id: Optional[int] = None
check_interval_min: int = 30
auto_reanalyze_hours: int = 24
last_reanalyzed_at: Optional[str] = None
last_fetched_at: Optional[str] = None
api_config: Dict[str, Any] = field(default_factory=dict)
last_error: Optional[str] = None
last_error_at: Optional[str] = None
is_active: bool = True
created_at: Optional[str] = None
@dataclass
class TargetChannel:
id: Optional[int]
@@ -37,6 +53,7 @@ class TargetChannel:
# Telegram channel_ids of sources whose posts are queued to this target automatically.
auto_source_ids: List[int] = field(default_factory=list)
language: str = "fa"
dispatch_order: str = "order" # "order" (FIFO) or "random"
last_post_time: Optional[str] = None
is_active: bool = True
created_at: Optional[str] = None