Files
skill-template/examples/simulator_browser_rpa/scripts/service/adapter/base.py
chendelian 48a86e56f1
All checks were successful
技能自动化发布 / release (push) Successful in 6s
chore: auto release commit (2026-07-03 18:50:07)
2026-07-03 18:50:08 +08:00

33 lines
689 B
Python

"""批量提交 adapter 基类与数据契约。"""
from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
@dataclass
class BatchItem:
row_index: int
name: str
account: str
amount: float
note: str = ""
@dataclass
class BatchSubmitResult:
ok: bool
batch_id: Optional[str]
submitted_count: int
submitted_amount: float
error_msg: Optional[str]
artifacts: Dict[str, Any] = field(default_factory=dict)
class BatchAdapterBase:
name: str = "base"
async def submit_batch(self, target: str, items: List[BatchItem]) -> BatchSubmitResult:
raise NotImplementedError