<?php
namespace App\Entity;
use App\Entity\TaxDeposit\ContactPerson;
use App\Repository\TaxDepositRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TaxDepositRepository::class)
*/
class TaxDeposit
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="boolean")
*/
private $enabled;
/**
* @ORM\Column(type="text")
*/
private $address;
/**
* @ORM\Column(type="string", length=255)
*/
private $managerName;
/**
* @ORM\Column(type="string", length=255)
*/
private $managerLastName;
/**
* @ORM\Column(type="string", length=255)
*/
private $managerSecondLastName;
/**
* @ORM\Column(type="string", length=255)
*/
private $managerPhone;
/**
* @ORM\Column(type="string", length=255)
*/
private $managerEmail;
/**
* @ORM\Column(type="string", length=255)
*/
private $rfc;
/**
* @ORM\OneToMany(targetEntity=ContactPerson::class, mappedBy="taxDeposit", cascade={"persist","remove"})
*/
private $contactPeople;
public function __construct()
{
$this->contactPeople = new ArrayCollection();
}
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 isEnabled(): ?bool
{
return $this->enabled;
}
public function setEnabled(bool $enabled): self
{
$this->enabled = $enabled;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): self
{
$this->address = $address;
return $this;
}
public function getManagerName(): ?string
{
return $this->managerName;
}
public function setManagerName(string $managerName): self
{
$this->managerName = $managerName;
return $this;
}
public function getManagerLastName(): ?string
{
return $this->managerLastName;
}
public function setManagerLastName(string $managerLastName): self
{
$this->managerLastName = $managerLastName;
return $this;
}
public function getManagerSecondLastName(): ?string
{
return $this->managerSecondLastName;
}
public function setManagerSecondLastName(string $managerSecondLastName): self
{
$this->managerSecondLastName = $managerSecondLastName;
return $this;
}
public function getManagerPhone(): ?string
{
return $this->managerPhone;
}
public function setManagerPhone(string $managerPhone): self
{
$this->managerPhone = $managerPhone;
return $this;
}
public function getManagerEmail(): ?string
{
return $this->managerEmail;
}
public function setManagerEmail(string $managerEmail): self
{
$this->managerEmail = $managerEmail;
return $this;
}
public function getRfc(): ?string
{
return $this->rfc;
}
public function setRfc(string $rfc): self
{
$this->rfc = $rfc;
return $this;
}
/**
* @return Collection<int, ContactPerson>
*/
public function getContactPeople(): Collection
{
return $this->contactPeople;
}
public function addContactPerson(ContactPerson $contactPerson): self
{
if (!$this->contactPeople->contains($contactPerson)) {
$this->contactPeople[] = $contactPerson;
$contactPerson->setTaxDeposit($this);
}
return $this;
}
public function removeContactPerson(ContactPerson $contactPerson): self
{
if ($this->contactPeople->removeElement($contactPerson)) {
// set the owning side to null (unless already changed)
if ($contactPerson->getTaxDeposit() === $this) {
$contactPerson->setTaxDeposit(null);
}
}
return $this;
}
}