src/Entity/TypeVoyage.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeVoyageRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypeVoyageRepository::class)
  9.  */
  10. class TypeVoyage
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $description;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $img;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=Offer::class, mappedBy="type")
  32.      */
  33.     private $offers;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $color;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $hook;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $title;
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private $metaDescription;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     private $metaTitle;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $summary;
  58.     /**
  59.      * @ORM\OneToMany(targetEntity=QuoteRequest::class, mappedBy="tripVoyage")
  60.      */
  61.     private $quoteRequests;
  62.     public function __construct()
  63.     {
  64.         $this->offers = new ArrayCollection();
  65.         $this->quoteRequests = new ArrayCollection();
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getName(): ?string
  72.     {
  73.         return $this->name;
  74.     }
  75.     public function setName(?string $name): self
  76.     {
  77.         $this->name $name;
  78.         return $this;
  79.     }
  80.     public function getDescription(): ?string
  81.     {
  82.         return $this->description;
  83.     }
  84.     public function setDescription(?string $description): self
  85.     {
  86.         $this->description $description;
  87.         return $this;
  88.     }
  89.     public function getImg(): ?string
  90.     {
  91.         return $this->img;
  92.     }
  93.     public function setImg(?string $img): self
  94.     {
  95.         $this->img $img;
  96.         return $this;
  97.     }
  98.     /**
  99.      * @return Collection<int, Offer>
  100.      */
  101.     public function getOffers(): Collection
  102.     {
  103.         return $this->offers;
  104.     }
  105.     public function addOffer(Offer $offer): self
  106.     {
  107.         if (!$this->offers->contains($offer)) {
  108.             $this->offers[] = $offer;
  109.             $offer->setType($this);
  110.         }
  111.         return $this;
  112.     }
  113.     public function removeOffer(Offer $offer): self
  114.     {
  115.         if ($this->offers->removeElement($offer)) {
  116.             // set the owning side to null (unless already changed)
  117.             if ($offer->getType() === $this) {
  118.                 $offer->setType(null);
  119.             }
  120.         }
  121.         return $this;
  122.     }
  123.     public function getColor(): ?string
  124.     {
  125.         return $this->color;
  126.     }
  127.     public function setColor(?string $color): self
  128.     {
  129.         $this->color $color;
  130.         return $this;
  131.     }
  132.     public function getHook(): ?string
  133.     {
  134.         return $this->hook;
  135.     }
  136.     public function setHook(?string $hook): self
  137.     {
  138.         $this->hook $hook;
  139.         return $this;
  140.     }
  141.     public function getTitle(): ?string
  142.     {
  143.         return $this->title;
  144.     }
  145.     public function setTitle(?string $title): self
  146.     {
  147.         $this->title $title;
  148.         return $this;
  149.     }
  150.     public function getMetaDescription(): ?string
  151.     {
  152.         return $this->metaDescription;
  153.     }
  154.     public function setMetaDescription(?string $metaDescription): self
  155.     {
  156.         $this->metaDescription $metaDescription;
  157.         return $this;
  158.     }
  159.     public function getMetaTitle(): ?string
  160.     {
  161.         return $this->metaTitle;
  162.     }
  163.     public function setMetaTitle(?string $metaTitle): self
  164.     {
  165.         $this->metaTitle $metaTitle;
  166.         return $this;
  167.     }
  168.     public function getSummary(): ?string
  169.     {
  170.         return $this->summary;
  171.     }
  172.     public function setSummary(?string $summary): self
  173.     {
  174.         $this->summary $summary;
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return Collection<int, QuoteRequest>
  179.      */
  180.     public function getQuoteRequests(): Collection
  181.     {
  182.         return $this->quoteRequests;
  183.     }
  184.     public function addQuoteRequest(QuoteRequest $quoteRequest): self
  185.     {
  186.         if (!$this->quoteRequests->contains($quoteRequest)) {
  187.             $this->quoteRequests[] = $quoteRequest;
  188.             $quoteRequest->setTripVoyage($this);
  189.         }
  190.         return $this;
  191.     }
  192.     public function removeQuoteRequest(QuoteRequest $quoteRequest): self
  193.     {
  194.         if ($this->quoteRequests->removeElement($quoteRequest)) {
  195.             // set the owning side to null (unless already changed)
  196.             if ($quoteRequest->getTripVoyage() === $this) {
  197.                 $quoteRequest->setTripVoyage(null);
  198.             }
  199.         }
  200.         return $this;
  201.     }
  202. }