Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * News
- *
- * @ORM\Table(name="news")
- * @ORM\Entity(repositoryClass="AppBundle\Repository\NewsRepository")
- */
- class News
- {
- /**
- * @var int
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- // Plusieurs news peuvent appartenir à plusieurs catégories
- private $categories;
- /**
- * @ORM\Column(name="title", type="string", length=255)
- */
- private $title;
- /**
- * @ORM\Column(name="date", type="datetime")
- */
- private $date;
- /**
- * @ORM\Column(name="content", type="text")
- */
- private $content;
- // Plusieurs news ont un auteur
- private $author;
- // Plusieurs news peuvent avoir plusieurs commentaires
- private $comments;
- /**
- * Get id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement