src/Entity/CRM/BhpInspector.php line 17
<?phpnamespace App\Entity\CRM;use App\Entity\CRM\OrderNote;use App\Entity\CRM\State;use App\Repository\BhpInspectorRepository;use DateTime;use DateTimeInterface;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;#[ORM\Entity(repositoryClass: BhpInspectorRepository::class)]class BhpInspector implements PasswordAuthenticatedUserInterface{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $login = null;#[ORM\Column(length: 255)]private ?string $password = null;#[ORM\Column(length: 255)]private ?string $firstName = null;#[ORM\Column(length: 255)]private ?string $lastName = null;#[ORM\Column(length: 255)]private ?string $email = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 255)]private ?string $zipCode = null;#[ORM\Column(length: 255)]private ?string $city = null;#[ORM\Column(length: 255)]private ?string $street = null;#[ORM\Column(length: 255)]private ?string $nip = null;#[ORM\Column(length: 255)]private ?string $phone = null;#[ORM\Column]private ?bool $isActive = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?DateTimeInterface $dateAdded;#[ORM\Column(type: Types::DATE_MUTABLE)]private ?DateTimeInterface $contractBeginning = null;#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]private ?DateTimeInterface $contractEnd = null;#[ORM\ManyToOne(inversedBy: 'bhpInspectors')]#[ORM\JoinColumn(nullable: false)]private ?State $state = null;#[ORM\OneToMany(mappedBy: 'bhpInspector', targetEntity: BhpOrderProduct::class)]private Collection $bhpOrderProducts;#[ORM\OneToMany(mappedBy: 'bhpInspector', targetEntity: BhpOrderProductSettlements::class)]private Collection $bhpOrderProductSettlements;#[ORM\OneToMany(mappedBy: 'bhpInspector', targetEntity: OrderNote::class)]private Collection $orderNotes;public function __construct(){$this->dateAdded = new DateTime();$this->bhpOrderProducts = new ArrayCollection();$this->bhpOrderProductSettlements = new ArrayCollection();$this->orderNotes = new ArrayCollection();}public function __toString(): string{return $this->getFirstName() . ' ' . $this->getLastName() . ', ' . $this->getName();}public function getId(): ?int{return $this->id;}public function getLogin(): ?string{return $this->login;}public function setLogin(string $login): static{$this->login = $login;return $this;}public function getPassword(): ?string{return $this->password;}public function setPassword(string $password): static{$this->password = $password;return $this;}public function getFirstName(): ?string{return $this->firstName;}public function setFirstName(string $firstName): static{$this->firstName = $firstName;return $this;}public function getLastName(): ?string{return $this->lastName;}public function setLastName(string $lastName): static{$this->lastName = $lastName;return $this;}public function getEmail(): ?string{return $this->email;}public function setEmail(string $email): static{$this->email = $email;return $this;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}public function getZipCode(): ?string{return $this->zipCode;}public function setZipCode(string $zipCode): static{$this->zipCode = $zipCode;return $this;}public function getCity(): ?string{return $this->city;}public function setCity(string $city): static{$this->city = $city;return $this;}public function getStreet(): ?string{return $this->street;}public function setStreet(string $street): static{$this->street = $street;return $this;}public function getNip(): ?string{return $this->nip;}public function setNip(string $nip): static{$this->nip = $nip;return $this;}public function getPhone(): ?string{return $this->phone;}public function setPhone(string $phone): static{$this->phone = $phone;return $this;}public function isIsActive(): ?bool{return $this->isActive;}public function setIsActive(bool $isActive): static{$this->isActive = $isActive;return $this;}public function getDateAdded(): ?DateTimeInterface{return $this->dateAdded;}public function setDateAdded(DateTimeInterface $dateAdded): static{$this->dateAdded = $dateAdded;return $this;}public function getContractBeginning(): ?DateTimeInterface{return $this->contractBeginning;}public function setContractBeginning(DateTimeInterface $contractBeginning): static{$this->contractBeginning = $contractBeginning;return $this;}public function getContractEnd(): ?DateTimeInterface{return $this->contractEnd;}public function setContractEnd(?DateTimeInterface $contractEnd): static{$this->contractEnd = $contractEnd;return $this;}public function getState(): ?state{return $this->state;}public function setState(?state $state): static{$this->state = $state;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->setBhpInspector($this);}return $this;}public function removeBhpOrderProduct(BhpOrderProduct $bhpOrderProduct): static{if ($this->bhpOrderProducts->removeElement($bhpOrderProduct)) {// set the owning side to null (unless already changed)if ($bhpOrderProduct->getBhpInspector() === $this) {$bhpOrderProduct->setBhpInspector(null);}}return $this;}public function addBhpOrderProductSettlements(BhpOrderProductSettlements $bhpOrderProductSettlements): static{if (!$this->bhpOrderProductSettlements->contains($bhpOrderProductSettlements)) {$this->bhpOrderProductSettlements->add($bhpOrderProductSettlements);$bhpOrderProductSettlements->setBhpInspector($this);}return $this;}public function removeBhpOrderProductSettlements(BhpOrderProductSettlements $bhpOrderProductSettlements): static{if ($this->bhpOrderProductSettlements->removeElement($bhpOrderProductSettlements)) {// set the owning side to null (unless already changed)if ($bhpOrderProductSettlements->getBhpInspector() === $this) {$bhpOrderProductSettlements->setBhpInspector(null);}}return $this;}/*** @return Collection<int, OrderNote>*/public function getOrderNotes(): Collection{return $this->orderNotes;}public function addOrderNote(OrderNote $orderNote): static{if (!$this->orderNotes->contains($orderNote)) {$this->orderNotes->add($orderNote);$orderNote->setBhpInspector($this);}return $this;}public function removeOrderNote(OrderNote $orderNote): static{if ($this->orderNotes->removeElement($orderNote)) {// set the owning side to null (unless already changed)if ($orderNote->getBhpInspector() === $this) {$orderNote->setBhpInspector(null);}}return $this;}}