<?php
namespace App\Entity;
use App\Repository\TypeVoyageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TypeVoyageRepository::class)
*/
class TypeVoyage
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $img;
/**
* @ORM\OneToMany(targetEntity=Offer::class, mappedBy="type")
*/
private $offers;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $color;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $hook;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $title;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $metaDescription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $metaTitle;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $summary;
/**
* @ORM\OneToMany(targetEntity=QuoteRequest::class, mappedBy="tripVoyage")
*/
private $quoteRequests;
public function __construct()
{
$this->offers = new ArrayCollection();
$this->quoteRequests = 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 getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getImg(): ?string
{
return $this->img;
}
public function setImg(?string $img): self
{
$this->img = $img;
return $this;
}
/**
* @return Collection<int, Offer>
*/
public function getOffers(): Collection
{
return $this->offers;
}
public function addOffer(Offer $offer): self
{
if (!$this->offers->contains($offer)) {
$this->offers[] = $offer;
$offer->setType($this);
}
return $this;
}
public function removeOffer(Offer $offer): self
{
if ($this->offers->removeElement($offer)) {
// set the owning side to null (unless already changed)
if ($offer->getType() === $this) {
$offer->setType(null);
}
}
return $this;
}
public function getColor(): ?string
{
return $this->color;
}
public function setColor(?string $color): self
{
$this->color = $color;
return $this;
}
public function getHook(): ?string
{
return $this->hook;
}
public function setHook(?string $hook): self
{
$this->hook = $hook;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getMetaDescription(): ?string
{
return $this->metaDescription;
}
public function setMetaDescription(?string $metaDescription): self
{
$this->metaDescription = $metaDescription;
return $this;
}
public function getMetaTitle(): ?string
{
return $this->metaTitle;
}
public function setMetaTitle(?string $metaTitle): self
{
$this->metaTitle = $metaTitle;
return $this;
}
public function getSummary(): ?string
{
return $this->summary;
}
public function setSummary(?string $summary): self
{
$this->summary = $summary;
return $this;
}
/**
* @return Collection<int, QuoteRequest>
*/
public function getQuoteRequests(): Collection
{
return $this->quoteRequests;
}
public function addQuoteRequest(QuoteRequest $quoteRequest): self
{
if (!$this->quoteRequests->contains($quoteRequest)) {
$this->quoteRequests[] = $quoteRequest;
$quoteRequest->setTripVoyage($this);
}
return $this;
}
public function removeQuoteRequest(QuoteRequest $quoteRequest): self
{
if ($this->quoteRequests->removeElement($quoteRequest)) {
// set the owning side to null (unless already changed)
if ($quoteRequest->getTripVoyage() === $this) {
$quoteRequest->setTripVoyage(null);
}
}
return $this;
}
}