<?php
namespace App\Messenger;
class MonolithEntityEventMessage implements \JsonSerializable
{
protected string $tableName;
protected int $entityId;
public function __construct(string $tableName, int $entityId)
{
$this->tableName = $tableName;
$this->entityId = $entityId;
}
public function setTableName(string $tableName): MonolithEntityEventMessage
{
$this->tableName = $tableName;
return $this;
}
public function setEntityId(int $entityId): MonolithEntityEventMessage
{
$this->entityId = $entityId;
return $this;
}
public function jsonSerialize()
{
return [
'table_name' => $this->tableName,
'entity_id' => $this->entityId,
];
}
}