Commit 7281cc24 authored by Mat's avatar Mat

repasse sur les entités

parent 9c1f489f
......@@ -22,37 +22,40 @@ class Biere
private $id;
/**
* @var integer
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Categorie", inversedBy="bieres")
* @ORM\Column(name="id_categorie")
* @var Categorie
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Categorie")
* @ORM\JoinColumn(name="id_categorie", nullable=false)
*/
private $categorie;
/**
* @var integer
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Brasserie", inversedBy="bieres")
* @ORM\Column(name="id_brasserie")
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Brasserie")
* @ORM\JoinColumn(name="id_brasserie", nullable=false)
*/
private $brasserie;
/**
* @var string
*
* @ORM\Column(name="nom", type="string", length=255)
* @ORM\Column(name="nom", type="string", length=255, nullable=false, unique=false)
*/
private $nom;
/**
* @var float
*
* @ORM\Column(name="degre", type="float")
* @ORM\Column(name="degre", type="float", nullable=true, unique=false)
*/
private $degre;
/**
* @var float
* @ORM\Column(name="capacite", length=255, type="string", nullable=true, unique=false)
*/
private $capacite;
/**
* @var string
*
* @ORM\Column(name="image", type="string", length=255)
* @ORM\Column(name="image", type="string", length=255, nullable=true, unique=true)
*/
private $image;
......@@ -66,115 +69,114 @@ class Biere
{
return $this->id;
}
/**
* Set nom
*
* @param string $nom
*
* @return Categorie
*/
public function getCategorie()
{
return $this->categorie;
}
/**
* @param Categorie $categorie
* @return Biere
*/
public function setNom($nom)
public function setCategorie($categorie)
{
$this->nom = $nom;
$this->categorie = $categorie;
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
*/
public function getNom()
{
return $this->nom;
}
/**
* Set degre
*
* @param float $degre
*
* @param string $nom
* @return Biere
*/
public function setDegre($degre)
public function setNom($nom)
{
$this->degre = $degre;
$this->nom = $nom;
return $this;
}
/**
* Get degre
*
* @return float
*/
public function getDegre()
{
return $this->degre;
}
/**
* Set image
*
* @param string $image
*
* @param float $degre
* @return Biere
*/
public function setImage($image)
public function setDegre($degre)
{
$this->image = $image;
$this->degre = $degre;
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
*/
public function setCategorie($categorie)
public function setCapacite($capacite)
{
$this->categorie = $categorie;
$this->capacite = $capacite;
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
*/
public function setBrasserie($brasserie)
public function setImage($image)
{
$this->brasserie = $brasserie;
$this->image = $image;
return $this;
}
}
......@@ -22,16 +22,10 @@ class Brasserie
*/
private $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Api2Bundle\Entity\Biere", mappedBy="brasserie")
*/
private $bieres;
/**
* @var integer
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Pays", inversedBy="brasseries")
* @ORM\Column(name="id_pays")
* @ORM\ManyToOne(targetEntity="Api2Bundle\Entity\Pays")
* @ORM\JoinColumn(name="id_pays", nullable=false)
*/
private $pays;
......@@ -59,91 +53,60 @@ class Brasserie
{
return $this->id;
}
/**
* Set nom
*
* @param string $nom
*
* @return Brasserie
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
* @return string
* @return int
*/
public function getNom()
public function getPays()
{
return $this->nom;
return $this->pays;
}
/**
* Set adresse
*
* @param string $adresse
*
* @param int $pays
* @return Brasserie
*/
public function setAdresse($adresse)
public function setPays($pays)
{
$this->adresse = $adresse;
$this->pays = $pays;
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
*/
public function setBieres($bieres)
public function setNom($nom)
{
$this->bieres = $bieres;
$this->nom = $nom;
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
*/
public function setPays($pays)
public function setAdresse($adresse)
{
$this->pays = $pays;
$this->adresse = $adresse;
return $this;
}
}
......@@ -22,13 +22,6 @@ class Categorie
*/
private $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Api2Bundle\Entity\Biere", mappedBy="categorie")
*/
private $bieres;
/**
* @var string
*
......@@ -46,24 +39,8 @@ class Categorie
{
return $this->id;
}
/**
* Set nom
*
* @param string $nom
*
* @return Categorie
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
......@@ -72,19 +49,13 @@ class Categorie
}
/**
* @return ArrayCollection
*/
public function getBieres()
{
return $this->bieres;
}
/**
* @param ArrayCollection $bieres
* @param string $nom
* @return Categorie
*/
public function setBieres($bieres)
public function setNom($nom)
{
$this->bieres = $bieres;
$this->nom = $nom;
return $this;
}
......
......@@ -22,12 +22,6 @@ class Pays
*/
private $id;
/**
* @var ArrayCollection
* @ORM\OneToMany(targetEntity="Api2Bundle\Entity\Brasserie", mappedBy="pays")
*/
private $brasseries;
/**
* @var string
*
......@@ -52,48 +46,26 @@ class Pays
{
return $this->id;
}
/**
* Set isocode
*
* @param string $isocode
*
* @return Pays
*/
public function setIsocode($isocode)
{
$this->isocode = $isocode;
return $this;
}
/**
* Get isocode
*
* @return string
*/
public function getIsocode()
{
return $this->isocode;
}
/**
* Set nom
*
* @param string $nom
*
* @param string $isocode
* @return Pays
*/
public function setNom($nom)
public function setIsocode($isocode)
{
$this->nom = $nom;
$this->isocode = $isocode;
return $this;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
......@@ -102,23 +74,15 @@ class Pays
}
/**
* @return ArrayCollection
*/
public function getBrasseries()
{
return $this->brasseries;
}
/**
* @param ArrayCollection $brasseries
* @param string $nom
* @return Pays
*/
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