src/Entity/CRM/Branch.php line 19
<?phpnamespace App\Entity\CRM;use App\Entity\CRM\Notification;use App\Entity\CRM\Order;use App\Entity\CRM\Product;use App\Entity\CRM\Room;use App\Entity\CRM\Worker;use App\Entity\CRM\ZoomMeeting;use App\Entity\CRM\NumberBlocking;use App\Repository\BranchRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: BranchRepository::class)]class Branch{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 255, nullable: true)]private ?string $address = null;#[ORM\Column]private ?bool $isActive = null;#[ORM\ManyToMany(targetEntity: Admin::class,mappedBy: 'branches')]private Collection $admins;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: Department::class, orphanRemoval: true)]private Collection $departments;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: Worker::class)]private Collection $workers;#[ORM\OneToOne(mappedBy: 'branch', cascade: ['persist', 'remove'])]private ?MailConfig $mailConfig = null;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: Order::class)]private Collection $orders;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: Room::class, orphanRemoval: true)]private Collection $rooms;#[ORM\Column(length: 9)]private ?string $regon = null;#[ORM\Column(length: 10)]private ?string $nip = null;#[ORM\OneToOne(mappedBy: 'branch', cascade: ['persist', 'remove'])]private ?BranchConfig $branchConfig = null;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: BhpOrderProduct::class)]private Collection $BhpOrderProducts;#[ORM\Column(length: 255, nullable: true)]private ?string $wdrozeniaMail = null;#[ORM\Column(length: 255, nullable: true)]private ?string $wdrozeniaMailPassword = null;#[ORM\Column(type: Types::ARRAY, nullable: true)]private ?array $contractSignedMail = [];#[ORM\Column]private ?int $platformaOddzialId = null;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: CommercialOfferIndividual::class)]private Collection $commercialOfferIndividuals;#[ORM\Column(length: 255)]private ?string $color = null;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: Notification::class)]private Collection $notifications;#[ORM\Column(type: Types::JSON, nullable: true)]private ?array $bhpMail = null;#[ORM\Column(length: 255, nullable: true)]private ?string $phone = null;#[ORM\ManyToMany(targetEntity: Admin::class)]private Collection $adminHr;#[ORM\ManyToMany(targetEntity: ZoomMeeting::class, mappedBy: 'branches')]private Collection $zoomMeetings;#[ORM\Column(type: Types::JSON, nullable: true)]private ?array $implementerMailsForAuditReady = null;#[ORM\Column(type: Types::JSON, nullable: true)]private ?array $orderReturnedMail = [];#[ORM\ManyToMany(targetEntity: Product::class)]private ?Collection $orderReturnedProducts;#[ORM\Column(length: 255, nullable: true)]private ?string $firmName = null;#[ORM\Column(length: 20, nullable: true)]private ?string $optimaInvoiceSeries = null;#[ORM\Column(length: 255, nullable: true)]private ?string $sellerName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $bankName = null;#[ORM\Column(length: 255, nullable: true)]private ?string $bankAccount = null;#[ORM\OneToMany(mappedBy: 'branch', targetEntity: NumberBlocking::class)]private Collection $numberBlockings;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $addressDataForPlatform = null;public function __construct(){$this->admins = new ArrayCollection();$this->departments = new ArrayCollection();$this->workers = new ArrayCollection();$this->rooms = new ArrayCollection();$this->orders = new ArrayCollection();$this->BhpOrderProducts = new ArrayCollection();$this->commercialOfferIndividuals = new ArrayCollection();$this->notifications = new ArrayCollection();$this->adminHr = new ArrayCollection();$this->zoomMeetings = new ArrayCollection();$this->orderReturnedProducts = new ArrayCollection();$this->numberBlockings = new ArrayCollection();}public function __toString(){return $this->name;}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function getAddress(): ?string{return $this->address;}public function setAddress(?string $address): self{$this->address = $address;return $this;}public function isIsActive(): ?bool{return $this->isActive;}public function setIsActive(bool $isActive): self{$this->isActive = $isActive;return $this;}/*** @return Collection|Admin[]*/public function getAdmins(): Collection{return $this->admins;}public function addAdmin(Admin $admin): self{if (!$this->admins->contains($admin)) {$this->admins[] = $admin;}return $this;}public function removeAdmin(Admin $admin): self{$this->admins->removeElement($admin);return $this;}public function countAdmins(): int{return $this->admins->count();}/*** @return Collection<int, Department>*/public function getDepartments(): Collection{return $this->departments;}public function addDepartment(Department $department): self{if (!$this->departments->contains($department)) {$this->departments->add($department);$department->setBranch($this);}return $this;}public function removeDepartment(Department $department): self{if ($this->departments->removeElement($department)) {// set the owning side to null (unless already changed)if ($department->getBranch() === $this) {$department->setBranch(null);}}return $this;}/*** @return Collection<int, Worker>*/public function getWorkers(): Collection{return $this->workers;}public function addWorker(Worker $worker): self{if (!$this->workers->contains($worker)) {$this->workers->add($worker);$worker->setBranch($this);}return $this;}public function removeWorker(Worker $worker): self{if ($this->workers->removeElement($worker)) {// set the owning side to null (unless already changed)if ($worker->getBranch() === $this) {$worker->setBranch(null);}}return $this;}public function getMailConfig(): ?MailConfig{return $this->mailConfig;}public function setMailConfig(MailConfig $mailConfig): static{// set the owning side of the relation if necessaryif ($mailConfig->getBranch() !== $this) {$mailConfig->setBranch($this);}$this->mailConfig = $mailConfig;return $this;}/*** @return Collection<int, Order>*/public function getOrders(): Collection{return $this->orders;}public function addOrder(Order $order): static{if (!$this->orders->contains($order)) {$this->orders->add($order);$order->setBranch($this);}return $this;}public function removeOrder(Order $order): static{if ($this->orders->removeElement($order)) {// set the owning side to null (unless already changed)if ($order->getBranch() === $this) {$order->setBranch(null);}}return $this;}/*** @return Collection<int, Room>*/public function getRooms(): Collection{return $this->rooms;}public function addRoom(Room $room): static{if (!$this->rooms->contains($room)) {$this->rooms->add($room);$room->setBranch($this);}return $this;}public function removeRoom(Room $room): static{if ($this->rooms->removeElement($room)) {// set the owning side to null (unless already changed)if ($room->getBranch() === $this) {$room->setBranch(null);}}return $this;}public function getRegon(): ?string{return $this->regon;}public function setRegon(string $regon): static{$this->regon = $regon;return $this;}public function getNip(): ?string{return $this->nip;}public function setNip(string $nip): static{$this->nip = $nip;return $this;}/*** @param int|null $id*/public function setId(?int $id): void{$this->id = $id;}public function getBranchConfig(): ?BranchConfig{return $this->branchConfig;}public function setBranchConfig(BranchConfig $branchConfig): static{// set the owning side of the relation if necessaryif ($branchConfig->getBranch() !== $this) {$branchConfig->setBranch($this);}$this->branchConfig = $branchConfig;return $this;}/*** @return Collection<int, BhpOrderProduct>*/public function getBhpOrderProducts(): Collection{return $this->BhpOrderProducts;}public function addBhpOrderProduct(BhpOrderProduct $BhpOrderProduct): static{if (!$this->BhpOrderProducts->contains($BhpOrderProduct)) {$this->BhpOrderProducts->add($BhpOrderProduct);$BhpOrderProduct->setBranch($this);}return $this;}public function getWdrozeniaMail(): ?string{return $this->wdrozeniaMail;}public function setWdrozeniaMail(?string $wdrozeniaMail): static{$this->wdrozeniaMail = $wdrozeniaMail;return $this;}public function removeBhpOrderProduct(BhpOrderProduct $BhpOrderProduct): static{if ($this->BhpOrderProducts->removeElement($BhpOrderProduct)) {// set the owning side to null (unless already changed)if ($BhpOrderProduct->getBranch() === $this) {$BhpOrderProduct->setBranch(null);}}return $this;}public function getWdrozeniaMailPassword(): ?string{return $this->wdrozeniaMailPassword;}public function setWdrozeniaMailPassword(?string $wdrozeniaMailPassword): static{$this->wdrozeniaMailPassword = $wdrozeniaMailPassword;return $this;}public function getContractSignedMail(): array{return $this->contractSignedMail;}public function setContractSignedMail(?array $contractSignedMail): static{$this->contractSignedMail = $contractSignedMail;return $this;}public function getPlatformaOddzialId(): ?int{return $this->platformaOddzialId;}public function setPlatformaOddzialId(int $platformaOddzialId): static{$this->platformaOddzialId = $platformaOddzialId;return $this;}/*** @return Collection<int, CommercialOfferIndividual>*/public function getCommercialOfferIndividuals(): Collection{return $this->commercialOfferIndividuals;}public function addCommercialOfferIndividual(CommercialOfferIndividual $commercialOfferIndividual): static{if (!$this->commercialOfferIndividuals->contains($commercialOfferIndividual)) {$this->commercialOfferIndividuals->add($commercialOfferIndividual);$commercialOfferIndividual->setBranch($this);}return $this;}public function removeCommercialOfferIndividual(CommercialOfferIndividual $commercialOfferIndividual): static{if ($this->commercialOfferIndividuals->removeElement($commercialOfferIndividual)) {// set the owning side to null (unless already changed)if ($commercialOfferIndividual->getBranch() === $this) {$commercialOfferIndividual->setBranch(null);}}return $this;}public function getColor(): ?string{return $this->color;}public function setColor(string $color): static{$this->color = $color;return $this;}/*** @return Collection<int, Notification>*/public function getNotifications(): Collection{return $this->notifications;}public function addNotification(Notification $notification): static{if (!$this->notifications->contains($notification)) {$this->notifications->add($notification);$notification->setBranch($this);}return $this;}public function removeNotification(Notification $notification): static{if ($this->notifications->removeElement($notification)) {// set the owning side to null (unless already changed)if ($notification->getBranch() === $this) {$notification->setBranch(null);}}return $this;}public function getBhpMail(): ?array{return $this->bhpMail;}public function setBhpMail(?array $bhpMail): static{$this->bhpMail = $bhpMail;return $this;}public function getPhone(): ?string{return $this->phone;}public function setPhone(?string $phone): static{$this->phone = $phone;return $this;}/*** @return Collection<int, Admin>*/public function getAdminHr(): Collection{return $this->adminHr;}public function addAdminHr(Admin $adminHr): static{if (!$this->adminHr->contains($adminHr)) {$this->adminHr->add($adminHr);}return $this;}public function removeAdminHr(Admin $adminHr): static{$this->adminHr->removeElement($adminHr);return $this;}/*** @return Collection<int, ZoomMeeting>*/public function getZoomMeetings(): Collection{return $this->zoomMeetings;}public function addZoomMeeting(ZoomMeeting $zoomMeeting): static{if (!$this->zoomMeetings->contains($zoomMeeting)) {$this->zoomMeetings->add($zoomMeeting);$zoomMeeting->addBranch($this);}return $this;}public function removeZoomMeeting(ZoomMeeting $zoomMeeting): static{if ($this->zoomMeetings->removeElement($zoomMeeting)) {$zoomMeeting->removeBranch($this);}return $this;}public function getImplementerMailsForAuditReady(): ?array{return $this->implementerMailsForAuditReady;}public function setImplementerMailsForAuditReady(?array $implementerMailsForAuditReady): static{$this->implementerMailsForAuditReady = $implementerMailsForAuditReady;return $this;}public function getOrderReturnedMail(): ?array{return $this->orderReturnedMail;}public function setOrderReturnedMail(?array $orderReturnedMail): static{$this->orderReturnedMail = $orderReturnedMail;return $this;}/*** @return Collection|null*/public function getOrderReturnedProducts(): ?Collection{return $this->orderReturnedProducts;}public function addOrderReturnedProduct(Product $orderReturnedProduct): static{if (!$this->orderReturnedProducts->contains($orderReturnedProduct)) {$this->orderReturnedProducts->add($orderReturnedProduct);}return $this;}public function removeOrderReturnedProduct(Product $orderReturnedProduct): static{$this->orderReturnedProducts->removeElement($orderReturnedProduct);return $this;}public function getFirmName(): ?string{return $this->firmName;}public function setFirmName(?string $firmName): static{$this->firmName = $firmName;return $this;}public function getOptimaInvoiceSeries(): ?string{return $this->optimaInvoiceSeries;}public function setOptimaInvoiceSeries(?string $optimaInvoiceSeries): static{$this->optimaInvoiceSeries = $optimaInvoiceSeries;return $this;}public function getSellerName(): ?string{return $this->sellerName;}public function setSellerName(?string $sellerName): static{$this->sellerName = $sellerName;return $this;}public function getBankName(): ?string{return $this->bankName;}public function setBankName(?string $bankName): static{$this->bankName = $bankName;return $this;}public function getBankAccount(): ?string{return $this->bankAccount;}public function setBankAccount(?string $bankAccount): static{$this->bankAccount = $bankAccount;return $this;}/*** @return Collection<int, NumberBlocking>*/public function getNumberBlockings(): Collection{return $this->numberBlockings;}public function addNumberBlocking(NumberBlocking $numberBlocking): static{if (!$this->numberBlockings->contains($numberBlocking)) {$this->numberBlockings->add($numberBlocking);$numberBlocking->setBranch($this);}return $this;}public function removeNumberBlocking(NumberBlocking $numberBlocking): static{if ($this->numberBlockings->removeElement($numberBlocking)) {// set the owning side to null (unless already changed)if ($numberBlocking->getBranch() === $this) {$numberBlocking->setBranch(null);}}return $this;}public function getAddressDataForPlatform(): ?string{return $this->addressDataForPlatform;}public function setAddressDataForPlatform(?string $addressDataForPlatform): static{$this->addressDataForPlatform = $addressDataForPlatform;return $this;}}