Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Contenu\ContenuBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Categories
- *
- * @ORM\Table("categories")
- * @ORM\Entity(repositoryClass="Contenu\ContenuBundle\Repository\CategoriesRepository")
- */
- class Categories
- {
- /**
- * @var integer
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @ORM\OneToOne(targetEntity="Contenu\ContenuBundle\Entity\Media", cascade={"persist","remove"})
- * @ORM\JoinColumn(nullable=false)
- */
- private $image;
- /**
- * @var string
- *
- * @ORM\Column(name="nom", type="string", length=125)
- */
- private $nom;
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set nom
- *
- * @param string $nom
- * @return Categories
- */
- public function setNom($nom)
- {
- $this->nom = $nom;
- return $this;
- }
- /**
- * Get nom
- *
- * @return string
- */
- public function getNom()
- {
- return $this->nom;
- }
- /**
- * Set image
- *
- * @param \Contenu\ContenuBundle\Entity\Media $image
- * @return Categories
- */
- public function setImage(\Contenu\ContenuBundle\Entity\Media $image)
- {
- $this->image = $image;
- return $this;
- }
- /**
- * Get image
- *
- * @return \Contenu\ContenuBundle\Entity\Media
- */
- public function getImage()
- {
- return $this->image;
- }
- public function __toString()
- {
- return $this->getNom();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement