src/Entity/Whatsapp/WhatsappAccountEvent.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Whatsapp;
  3. use App\Enum\WhatsappMessageStatusEnum;
  4. use App\Repository\Whatsapp\WhatsappMessageStatusRepository;
  5. use DateTime;
  6. use DateTimeImmutable;
  7. use DateTimeInterface;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Table(name="vulco_whatsapp_account_event")
  11.  * @ORM\Entity(repositoryClass=WhatsappAccountEventRepository::class)
  12.  *
  13.  * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/messages
  14.  * @see https://developers.facebook.com/documentation/business-messaging/whatsapp/webhooks/reference/account_update
  15.  */
  16. class WhatsappAccountEvent
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     protected int $id;
  24.     /**
  25.      * @ORM\Column(type="datetime")
  26.      */
  27.     private DateTimeInterface $date;
  28.     /**
  29.      * @ORM\Column(type="string", length=255, nullable=false)
  30.      */
  31.     private string $wabaId// the WHATSAPP_BUSINESS_ACCOUNT_ID
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=false)
  34.      */
  35.     private string $event// the EVENT
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private ?string $violationType null;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private ?string $wabaBanState null;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private ?string $wabaBanDate null;
  48.     public function __construct(
  49.         DateTimeInterface $date = new DateTime())
  50.     {
  51.         $this->date $date;
  52.     }
  53.     public function getId(): int
  54.     {
  55.         return $this->id;
  56.     }
  57.     public function getDate(): DateTimeInterface
  58.     {
  59.         return $this->date;
  60.     }
  61.     public function setDate(DateTimeInterface $date): self
  62.     {
  63.         $this->date $date;
  64.         return $this;
  65.     }
  66.     public function getEvent(): string
  67.     {
  68.         return $this->event;
  69.     }
  70.     public function setEvent(string $event): self
  71.     {
  72.         $this->event $event;
  73.         return $this;
  74.     }
  75.     public function getViolationType(): ?string
  76.     {
  77.         return $this->violationType;
  78.     }
  79.     public function setViolationType(?string $violationType): self
  80.     {
  81.         $this->violationType $violationType;
  82.         return $this;
  83.     }
  84.     public function getWabaId(): string
  85.     {
  86.         return $this->wabaId;
  87.     }
  88.     public function setWabaId(string $wabaId): self
  89.     {
  90.         $this->wabaId $wabaId;
  91.         return $this;
  92.     }
  93.     public function getWabaBanState(): ?string
  94.     {
  95.         return $this->wabaBanState;
  96.     }
  97.     public function setWabaBanState(?string $wabaBanState): self
  98.     {
  99.         $this->wabaBanState $wabaBanState;
  100.         return $this;
  101.     }
  102.     public function getWabaBanDate(): ?string
  103.     {
  104.         return $this->wabaBanDate;
  105.     }
  106.     public function setWabaBanDate(?string $wabaBanDate): self
  107.     {
  108.         $this->wabaBanDate $wabaBanDate;
  109.         return $this;
  110.     }
  111. }