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 domain
import "time"
type DomainEvent interface {
EventName() string
package com.example.orders.event;
import java.math.BigDecimal;
import java.time.Instant;
public final class OrderPlacedEvent {
<?php
namespace App\Entity;
trait RecordsEvents
{
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