<?php
/**
* Created by simpson <simpsonwork@gmail.com>
* Date: 2019-03-19
* Time: 18:50
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Embeddable]
final class PhoneCallRestrictions
{
use EnumTrait;
// const ANSWERING_CALLS_AND_SMS = 1;
const ANSWERING_CALLS_ONLY = 2;
const ANSWERING_SMS_ONLY = 3;
const ANSWERING_MESSENGER = 4;
#[ORM\Column(name: 'call_time_from', type: 'smallint', nullable: true)]
protected ?int $timeFrom;
#[ORM\Column(name: 'call_time_to', type: 'smallint', nullable: true)]
protected ?int $timeTo;
/** @var int[] */
#[ORM\Column(name: 'call_answering_to', type: 'simple_array', nullable: true)]
protected ?array $answeringTo;
public function __construct(?int $timeFrom, ?int $timeTo, ?array $answeringTo)
{
$this->timeFrom = $timeFrom;
$this->timeTo = $timeTo;
$this->answeringTo = $answeringTo;
}
public function getTimeFrom(): ?int
{
return $this->timeFrom;
}
public function getTimeTo(): ?int
{
return $this->timeTo;
}
public function getAnsweringTo(): ?array
{
return $this->answeringTo;
}
}