15 lines
423 B
Python
15 lines
423 B
Python
"""动作协议公共字段"""
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.schemas.base import NonBlankString
|
|
|
|
|
|
class ActionModel(BaseModel):
|
|
# 操作字段显式声明,防止拼写错误被当作扩展字段忽略
|
|
model_config = ConfigDict(extra="forbid", strict=True, allow_inf_nan=False)
|
|
|
|
|
|
class BaseAction(ActionModel):
|
|
target_id: NonBlankString = Field(description="已有组件的 ID")
|