Add POI feature and imporve the overall backend implementation
This commit is contained in:
@@ -102,3 +102,40 @@ class DataImportedEvent(BaseEvent):
|
||||
event_type="data.imported",
|
||||
correlation_id=correlation_id
|
||||
)
|
||||
|
||||
# Procurement Events
|
||||
class PurchaseOrderApprovedEvent(BaseEvent):
|
||||
def __init__(self, service_name: str, data: Dict[str, Any], correlation_id: Optional[str] = None):
|
||||
super().__init__(
|
||||
service_name=service_name,
|
||||
data=data,
|
||||
event_type="po.approved",
|
||||
correlation_id=correlation_id
|
||||
)
|
||||
|
||||
class PurchaseOrderRejectedEvent(BaseEvent):
|
||||
def __init__(self, service_name: str, data: Dict[str, Any], correlation_id: Optional[str] = None):
|
||||
super().__init__(
|
||||
service_name=service_name,
|
||||
data=data,
|
||||
event_type="po.rejected",
|
||||
correlation_id=correlation_id
|
||||
)
|
||||
|
||||
class PurchaseOrderSentToSupplierEvent(BaseEvent):
|
||||
def __init__(self, service_name: str, data: Dict[str, Any], correlation_id: Optional[str] = None):
|
||||
super().__init__(
|
||||
service_name=service_name,
|
||||
data=data,
|
||||
event_type="po.sent_to_supplier",
|
||||
correlation_id=correlation_id
|
||||
)
|
||||
|
||||
class DeliveryReceivedEvent(BaseEvent):
|
||||
def __init__(self, service_name: str, data: Dict[str, Any], correlation_id: Optional[str] = None):
|
||||
super().__init__(
|
||||
service_name=service_name,
|
||||
data=data,
|
||||
event_type="delivery.received",
|
||||
correlation_id=correlation_id
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user