Commit 7281cc24 authored by Mat's avatar Mat

repasse sur les entités

parent 9c1f489f
...@@ -22,37 +22,40 @@ class Biere ...@@ -22,37 +22,40 @@ class Biere
private $id; private $id;
/** /**
* @var integer * @var Categorie
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Categorie", inversedBy="bieres") * @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Categorie")
* @ORM\Column(name="id_categorie") * @ORM\JoinColumn(name="id_categorie", nullable=false)
*/ */
private $categorie; private $categorie;
/** /**
* @var integer * @var integer
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Brasserie", inversedBy="bieres") * @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Brasserie")
* @ORM\Column(name="id_brasserie") * @ORM\JoinColumn(name="id_brasserie", nullable=false)
*/ */
private $brasserie; private $brasserie;
/** /**
* @var string * @var string
* * @ORM\Column(name="nom", type="string", length=255, nullable=false, unique=false)
* @ORM\Column(name="nom", type="string", length=255)
*/ */
private $nom; private $nom;
/** /**
* @var float * @var float
* * @ORM\Column(name="degre", type="float", nullable=true, unique=false)
* @ORM\Column(name="degre", type="float")
*/ */
private $degre; private $degre;
/**
* @var float
* @ORM\Column(name="capacite", length=255, type="string", nullable=true, unique=false)
*/
private $capacite;
/** /**
* @var string * @var string
* * @ORM\Column(name="image", type="string", length=255, nullable=true, unique=true)
* @ORM\Column(name="image", type="string", length=255)
*/ */
private $image; private $image;
...@@ -66,115 +69,114 @@ class Biere ...@@ -66,115 +69,114 @@ class Biere
{ {
return $this->id; return $this->id;
} }
/** /**
* Set nom * @return Categorie
* */
* @param string $nom public function getCategorie()
* {
return $this->categorie;
}
/**
* @param Categorie $categorie
* @return Biere * @return Biere
*/ */
public function setNom($nom) public function setCategorie($categorie)
{ {
$this->nom = $nom; $this->categorie = $categorie;
return $this; return $this;
} }
/**
* @return int
*/
public function getBrasserie()
{
return $this->brasserie;
}
/**
* @param int $brasserie
* @return Biere
*/
public function setBrasserie($brasserie)
{
$this->brasserie = $brasserie;
return $this;
}
/** /**
* Get nom
*
* @return string * @return string
*/ */
public function getNom() public function getNom()
{ {
return $this->nom; return $this->nom;
} }
/** /**
* Set degre * @param string $nom
*
* @param float $degre
*
* @return Biere * @return Biere
*/ */
public function setDegre($degre) public function setNom($nom)
{ {
$this->degre = $degre; $this->nom = $nom;
return $this; return $this;
} }
/** /**
* Get degre
*
* @return float * @return float
*/ */
public function getDegre() public function getDegre()
{ {
return $this->degre; return $this->degre;
} }
/** /**
* Set image * @param float $degre
*
* @param string $image
*
* @return Biere * @return Biere
*/ */
public function setImage($image) public function setDegre($degre)
{ {
$this->image = $image; $this->degre = $degre;
return $this; return $this;
} }
/**
* Get image
*
* @return string
*/
public function getImage()
{
return $this->image;
}
/** /**
* @return int * @return float
*/ */
public function getCategorie() public function getCapacite()
{ {
return $this->categorie; return $this->capacite;
} }
/** /**
* @param int $categorie * @param float $capacite
* @return Biere * @return Biere
*/ */
public function setCategorie($categorie) public function setCapacite($capacite)
{ {
$this->categorie = $categorie; $this->capacite = $capacite;
return $this; return $this;
} }
/** /**
* @return int * @return string
*/ */
public function getBrasserie() public function getImage()
{ {
return $this->brasserie; return $this->image;
} }
/** /**
* @param int $brasserie * @param string $image
* @return Biere * @return Biere
*/ */
public function setBrasserie($brasserie) public function setImage($image)
{ {
$this->brasserie = $brasserie; $this->image = $image;
return $this; return $this;
} }
} }
...@@ -22,16 +22,10 @@ class Brasserie ...@@ -22,16 +22,10 @@ class Brasserie
*/ */
private $id; private $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Api2Bundle\Entity\Biere", mappedBy="brasserie")
*/
private $bieres;
/** /**
* @var integer * @var integer
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Pays", inversedBy="brasseries") * @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Pays")
* @ORM\Column(name="id_pays") * @ORM\JoinColumn(name="id_pays", nullable=false)
*/ */
private $pays; private $pays;
...@@ -59,91 +53,60 @@ class Brasserie ...@@ -59,91 +53,60 @@ class Brasserie
{ {
return $this->id; return $this->id;
} }
/**
* Set nom
*
* @param string $nom
*
* @return Brasserie
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/** /**
* Get nom * @return int
*
* @return string
*/ */
public function getNom() public function getPays()
{ {
return $this->nom; return $this->pays;
} }
/** /**
* Set adresse * @param int $pays
*
* @param string $adresse
*
* @return Brasserie * @return Brasserie
*/ */
public function setAdresse($adresse) public function setPays($pays)
{ {
$this->adresse = $adresse; $this->pays = $pays;
return $this; return $this;
} }
/**
* Get adresse
*
* @return string
*/
public function getAdresse()
{
return $this->adresse;
}
/** /**
* @return ArrayCollection * @return string
*/ */
public function getBieres() public function getNom()
{ {
return $this->bieres; return $this->nom;
} }
/** /**
* @param ArrayCollection $bieres * @param string $nom
* @return Brasserie * @return Brasserie
*/ */
public function setBieres($bieres) public function setNom($nom)
{ {
$this->bieres = $bieres; $this->nom = $nom;
return $this; return $this;
} }
/** /**
* @return int * @return string
*/ */
public function getPays() public function getAdresse()
{ {
return $this->pays; return $this->adresse;
} }
/** /**
* @param int $pays * @param string $adresse
* @return Brasserie * @return Brasserie
*/ */
public function setPays($pays) public function setAdresse($adresse)
{ {
$this->pays = $pays; $this->adresse = $adresse;
return $this; return $this;
} }
} }
...@@ -22,13 +22,6 @@ class Categorie ...@@ -22,13 +22,6 @@ class Categorie
*/ */
private $id; private $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Api2Bundle\Entity\Biere", mappedBy="categorie")
*/
private $bieres;
/** /**
* @var string * @var string
* *
...@@ -46,24 +39,8 @@ class Categorie ...@@ -46,24 +39,8 @@ class Categorie
{ {
return $this->id; return $this->id;
} }
/**
* Set nom
*
* @param string $nom
*
* @return Categorie
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/** /**
* Get nom
*
* @return string * @return string
*/ */
public function getNom() public function getNom()
...@@ -72,19 +49,13 @@ class Categorie ...@@ -72,19 +49,13 @@ class Categorie
} }
/** /**
* @return ArrayCollection * @param string $nom
*/ * @return Categorie
public function getBieres()
{
return $this->bieres;
}
/**
* @param ArrayCollection $bieres
*/ */
public function setBieres($bieres) public function setNom($nom)
{ {
$this->bieres = $bieres; $this->nom = $nom;
return $this;
} }
......
...@@ -22,12 +22,6 @@ class Pays ...@@ -22,12 +22,6 @@ class Pays
*/ */
private $id; private $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Api2Bundle\Entity\Brasserie", mappedBy="pays")
*/
private $brasseries;
/** /**
* @var string * @var string
* *
...@@ -52,48 +46,26 @@ class Pays ...@@ -52,48 +46,26 @@ class Pays
{ {
return $this->id; return $this->id;
} }
/**
* Set isocode
*
* @param string $isocode
*
* @return Pays
*/
public function setIsocode($isocode)
{
$this->isocode = $isocode;
return $this;
}
/** /**
* Get isocode
*
* @return string * @return string
*/ */
public function getIsocode() public function getIsocode()
{ {
return $this->isocode; return $this->isocode;
} }
/** /**
* Set nom * @param string $isocode
*
* @param string $nom
*
* @return Pays * @return Pays
*/ */
public function setNom($nom) public function setIsocode($isocode)
{ {
$this->nom = $nom; $this->isocode = $isocode;
return $this; return $this;
} }
/** /**
* Get nom
*
* @return string * @return string
*/ */
public function getNom() public function getNom()
...@@ -102,23 +74,15 @@ class Pays ...@@ -102,23 +74,15 @@ class Pays
} }
/** /**
* @return ArrayCollection * @param string $nom
*/ * @return Pays
public function getBrasseries()
{
return $this->brasseries;
}
/**
* @param ArrayCollection $brasseries
*/ */
public function setBrasseries($brasseries) public function setNom($nom)
{ {
$this->brasseries = $brasseries; $this->nom = $nom;
return $this;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment