<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * TravelInsurance
 *
 * @ORM\Table(name="travel_insurance")
 * @ORM\Entity
 */
class TravelInsurance
{
    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=255, nullable=true)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="internal_name", type="string", length=255, nullable=true)
     */
    private $internalName;

    /**
     * @var string
     *
     * @ORM\Column(name="included", type="text", length=255, nullable=true)
     */
    private $included;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\OneToMany(targetEntity="AppBundle\Entity\TravelInsurancePrice", mappedBy="insurance")
     */
    protected $prices;


    /**
     * Set name
     *
     * @param string $name
     *
     * @return TravelInsurance
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set internalName
     *
     * @param string $internalName
     *
     * @return TravelInsurance
     */
    public function setInternalName($internalName)
    {
        $this->internalName = $internalName;

        return $this;
    }

    /**
     * Get internalName
     *
     * @return string
     */
    public function getInternalName()
    {
        return $this->internalName;
    }

    /**
     * Set included
     *
     * @param string $included
     *
     * @return TravelInsurance
     */
    public function setIncluded($included)
    {
        $this->included = $included;

        return $this;
    }

    /**
     * Get included
     *
     * @return string
     */
    public function getIncluded()
    {
        return $this->included;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->prices = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add price
     *
     * @param \AppBundle\Entity\TravelInsurancePrice $price
     *
     * @return TravelInsurance
     */
    public function addPrice(\AppBundle\Entity\TravelInsurancePrice $price)
    {
        $this->prices[] = $price;

        return $this;
    }

    /**
     * Remove price
     *
     * @param \AppBundle\Entity\TravelInsurancePrice $price
     */
    public function removePrice(\AppBundle\Entity\TravelInsurancePrice $price)
    {
        $this->prices->removeElement($price);
    }

    /**
     * Get prices
     *
     * @return TravelInsurancePrice[]|\Doctrine\Common\Collections\Collection
     */
    public function getPrices()
    {
        return $this->prices;
    }

    public function __toString()
    {
        return $this->getName();
    }
}
