<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * TypeRdv
 *
 * @ORM\Table(name="type_rdv")
 * @ORM\Entity(repositoryClass="AppBundle\Repository\TypeRdvRepository")
 */
class TypeRdv
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

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

    /**
     * @var bool
     *
     * @ORM\Column(name="payant", type="boolean")
     */
    private $payant;

    /**
     * @var int
     *
     * @ORM\Column(name="tarif", type="integer")
     */
    private $tarif;


    /**
     * Get id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set libelle.
     *
     * @param string $libelle
     *
     * @return TypeRdv
     */
    public function setLibelle($libelle)
    {
        $this->libelle = $libelle;

        return $this;
    }

    /**
     * Get libelle.
     *
     * @return string
     */
    public function getLibelle()
    {
        return $this->libelle;
    }

    /**
     * Set payant.
     *
     * @param bool $payant
     *
     * @return TypeRdv
     */
    public function setPayant($payant)
    {
        $this->payant = $payant;

        return $this;
    }

    /**
     * Get payant.
     *
     * @return bool
     */
    public function getPayant()
    {
        return $this->payant;
    }

    /**
     * Set tarif.
     *
     * @param int $tarif
     *
     * @return TypeRdv
     */
    public function setTarif($tarif)
    {
        $this->tarif = $tarif;

        return $this;
    }

    /**
     * Get tarif.
     *
     * @return int
     */
    public function getTarif()
    {
        return $this->tarif;
    }

    public function __toString(){
        return $this->tarif > 0 ? $this->libelle . " (". $this->tarif . " F CFA) " : $this->libelle;
    }
}
