src/Entity/Misc/Messengers .php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Misc;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\Misc\MessengersRepository")
  6.  *
  7.  * @ORM\Entity()
  8.  * @ORM\Table(name="otp_misc.messengers")
  9.  */
  10. class Messenger
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer", options={"unsigned": true})
  16.      */
  17.     private int $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=false, options={"comment": "ID сгенерированное шлюзом"})
  20.      */
  21.     private string $extId;
  22.     /**
  23.      * @ORM\Column(type="string", length=10, nullable=false)
  24.      */
  25.     private string $vendor;
  26.     /**
  27.      * @ORM\Column(type="string", columnDefinition="ENUM('text','image','button') NOT NULL DEFAULT 'text' COMMENT 'тип сообшщения'")
  28.      */
  29.     private string $type 'text';
  30.     /**
  31.      * @ORM\Column(type="string", length=13, nullable=false, options={"comment": "кому отправляем сообщение"})
  32.      */
  33.     private string $phone;
  34.     /**
  35.      * @ORM\Column(type="string", length=1000, nullable=false)
  36.      */
  37.     private string $message;
  38.     /**
  39.      * @ORM\Column(type="string", length=500, nullable=false, options={"comment": "картинка для типа image"})
  40.      */
  41.     private string $image;
  42.     /**
  43.      * @ORM\Column(type="string", length=20, nullable=false, options={"comment": "текст кнопки"})
  44.      */
  45.     private string $button;
  46.     /**
  47.      * @ORM\Column(type="string", length=500, nullable=false, options={"comment": "обратная ссылка"})
  48.      */
  49.     private string $link;
  50.     /**
  51.      * @ORM\Column(type="datetime", options={"default": "CURRENT_TIMESTAMP"})
  52.      */
  53.     private \DateTimeInterface $add;
  54.     /**
  55.      * @ORM\Column(type="datetime", nullable=true, options={"comment": "отложенная отправка"})
  56.      */
  57.     private ?\DateTimeInterface $sended null;
  58.     /**
  59.      * @ORM\Column(type="integer", options={"unsigned": true, "comment": "приоритет по сервисам"})
  60.      */
  61.     private int $priority;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=true, options={"comment": "сообщение актуально до"})
  64.      */
  65.     private ?\DateTimeInterface $relevant null;
  66.     /**
  67.      * @ORM\Column(type="string", length=16, nullable=false, options={"default": "new"})
  68.      */
  69.     private string $active 'new';
  70.     // Геттери та сеттери
  71.     public function getId(): int
  72.     {
  73.         return $this->id;
  74.     }
  75.     public function getExtId(): string
  76.     {
  77.         return $this->extId;
  78.     }
  79.     public function setExtId(string $extId): self
  80.     {
  81.         $this->extId $extId;
  82.         return $this;
  83.     }
  84.     public function getVendor(): string
  85.     {
  86.         return $this->vendor;
  87.     }
  88.     public function setVendor(string $vendor): self
  89.     {
  90.         $this->vendor $vendor;
  91.         return $this;
  92.     }
  93.     public function getType(): string
  94.     {
  95.         return $this->type;
  96.     }
  97.     public function setType(string $type): self
  98.     {
  99.         $this->type $type;
  100.         return $this;
  101.     }
  102.     public function getPhone(): string
  103.     {
  104.         return $this->phone;
  105.     }
  106.     public function setPhone(string $phone): self
  107.     {
  108.         $this->phone $phone;
  109.         return $this;
  110.     }
  111.     public function getMessage(): string
  112.     {
  113.         return $this->message;
  114.     }
  115.     public function setMessage(string $message): self
  116.     {
  117.         $this->message $message;
  118.         return $this;
  119.     }
  120.     public function getAdd(): \DateTimeInterface
  121.     {
  122.         return $this->add;
  123.     }
  124.     public function setAdd(\DateTimeInterface $add): self
  125.     {
  126.         $this->add $add;
  127.         return $this;
  128.     }
  129.     public function getPriority(): int
  130.     {
  131.         return $this->priority;
  132.     }
  133.     public function setPriority(int $priority): self
  134.     {
  135.         $this->priority $priority;
  136.         return $this;
  137.     }
  138. }