src/Entity/CRM/NumberBlocking.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\NumberBlockingRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. #[ORM\Entity(repositoryClassNumberBlockingRepository::class)]
  8. #[UniqueEntity(fields: ['number'], message'Taki telefon jest już dodany')]
  9. class NumberBlocking
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column]
  16.     private ?int $number null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  18.     private ?\DateTimeInterface $addedDate null;
  19.     #[ORM\ManyToOne(inversedBy'numberBlockings')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?Admin $addedBy null;
  22.     #[ORM\Column]
  23.     private ?bool $blocked null;
  24.     #[ORM\ManyToOne(inversedBy'numberBlockingsBlocked')]
  25.     #[ORM\JoinColumn(nullabletrue)]
  26.     private ?Admin $blockedBy null;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $blockedDate null;
  29.     #[ORM\ManyToOne(inversedBy'numberBlockings')]
  30.     private ?Branch $branch null;
  31.     public function __construct()
  32.     {
  33.         $this->addedDate = new \DateTime();
  34.         $this->blocked false;
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getNumber(): ?int
  41.     {
  42.         return $this->number;
  43.     }
  44.     public function setNumber(int $number): static
  45.     {
  46.         $this->number $number;
  47.         return $this;
  48.     }
  49.     public function getAddedDate(): ?\DateTimeInterface
  50.     {
  51.         return $this->addedDate;
  52.     }
  53.     public function setAddedDate(\DateTimeInterface $addedDate): static
  54.     {
  55.         $this->addedDate $addedDate;
  56.         return $this;
  57.     }
  58.     public function getAddedBy(): ?Admin
  59.     {
  60.         return $this->addedBy;
  61.     }
  62.     public function setAddedBy(?Admin $addedBy): static
  63.     {
  64.         $this->addedBy $addedBy;
  65.         return $this;
  66.     }
  67.     public function isBlocked(): ?bool
  68.     {
  69.         return $this->blocked;
  70.     }
  71.     public function setBlocked(bool $blocked): static
  72.     {
  73.         $this->blocked $blocked;
  74.         return $this;
  75.     }
  76.     public function getBlockedBy(): ?Admin
  77.     {
  78.         return $this->blockedBy;
  79.     }
  80.     public function setBlockedBy(?Admin $blockedBy): static
  81.     {
  82.         $this->blockedBy $blockedBy;
  83.         return $this;
  84.     }
  85.     public function getBlockedDate(): ?\DateTimeInterface
  86.     {
  87.         return $this->blockedDate;
  88.     }
  89.     public function setBlockedDate(?\DateTimeInterface $blockedDate): static
  90.     {
  91.         $this->blockedDate $blockedDate;
  92.         return $this;
  93.     }
  94.     public function getBranch(): ?Branch
  95.     {
  96.         return $this->branch;
  97.     }
  98.     public function setBranch(?Branch $branch): static
  99.     {
  100.         $this->branch $branch;
  101.         return $this;
  102.     }
  103. }