35 lines
645 B
Python
35 lines
645 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any, Dict, List, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class HuobanyunQueryRequest(BaseModel):
|
|
keyword: Optional[str] = ""
|
|
page: int = 1
|
|
page_size: int = 20
|
|
filters: Dict[str, Any] = {}
|
|
|
|
|
|
class HuobanyunItem(BaseModel):
|
|
id: str
|
|
name: str
|
|
value: str
|
|
extra: Dict[str, Any] = {}
|
|
|
|
|
|
class HuobanyunQueryResponse(BaseModel):
|
|
total: int = 0
|
|
items: List[HuobanyunItem] = []
|
|
|
|
|
|
class HuobanyunWritebackRequest(BaseModel):
|
|
record_id: str
|
|
fields: Dict[str, Any]
|
|
|
|
|
|
class HuobanyunWritebackResponse(BaseModel):
|
|
success: bool
|
|
message: str = ""
|