Commit 90037931 authored by Mat's avatar Mat
Browse files

corrections sur l'entité Offre

parent eb37a19f
......@@ -9,6 +9,8 @@ use Doctrine\ORM\Mapping as ORM;
*
* @ORM\Table(name="offre")
* @ORM\Entity(repositoryClass="PotageBundle\Repository\OffreRepository")
* @ORM\HasLifecycleCallbacks()
*
*/
class Offre
{
......@@ -51,9 +53,9 @@ class Offre
/**
* @var array
*
* @ORM\Column(name="statut", type="string", columnDefinition="enum('draft', 'current', 'closed', 'trash')")
* @ORM\Column(name="status", type="string", columnDefinition="enum('draft', 'current', 'closed', 'trash')")
*/
private $statut;
private $status;
/**
* @var \DateTime
......@@ -70,7 +72,7 @@ class Offre
public function prePersist()
{
$this->createdAt = new \DateTime();
//$this->updatedAt = new \DateTime();
$this->updatedAt = new \DateTime('0000-00-00 00:00:00');
}
/**
*
......@@ -82,10 +84,11 @@ class Offre
}
/**
* Get id
*
* @return int
* @return integer
*/
public function getId()
{
......@@ -165,27 +168,27 @@ class Offre
}
/**
* Set statut
* Set status
*
* @param array $statut
* @param string $status
*
* @return Offre
*/
public function setStatut($statut)
public function setStatus($status)
{
$this->statut = $statut;
$this->status = $status;
return $this;
}
/**
* Get statut
* Get status
*
* @return array
* @return string
*/
public function getStatut()
public function getStatus()
{
return $this->statut;
return $this->status;
}
/**
......
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