Advertisement
Guest User

Commento.php

a guest
Mar 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. <?php
  2.  
  3. // src/AppBundle/Entity/Commento.php
  4. namespace AppBundle\Entity;
  5.  
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8.  
  9.  
  10. /**
  11. * @ORM\Entity
  12. * @ORM\Table(name="Commento")
  13. */
  14. class Commento
  15. {
  16. /**
  17. * @ORM\Column(type="integer")
  18. * @ORM\Id
  19. * @ORM\GeneratedValue(strategy="AUTO")
  20. *
  21. */
  22. private $id;
  23.  
  24.  
  25. /**
  26. *
  27. * @ORM\ManyToOne(targetEntity="Articolo", inversedBy="commento")
  28. */
  29. private $commento;
  30.  
  31.  
  32. /**
  33. * @ORM\Column(type="string", length=250)
  34. */
  35. private $email;
  36.  
  37.  
  38. /**
  39. * @ORM\Column(type="string", length=40)
  40. */
  41. private $ip;
  42.  
  43.  
  44. /**
  45. * @ORM\Column(type="text")
  46. */
  47. private $userAgent;
  48.  
  49.  
  50.  
  51. /**
  52. * @ORM\Column(type="string", length=250)
  53. */
  54. private $device;
  55.  
  56.  
  57.  
  58. /**
  59. * @ORM\Column(type="text")
  60. */
  61. private $referer;
  62.  
  63.  
  64.  
  65.  
  66. /**
  67. * @ORM\Column(type="datetime")
  68. */
  69. private $creato;
  70.  
  71.  
  72. /**
  73. * @ORM\Column(type="boolean")
  74. */
  75. private $stato; //censurato, pubblicato, in attesa di approvazione
  76.  
  77.  
  78. public function __construct()
  79. {
  80. $this->creato = new \DateTime("now");
  81. }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement