forked from cartsnitch/cartsnitch
Merge commit '4cf6f91e954b770198578bcb8db5d98ac964bfed' as 'common'
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
"""Redis pub/sub event envelope and payload schemas."""
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from cartsnitch_common.constants import EventType
|
||||
|
||||
|
||||
class EventEnvelope(BaseModel):
|
||||
"""Standard event wrapper for all Redis pub/sub messages."""
|
||||
|
||||
event_type: EventType
|
||||
timestamp: datetime
|
||||
service: str
|
||||
payload: dict[str, Any]
|
||||
Reference in New Issue
Block a user