feat(regulatory): 新增法规核查模型与工作流通用字段
This commit is contained in:
@@ -4,7 +4,14 @@ from review_agent.models import FileSummaryBatch, WorkflowEvent
|
||||
|
||||
|
||||
def record_event(batch: FileSummaryBatch, event_type: str, payload: dict | None = None) -> WorkflowEvent:
|
||||
return WorkflowEvent.objects.create(batch=batch, event_type=event_type, payload=payload or {})
|
||||
return WorkflowEvent.objects.create(
|
||||
batch=batch,
|
||||
workflow_type="file_summary",
|
||||
workflow_batch_id=batch.pk,
|
||||
conversation=batch.conversation,
|
||||
event_type=event_type,
|
||||
payload=payload or {},
|
||||
)
|
||||
|
||||
|
||||
def serialize_event(event: WorkflowEvent) -> dict[str, object]:
|
||||
|
||||
Reference in New Issue
Block a user