Commentaire.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Commentaire
  6. *
  7. * @ORM\Table(name="commentaire")
  8. * @ORM\Entity(repositoryClass="App\Repository\CommentaireRepository")
  9. */
  10. class Commentaire
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. *
  23. * @ORM\Column(name="contenu", type="text", length=191, nullable=true)
  24. */
  25. private $contenu;
  26. /**
  27. * @var int
  28. *
  29. * @ORM\Column(name="note", type="integer", nullable=true)
  30. *
  31. */
  32. private $note;
  33. /**
  34. * @ORM\ManyToOne(targetEntity="App\Entity\Film")
  35. * @ORM\JoinColumn(nullable=false)
  36. */
  37. private $film;
  38. /**
  39. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  40. * @ORM\JoinColumn(nullable=false)
  41. */
  42. private $user;
  43. /**
  44. * Get id
  45. *
  46. * @return int
  47. */
  48. public function getId()
  49. {
  50. return $this->id;
  51. }
  52. /**
  53. * Set contenu
  54. *
  55. * @param string $contenu
  56. *
  57. * @return Commentaire
  58. */
  59. public function setContenu($contenu)
  60. {
  61. $this->contenu = $contenu;
  62. return $this;
  63. }
  64. /**
  65. * Get contenu
  66. *
  67. * @return string
  68. */
  69. public function getContenu()
  70. {
  71. return $this->contenu;
  72. }
  73. /**
  74. * @return int
  75. */
  76. public function getNote()
  77. {
  78. return $this->note;
  79. }
  80. /**
  81. * @param int $note
  82. */
  83. public function setNote($note)
  84. {
  85. $this->note = $note;
  86. }
  87. /**
  88. * Set film
  89. *
  90. * @param \App\Entity\Film $film
  91. *
  92. * @return Commentaire
  93. */
  94. public function setFilm(\App\Entity\Film $film)
  95. {
  96. $this->film = $film;
  97. return $this;
  98. }
  99. /**
  100. * Get film
  101. *
  102. * @return \App\Entity\Film
  103. */
  104. public function getFilm()
  105. {
  106. return $this->film;
  107. }
  108. /**
  109. * Set user
  110. *
  111. * @param \App\Entity\User $user
  112. *
  113. * @return Commentaire
  114. */
  115. public function setUser(\App\Entity\User $user)
  116. {
  117. $this->user = $user;
  118. return $this;
  119. }
  120. /**
  121. * Get user
  122. *
  123. * @return \App\Entity\User
  124. */
  125. public function getUser()
  126. {
  127. return $this->user;
  128. }
  129. }