<?php
namespace App\Message;
class SearchIndexUpdateMessage
{
public const ACTION_UPSERT = 'upsert';
public const ACTION_UPDATE = 'update';
public const ACTION_REMOVE = 'remove';
/** @var string */
private $className;
/** @var int */
private $id;
/** @var string */
private $action;
public function __construct(string $className, int $id, string $action = self::ACTION_UPSERT)
{
$this->className = $className;
$this->id = $id;
$this->action = $action;
}
public function getClassName(): string
{
return $this->className;
}
public function getId(): int
{
return $this->id;
}
public function getAction(): string
{
return $this->action;
}
}