%PDF- %PDF-
Direktori : /home/emtnaeewxm/www/src/EEM/ParametreBundle/Entity/ |
Current File : /home/emtnaeewxm/www/src/EEM/ParametreBundle/Entity/Magasin.php |
<?php namespace EEM\ParametreBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * Magasin * * @ORM\Table(name="magasin") * @ORM\Entity(repositoryClass="EEM\ParametreBundle\Repository\MagasinRepository") */ class Magasin { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=255, nullable=true) * @Assert\NotBlank(message="Ce champs est obligatoire") */ private $name; /** * @var string * * @ORM\Column(name="tel", type="string", length=255, nullable=true) * @Assert\NotBlank(message="Ce champs est obligatoire") */ private $tel; /** * @ORM\ManyToOne(targetEntity="Gestion\UserBundle\Entity\User" , inversedBy="magasin", cascade={"persist"}) * @ORM\JoinColumn(nullable=false) * @Assert\NotBlank(message="Ce champs est obligatoire") */ private $user; /** * @var string * * @ORM\Column(name="adresse", type="text", nullable=true) */ private $adresse; /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set name * * @param string $name * * @return Magasin */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set tel * * @param string $tel * * @return Magasin */ public function setTel($tel) { $this->tel = $tel; return $this; } /** * Get tel * * @return string */ public function getTel() { return $this->tel; } /** * Set user * * @param \Gestion\UserBundle\Entity\User $user * * @return Magasin */ public function setUser(\Gestion\UserBundle\Entity\User $user) { $this->user = $user; return $this; } /** * Get user * * @return \Gestion\UserBundle\Entity\User */ public function getUser() { return $this->user; } /** * Set adresse * * @param string $adresse * * @return Magasin */ public function setAdresse($adresse) { $this->adresse = $adresse; return $this; } /** * Get adresse * * @return string */ public function getAdresse() { return $this->adresse; } }