Brasserie.php 1.97 KB
Newer Older
1 2 3 4 5
<?php

namespace Api2Bundle\Entity;

use Doctrine\ORM\Mapping as ORM;
6
use JMS\Serializer\Annotation as Serializer;
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21

/**
 * Brasserie
 *
 * @ORM\Table(name="brasserie")
 * @ORM\Entity(repositoryClass="Api2Bundle\Repository\BrasserieRepository")
 */
class Brasserie
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
22
     * @Serializer\Groups({"getBrasserie"})
23 24 25 26 27
     */
    private $id;
    
    /**
     * @var integer
Mat's avatar
Mat committed
28 29
     * @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Pays")
     * @ORM\JoinColumn(name="id_pays", nullable=false)
30
     * @Serializer\Groups({"getBrasserie"})
31 32 33 34 35 36
     */
    private $pays;
    
    /**
     * @var string
     * @ORM\Column(name="nom", type="string", length=255)
37
     * @Serializer\Groups({"getBrasserie"})
38 39 40 41 42 43
     */
    private $nom;

    /**
     * @var string
     * @ORM\Column(name="adresse", type="string", length=255, nullable=true)
44
     * @Serializer\Groups({"getBrasserie"})
45 46 47 48 49 50 51 52 53 54 55 56 57
     */
    private $adresse;


    /**
     * Get id
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
Mat's avatar
Mat committed
58
    
59
    /**
Mat's avatar
Mat committed
60
     * @return int
61
     */
Mat's avatar
Mat committed
62
    public function getPays()
63
    {
Mat's avatar
Mat committed
64
        return $this->pays;
65
    }
Mat's avatar
Mat committed
66
    
67
    /**
Mat's avatar
Mat committed
68
     * @param int $pays
69 70
     * @return Brasserie
     */
Mat's avatar
Mat committed
71
    public function setPays($pays)
72
    {
Mat's avatar
Mat committed
73
        $this->pays = $pays;
74 75 76 77
        return $this;
    }
    
    /**
Mat's avatar
Mat committed
78
     * @return string
79
     */
Mat's avatar
Mat committed
80
    public function getNom()
81
    {
Mat's avatar
Mat committed
82
        return $this->nom;
83 84 85
    }
    
    /**
Mat's avatar
Mat committed
86
     * @param string $nom
87 88
     * @return Brasserie
     */
Mat's avatar
Mat committed
89
    public function setNom($nom)
90
    {
Mat's avatar
Mat committed
91
        $this->nom = $nom;
92 93 94 95
        return $this;
    }
    
    /**
Mat's avatar
Mat committed
96
     * @return string
97
     */
Mat's avatar
Mat committed
98
    public function getAdresse()
99
    {
Mat's avatar
Mat committed
100
        return $this->adresse;
101 102 103
    }
    
    /**
Mat's avatar
Mat committed
104
     * @param string $adresse
105 106
     * @return Brasserie
     */
Mat's avatar
Mat committed
107
    public function setAdresse($adresse)
108
    {
Mat's avatar
Mat committed
109
        $this->adresse = $adresse;
110 111 112 113 114
        return $this;
    }
    
}