feat: 添加 Action 协议
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"""动作协议公共字段"""
|
||||
|
||||
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")
|
||||
Reference in New Issue
Block a user