Files
skill-template/examples/simulator_browser_rpa/scripts/service/adapter/base.py
chendelian b267ca3266
All checks were successful
技能自动化发布 / release (push) Successful in 7s
chore: auto release commit (2026-06-15 17:32:47)
2026-06-15 17:32:49 +08:00

33 lines
683 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"
def submit_batch(self, target: str, items: List[BatchItem]) -> BatchSubmitResult:
raise NotImplementedError