feat(regulatory-info-package): 实现材料包生成工作流
This commit is contained in:
15
review_agent/regulatory_info_package/events.py
Normal file
15
review_agent/regulatory_info_package/events.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from review_agent.regulatory_info_package.constants import WORKFLOW_TYPE
|
||||
from review_agent.models import RegulatoryInfoPackageBatch, WorkflowEvent
|
||||
|
||||
|
||||
def record_event(batch: RegulatoryInfoPackageBatch, event_type: str, payload: dict | None = None) -> WorkflowEvent:
|
||||
return WorkflowEvent.objects.create(
|
||||
workflow_type=WORKFLOW_TYPE,
|
||||
workflow_batch_id=batch.pk,
|
||||
conversation=batch.conversation,
|
||||
event_type=event_type,
|
||||
payload=payload or {},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user