src/Entity/Sms/SMSComunicationRow.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Sms;
  3. use App\Doctrine\Generator\SMSComunicationRowIdGenerator;
  4. use App\Entity\MiniAbstractBase;
  5. use App\Entity\Traits\NameTrait;
  6. use App\Entity\Traits\PhoneTrait;
  7. use App\Enum\SmsCommunicationRowStatusEnum;
  8. use App\Repository\Sms\SMSComunicationRowRepository;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Table(name="vulco_sms_comunication_row")
  12.  *
  13.  * @ORM\Entity(repositoryClass=SMSComunicationRowRepository::class)
  14.  */
  15. class SMSComunicationRow
  16. {
  17.     use NameTrait;
  18.     use PhoneTrait;
  19.     /**
  20.      * @ORM\Id
  21.      *
  22.      * @ORM\Column(type="sms_comunication_row_id", length=255, nullable=false)
  23.      *
  24.      * @ORM\GeneratedValue(strategy="CUSTOM")
  25.      *
  26.      * @ORM\CustomIdGenerator(class=SMSComunicationRowIdGenerator::class)
  27.      */
  28.     private string $id;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=false)
  31.      */
  32.     private string $name;
  33.     /**
  34.      * @ORM\Column(type="text", length=10000, nullable=false)
  35.      */
  36.     private string $status;
  37.     /**
  38.      * @ORM\Column(type="text", length=10000, nullable=true)
  39.      */
  40.     private ?string $message null;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=false)
  43.      */
  44.     private string $notificationId;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity="App\Entity\Sms\PreparedSMSCommunication", inversedBy="rows")
  47.      *
  48.      * @ORM\JoinColumn(name="comunication_id", referencedColumnName="id")
  49.      */
  50.     private PreparedSMSCommunication $communication;
  51.     public function getId(): string
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getStatus(): string
  56.     {
  57.         return $this->status;
  58.     }
  59.     public function getTranslatedStatusString(): string
  60.     {
  61.         return SmsCommunicationRowStatusEnum::getTranslatedEnumArray()[$this->status];
  62.     }
  63.     public function setStatus(string $status): self
  64.     {
  65.         $this->status $status;
  66.         return $this;
  67.     }
  68.     public function getMessage(): ?string
  69.     {
  70.         return $this->message;
  71.     }
  72.     public function setMessage(?string $message): self
  73.     {
  74.         $this->message $message;
  75.         return $this;
  76.     }
  77.     public function getNotificationId(): string
  78.     {
  79.         return $this->notificationId;
  80.     }
  81.     public function setNotificationId(string $notificationId): self
  82.     {
  83.         $this->notificationId $notificationId;
  84.         return $this;
  85.     }
  86.     public function getCommunication(): PreparedSMSCommunication
  87.     {
  88.         return $this->communication;
  89.     }
  90.     public function setCommunication(PreparedSMSCommunication $communication): self
  91.     {
  92.         $this->communication $communication;
  93.         return $this;
  94.     }
  95.     public function __toString(): string
  96.     {
  97.         return $this->id $this->getId() : MiniAbstractBase::DEFAULT_EMPTY_STRING;
  98.     }
  99. }