src/Entity/PhoneCallRestrictions.php line 14

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. use Symfony\Component\Serializer\Annotation\Groups;
  10. #[ORM\Embeddable]
  11. final class PhoneCallRestrictions
  12. {
  13.     use EnumTrait;
  14. //    const ANSWERING_CALLS_AND_SMS = 1;
  15.     const ANSWERING_CALLS_ONLY 2;
  16.     const ANSWERING_SMS_ONLY 3;
  17.     const ANSWERING_MESSENGER 4;
  18.     #[ORM\Column(name'call_time_from'type'smallint'nullabletrue)]
  19.     #[Groups(['preview''listing'])]
  20.     protected ?int $timeFrom;
  21.     #[ORM\Column(name'call_time_to'type'smallint'nullabletrue)]
  22.     #[Groups(['preview''listing'])]
  23.     protected ?int $timeTo;
  24.     /** @var int[] */
  25.     #[ORM\Column(name'call_answering_to'type'simple_array'nullabletrue)]
  26.     #[Groups(['preview''listing'])]
  27.     protected ?array $answeringTo;
  28.     public function __construct(?int $timeFrom, ?int $timeTo, ?array $answeringTo)
  29.     {
  30.         $this->timeFrom $timeFrom;
  31.         $this->timeTo $timeTo;
  32.         $this->answeringTo $answeringTo;
  33.     }
  34.     public function getTimeFrom(): ?int
  35.     {
  36.         return $this->timeFrom;
  37.     }
  38.     public function getTimeTo(): ?int
  39.     {
  40.         return $this->timeTo;
  41.     }
  42.     public function getAnsweringTo(): ?array
  43.     {
  44.         return $this->answeringTo;
  45.     }
  46. }