<?php
namespace App\Entity;
use App\Entity\Documentation\MasterGuide;
use App\Repository\ConsigneeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ConsigneeRepository::class)
*/
class Consignee
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="text")
*/
private $address;
/**
* @ORM\Column(type="string", length=255)
*/
private $phone;
/**
* @ORM\OneToMany(targetEntity=MasterGuide::class, mappedBy="consignee")
*/
private $masterGuides;
/**
* @ORM\Column(type="string", length=255)
*/
private $contactEmail;
public function __construct()
{
$this->masterGuides = 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 getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): self
{
$this->address = $address;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
/**
* @return Collection<int, MasterGuide>
*/
public function getMasterGuides(): Collection
{
return $this->masterGuides;
}
public function addMasterGuide(MasterGuide $masterGuide): self
{
if (!$this->masterGuides->contains($masterGuide)) {
$this->masterGuides[] = $masterGuide;
$masterGuide->setConsignee($this);
}
return $this;
}
public function removeMasterGuide(MasterGuide $masterGuide): self
{
if ($this->masterGuides->removeElement($masterGuide)) {
// set the owning side to null (unless already changed)
if ($masterGuide->getConsignee() === $this) {
$masterGuide->setConsignee(null);
}
}
return $this;
}
public function getContactEmail(): ?string
{
return $this->contactEmail;
}
public function setContactEmail(string $contactEmail): self
{
$this->contactEmail = $contactEmail;
return $this;
}
}