<?php
namespace App\Entity\Whatsapp;
use App\Enum\WhatsappMessageStatusEnum;
use App\Repository\Whatsapp\WhatsappMessageStatusRepository;
use DateTime;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="vulco_whatsapp_account_event")
* @ORM\Entity(repositoryClass=WhatsappAccountEventRepository::class)
*
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages
* @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/account_update
*/
class WhatsappAccountEvent
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
protected int $id;
/**
* @ORM\Column(type="datetime")
*/
private DateTimeInterface $date;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $wabaId; // the WHATSAPP_BUSINESS_ACCOUNT_ID
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private string $event; // the EVENT
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $violationType = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $wabaBanState = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $wabaBanDate = null;
public function __construct(
DateTimeInterface $date = new DateTime())
{
$this->date = $date;
}
public function getId(): int
{
return $this->id;
}
public function getDate(): DateTimeInterface
{
return $this->date;
}
public function setDate(DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
public function getEvent(): string
{
return $this->event;
}
public function setEvent(string $event): self
{
$this->event = $event;
return $this;
}
public function getViolationType(): ?string
{
return $this->violationType;
}
public function setViolationType(?string $violationType): self
{
$this->violationType = $violationType;
return $this;
}
public function getWabaId(): string
{
return $this->wabaId;
}
public function setWabaId(string $wabaId): self
{
$this->wabaId = $wabaId;
return $this;
}
public function getWabaBanState(): ?string
{
return $this->wabaBanState;
}
public function setWabaBanState(?string $wabaBanState): self
{
$this->wabaBanState = $wabaBanState;
return $this;
}
public function getWabaBanDate(): ?string
{
return $this->wabaBanDate;
}
public function setWabaBanDate(?string $wabaBanDate): self
{
$this->wabaBanDate = $wabaBanDate;
return $this;
}
}