23 lines
524 B
Python
23 lines
524 B
Python
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class NotificationContext:
|
|
workflow_type: str
|
|
workflow_name: str
|
|
workflow_batch_id: int
|
|
workflow_batch_no: str
|
|
workflow_status: str
|
|
trigger_user_id: int
|
|
trigger_username: str
|
|
title: str
|
|
summary_lines: tuple[str, ...]
|
|
next_step: str
|
|
result_path: str
|
|
|
|
@property
|
|
def dedupe_key(self) -> str:
|
|
return f"{self.workflow_type}:{self.workflow_batch_id}:{self.workflow_status}"
|