src/Entity/Message/Sms.php line 12

  1. <?php
  2. namespace App\Entity\Message;
  3. use App\Entity\Traits\CreatedTrait;
  4. use App\Entity\Traits\UpdatedTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Table(name'message_sms')]
  7. #[ORM\Entity]
  8. #[ORM\HasLifecycleCallbacks]
  9. class Sms
  10. {
  11.     use CreatedTrait;
  12.     use UpdatedTrait;
  13.     public const STATUS_NEW 'new';
  14.     public const STATUS_SEND 'send';
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue(strategy'AUTO')]
  17.     #[ORM\Column(type'integer')]
  18.     private int $id;
  19.     #[ORM\Column(type'string')]
  20.     private string $phone;
  21.     #[ORM\Column(type'string'nullabletrue)]
  22.     private ?string $text null;
  23.     #[ORM\Column(type'integer'nullabletrue)]
  24.     private ?int $sms_id null;
  25.     #[ORM\Column(type'string')]
  26.     private string $status self::STATUS_NEW;
  27.     /**
  28.      * @return int
  29.      */
  30.     public function getId(): int
  31.     {
  32.         return $this->id;
  33.     }
  34.     /**
  35.      * @param int $id
  36.      */
  37.     public function setId(int $id): void
  38.     {
  39.         $this->id $id;
  40.     }
  41.     /**
  42.      * @return string
  43.      */
  44.     public function getPhone(): string
  45.     {
  46.         return $this->phone;
  47.     }
  48.     /**
  49.      * @param string $phone
  50.      */
  51.     public function setPhone(string $phone): void
  52.     {
  53.         $this->phone $phone;
  54.     }
  55.     /**
  56.      * @return string|null
  57.      */
  58.     public function getText(): ?string
  59.     {
  60.         return $this->text;
  61.     }
  62.     /**
  63.      * @param string|null $text
  64.      */
  65.     public function setText(?string $text): void
  66.     {
  67.         $this->text $text;
  68.     }
  69.     /**
  70.      * @return int|null
  71.      */
  72.     public function getSmsId(): ?int
  73.     {
  74.         return $this->sms_id;
  75.     }
  76.     /**
  77.      * @param int|null $sms_id
  78.      */
  79.     public function setSmsId(?int $sms_id): void
  80.     {
  81.         $this->sms_id $sms_id;
  82.     }
  83.     /**
  84.      * @return string
  85.      */
  86.     public function getStatus(): string
  87.     {
  88.         return $this->status;
  89.     }
  90.     /**
  91.      * @param string $status
  92.      */
  93.     public function setStatus(string $status): void
  94.     {
  95.         $this->status $status;
  96.     }
  97. }