src/Entity/CRM/NumberBlocking.php line 12
<?phpnamespace App\Entity\CRM;use App\Repository\NumberBlockingRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;#[ORM\Entity(repositoryClass: NumberBlockingRepository::class)]#[UniqueEntity(fields: ['number'], message: 'Taki telefon jest już dodany')]class NumberBlocking{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column]private ?int $number = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $addedDate = null;#[ORM\ManyToOne(inversedBy: 'numberBlockings')]#[ORM\JoinColumn(nullable: false)]private ?Admin $addedBy = null;#[ORM\Column]private ?bool $blocked = null;#[ORM\ManyToOne(inversedBy: 'numberBlockingsBlocked')]#[ORM\JoinColumn(nullable: true)]private ?Admin $blockedBy = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $blockedDate = null;#[ORM\ManyToOne(inversedBy: 'numberBlockings')]private ?Branch $branch = null;public function __construct(){$this->addedDate = new \DateTime();$this->blocked = false;}public function getId(): ?int{return $this->id;}public function getNumber(): ?int{return $this->number;}public function setNumber(int $number): static{$this->number = $number;return $this;}public function getAddedDate(): ?\DateTimeInterface{return $this->addedDate;}public function setAddedDate(\DateTimeInterface $addedDate): static{$this->addedDate = $addedDate;return $this;}public function getAddedBy(): ?Admin{return $this->addedBy;}public function setAddedBy(?Admin $addedBy): static{$this->addedBy = $addedBy;return $this;}public function isBlocked(): ?bool{return $this->blocked;}public function setBlocked(bool $blocked): static{$this->blocked = $blocked;return $this;}public function getBlockedBy(): ?Admin{return $this->blockedBy;}public function setBlockedBy(?Admin $blockedBy): static{$this->blockedBy = $blockedBy;return $this;}public function getBlockedDate(): ?\DateTimeInterface{return $this->blockedDate;}public function setBlockedDate(?\DateTimeInterface $blockedDate): static{$this->blockedDate = $blockedDate;return $this;}public function getBranch(): ?Branch{return $this->branch;}public function setBranch(?Branch $branch): static{$this->branch = $branch;return $this;}}