07.4.3.18.1 — Runtime Event Skeleton Architecture
This commit is contained in:
20
app/src/runtime_events/models.py
Normal file
20
app/src/runtime_events/models.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# app/src/runtime_events/models.py
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import datetime, timezone
|
||||
from typing import Any
|
||||
|
||||
from src.runtime_events.event_types import RuntimeEventType
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class RuntimeEvent:
|
||||
event_type: RuntimeEventType
|
||||
source: str
|
||||
title: str
|
||||
payload: dict[str, Any] = field(default_factory=dict)
|
||||
priority: str = "normal"
|
||||
dedupe_key: str | None = None
|
||||
created_at: datetime = field(default_factory=lambda: datetime.now(timezone.utc))
|
||||
Reference in New Issue
Block a user