<?php
namespace App\Entity\Misc;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\Misc\MessengersRepository")
*
* @ORM\Entity()
* @ORM\Table(name="otp_misc.messengers")
*/
class Messenger
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer", options={"unsigned": true})
*/
private int $id;
/**
* @ORM\Column(type="string", length=255, nullable=false, options={"comment": "ID сгенерированное шлюзом"})
*/
private string $extId;
/**
* @ORM\Column(type="string", length=10, nullable=false)
*/
private string $vendor;
/**
* @ORM\Column(type="string", columnDefinition="ENUM('text','image','button') NOT NULL DEFAULT 'text' COMMENT 'тип сообшщения'")
*/
private string $type = 'text';
/**
* @ORM\Column(type="string", length=13, nullable=false, options={"comment": "кому отправляем сообщение"})
*/
private string $phone;
/**
* @ORM\Column(type="string", length=1000, nullable=false)
*/
private string $message;
/**
* @ORM\Column(type="string", length=500, nullable=false, options={"comment": "картинка для типа image"})
*/
private string $image;
/**
* @ORM\Column(type="string", length=20, nullable=false, options={"comment": "текст кнопки"})
*/
private string $button;
/**
* @ORM\Column(type="string", length=500, nullable=false, options={"comment": "обратная ссылка"})
*/
private string $link;
/**
* @ORM\Column(type="datetime", options={"default": "CURRENT_TIMESTAMP"})
*/
private \DateTimeInterface $add;
/**
* @ORM\Column(type="datetime", nullable=true, options={"comment": "отложенная отправка"})
*/
private ?\DateTimeInterface $sended = null;
/**
* @ORM\Column(type="integer", options={"unsigned": true, "comment": "приоритет по сервисам"})
*/
private int $priority;
/**
* @ORM\Column(type="datetime", nullable=true, options={"comment": "сообщение актуально до"})
*/
private ?\DateTimeInterface $relevant = null;
/**
* @ORM\Column(type="string", length=16, nullable=false, options={"default": "new"})
*/
private string $active = 'new';
// Геттери та сеттери
public function getId(): int
{
return $this->id;
}
public function getExtId(): string
{
return $this->extId;
}
public function setExtId(string $extId): self
{
$this->extId = $extId;
return $this;
}
public function getVendor(): string
{
return $this->vendor;
}
public function setVendor(string $vendor): self
{
$this->vendor = $vendor;
return $this;
}
public function getType(): string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getPhone(): string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getMessage(): string
{
return $this->message;
}
public function setMessage(string $message): self
{
$this->message = $message;
return $this;
}
public function getAdd(): \DateTimeInterface
{
return $this->add;
}
public function setAdd(\DateTimeInterface $add): self
{
$this->add = $add;
return $this;
}
public function getPriority(): int
{
return $this->priority;
}
public function setPriority(int $priority): self
{
$this->priority = $priority;
return $this;
}
}