package com.shop.orders.events;
import java.math.BigDecimal;
import java.time.Instant;
public final class OrderPlaced {
from dataclasses import dataclass, field
from datetime import datetime, timezone
from decimal import Decimal
def _now():
<?php
namespace App\Providers;
use App\Events\OrderPlaced;
use App\Listeners\DecrementInventory;
module DomainEvents
class Registry
def initialize
@subscribers = Hash.new { |h, k| h[k] = [] }
end
package com.shop.orders.events;
import java.math.BigDecimal;
import java.time.Instant;
public record OrderPlacedEvent(
module EventBus
@subscribers = Hash.new { |h, k| h[k] = [] }
class << self
def subscribe(event_class, handler = nil, &block)
callable = handler || block