Commit 079826f4 authored by Mat's avatar Mat

crée une One2Many entre OffreLegumes et CommandeLegumes

parent e8cc1338
...@@ -28,6 +28,13 @@ class CommandeLegumes ...@@ -28,6 +28,13 @@ class CommandeLegumes
* @ORM\JoinColumn(name="id_commande", nullable=false) * @ORM\JoinColumn(name="id_commande", nullable=false)
*/ */
private $commande; private $commande;
/**
* @var int
* @ORM\ManyToOne(targetEntity="PotageBundle\Entity\OffreLegumes", inversedBy="commandeLegumes")
* @ORM\JoinColumn(name="id_offre_legume", nullable=false)
*/
private $offreLegume;
/** /**
* @var float * @var float
...@@ -246,6 +253,24 @@ class CommandeLegumes ...@@ -246,6 +253,24 @@ class CommandeLegumes
return $this; return $this;
} }
/**
* @return int
*/
public function getOffreLegume()
{
return $this->offreLegume;
}
/**
* @param int $offreLegume
* @return CommandeLegumes
*/
public function setOffreLegume($offreLegume)
{
$this->offreLegume = $offreLegume;
return $this;
}
} }
...@@ -36,6 +36,12 @@ class OffreLegumes ...@@ -36,6 +36,12 @@ class OffreLegumes
*/ */
private $offre; private $offre;
/**
* @var CommandeLegumes[]
* @ORM\OneToMany(targetEntity="PotageBundle\Entity\CommandeLegumes", mappedBy="offreLegume")
*/
private $commandeLegumes;
/** /**
* @var string * @var string
* *
...@@ -679,12 +685,21 @@ class OffreLegumes ...@@ -679,12 +685,21 @@ class OffreLegumes
return $this->offre; return $this->offre;
} }
/* /**
private OffrePrepa; * @return CommandeLegumes[]
*/
public function setOffrePrepa($offresPrepa) public function getCommandeLegumes()
{ {
return $this->commandeLegumes;
}
/**
* @param CommandeLegumes[] $commandeLegumes
*/
public function setCommandeLegumes($commandeLegumes)
{
$this->commandeLegumes = $commandeLegumes;
} }
*/
} }
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