Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // src/AppBundle/Entity/Commento.php
- namespace AppBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- /**
- * @ORM\Entity
- * @ORM\Table(name="Commento")
- */
- class Commento
- {
- /**
- * @ORM\Column(type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- *
- */
- private $id;
- /**
- *
- * @ORM\ManyToOne(targetEntity="Articolo", inversedBy="commento")
- */
- private $commento;
- /**
- * @ORM\Column(type="string", length=250)
- */
- private $email;
- /**
- * @ORM\Column(type="string", length=40)
- */
- private $ip;
- /**
- * @ORM\Column(type="text")
- */
- private $userAgent;
- /**
- * @ORM\Column(type="string", length=250)
- */
- private $device;
- /**
- * @ORM\Column(type="text")
- */
- private $referer;
- /**
- * @ORM\Column(type="datetime")
- */
- private $creato;
- /**
- * @ORM\Column(type="boolean")
- */
- private $stato; //censurato, pubblicato, in attesa di approvazione
- public function __construct()
- {
- $this->creato = new \DateTime("now");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement