src/Entity/PhoneCallRestrictions.php line 13

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by simpson <simpsonwork@gmail.com>
  4.  * Date: 2019-03-19
  5.  * Time: 18:50
  6.  */
  7. namespace App\Entity;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Embeddable]
  10. final class PhoneCallRestrictions
  11. {
  12.     use EnumTrait;
  13. //    const ANSWERING_CALLS_AND_SMS = 1;
  14.     const ANSWERING_CALLS_ONLY 2;
  15.     const ANSWERING_SMS_ONLY 3;
  16.     const ANSWERING_MESSENGER 4;
  17.     #[ORM\Column(name'call_time_from'type'smallint'nullabletrue)]
  18.     protected ?int $timeFrom;
  19.     #[ORM\Column(name'call_time_to'type'smallint'nullabletrue)]
  20.     protected ?int $timeTo;
  21.     /** @var int[] */
  22.     #[ORM\Column(name'call_answering_to'type'simple_array'nullabletrue)]
  23.     protected ?array $answeringTo;
  24.     public function __construct(?int $timeFrom, ?int $timeTo, ?array $answeringTo)
  25.     {
  26.         $this->timeFrom $timeFrom;
  27.         $this->timeTo $timeTo;
  28.         $this->answeringTo $answeringTo;
  29.     }
  30.     public function getTimeFrom(): ?int
  31.     {
  32.         return $this->timeFrom;
  33.     }
  34.     public function getTimeTo(): ?int
  35.     {
  36.         return $this->timeTo;
  37.     }
  38.     public function getAnsweringTo(): ?array
  39.     {
  40.         return $this->answeringTo;
  41.     }
  42. }