mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: start webhook support
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Controller\WatchListController;
|
||||
use App\Repository\WatchListRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Attribute\Groups;
|
||||
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||
@@ -118,6 +119,11 @@ class WatchList
|
||||
#[Groups(['watchlist:list', 'watchlist:item'])]
|
||||
private ?\DateTimeImmutable $createdAt = null;
|
||||
|
||||
#[SerializedName('dsn')]
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY, nullable: true)]
|
||||
#[Groups(['watchlist:list', 'watchlist:item', 'watchlist:create'])]
|
||||
private ?array $webhookDsn = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->token = Uuid::v4();
|
||||
@@ -237,4 +243,16 @@ class WatchList
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWebhookDsn(): ?array
|
||||
{
|
||||
return $this->webhookDsn;
|
||||
}
|
||||
|
||||
public function setWebhookDsn(?array $webhookDsn): static
|
||||
{
|
||||
$this->webhookDsn = $webhookDsn;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user