chore: auto release commit (2026-07-03 12:09:55)
All checks were successful
技能自动化发布 / release (push) Successful in 5s
All checks were successful
技能自动化发布 / release (push) Successful in 5s
This commit is contained in:
34
scripts/service/amazon_report_adapter/base.py
Normal file
34
scripts/service/amazon_report_adapter/base.py
Normal file
@@ -0,0 +1,34 @@
|
||||
"""Amazon 结算报表 adapter 基类与数据契约。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
|
||||
@dataclass
|
||||
class DownloadSettlementResult:
|
||||
ok: bool
|
||||
job_id: Optional[str]
|
||||
file_path: Optional[str]
|
||||
filename: Optional[str]
|
||||
date_from: str
|
||||
date_to: str
|
||||
seller_code: Optional[str] = None
|
||||
error_msg: Optional[str] = None
|
||||
artifacts: Dict[str, Any] = field(default_factory=dict)
|
||||
|
||||
|
||||
class DownloadSettlementAdapterBase:
|
||||
name: str = "base"
|
||||
|
||||
def download_settlement(
|
||||
self,
|
||||
*,
|
||||
date_from: str,
|
||||
date_to: str,
|
||||
seller_code: Optional[str] = None,
|
||||
downloads_dir: str = "",
|
||||
artifacts_dir: str = "",
|
||||
) -> DownloadSettlementResult:
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user