<?php
namespace App\Entity\CustomsBroker;
use App\Entity\CustomsBroker;
use App\Repository\CustomsBroker\ContactPersonRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ContactPersonRepository::class)
* @ORM\Table(name="customs_broker_contact_person")
*/
class ContactPerson
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $lastName;
/**
* @ORM\Column(type="string", length=255)
*/
private $secondLastName;
/**
* @ORM\Column(type="string", length=255)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255)
*/
private $email;
/**
* @ORM\ManyToOne(targetEntity=CustomsBroker::class, inversedBy="contactPeople")
* @ORM\JoinColumn(nullable=false)
*/
private $customsBroker;
/**
* @ORM\Column(type="string", length=255)
*/
private $position;
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 getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getSecondLastName(): ?string
{
return $this->secondLastName;
}
public function setSecondLastName(string $secondLastName): self
{
$this->secondLastName = $secondLastName;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getCustomsBroker(): ?CustomsBroker
{
return $this->customsBroker;
}
public function setCustomsBroker(?CustomsBroker $customsBroker): self
{
$this->customsBroker = $customsBroker;
return $this;
}
public function getPosition(): ?string
{
return $this->position;
}
public function setPosition(string $position): self
{
$this->position = $position;
return $this;
}
public function __toString()
{
return $this->name . ' ' . $this->lastName . ' ' . $this->secondLastName;
}
}