mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-13 10:14:57 +00:00
68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace Chill\DocGeneratorBundle\Service\Messenger;
|
|
|
|
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
|
|
use Chill\DocStoreBundle\Entity\StoredObject;
|
|
use Chill\MainBundle\Entity\User;
|
|
|
|
class RequestGenerationMessage
|
|
{
|
|
private int $creatorId;
|
|
|
|
private int $templateId;
|
|
|
|
private int $entityId;
|
|
|
|
private int $destinationStoredObjectId;
|
|
|
|
private array $contextGenerationData;
|
|
|
|
private \DateTimeImmutable $createdAt;
|
|
|
|
public function __construct(
|
|
User $creator,
|
|
DocGeneratorTemplate $template,
|
|
int $entityId,
|
|
StoredObject $destinationStoredObject,
|
|
array $contextGenerationData
|
|
) {
|
|
$this->creatorId = $creator->getId();
|
|
$this->templateId = $template->getId();
|
|
$this->entityId = $entityId;
|
|
$this->destinationStoredObjectId = $destinationStoredObject->getId();
|
|
$this->contextGenerationData = $contextGenerationData;
|
|
$this->createdAt = new \DateTimeImmutable('now');
|
|
}
|
|
|
|
public function getCreatorId(): int
|
|
{
|
|
return $this->creatorId;
|
|
}
|
|
|
|
public function getDestinationStoredObjectId(): int
|
|
{
|
|
return $this->destinationStoredObjectId;
|
|
}
|
|
|
|
public function getTemplateId(): int
|
|
{
|
|
return $this->templateId;
|
|
}
|
|
|
|
public function getEntityId(): int
|
|
{
|
|
return $this->entityId;
|
|
}
|
|
|
|
public function getContextGenerationData(): array
|
|
{
|
|
return $this->contextGenerationData;
|
|
}
|
|
|
|
public function getCreatedAt(): \DateTimeImmutable
|
|
{
|
|
return $this->createdAt;
|
|
}
|
|
}
|