Film.php~ 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. namespace AppBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Film
  6. *
  7. * @ORM\Table(name="film")
  8. * @ORM\Entity(repositoryClass="AppBundle\Repository\FilmRepository")
  9. */
  10. class Film
  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="titre", type="string", length=255)
  24. */
  25. private $titre;
  26. /**
  27. * @var \DateTime
  28. *
  29. * @ORM\Column(name="annee", type="date", nullable=true)
  30. */
  31. private $annee;
  32. /**
  33. * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Realisateur", inversedBy="films")
  34. */
  35. private $realisateur;
  36. /**
  37. * Get id
  38. *
  39. * @return int
  40. */
  41. public function getId()
  42. {
  43. return $this->id;
  44. }
  45. /**
  46. * Set titre
  47. *
  48. * @param string $titre
  49. *
  50. * @return Film
  51. */
  52. public function setTitre($titre)
  53. {
  54. $this->titre = $titre;
  55. return $this;
  56. }
  57. /**
  58. * Get titre
  59. *
  60. * @return string
  61. */
  62. public function getTitre()
  63. {
  64. return $this->titre;
  65. }
  66. /**
  67. * Set annee
  68. *
  69. * @param \DateTime $annee
  70. *
  71. * @return Film
  72. */
  73. public function setAnnee($annee)
  74. {
  75. $this->annee = $annee;
  76. return $this;
  77. }
  78. /**
  79. * Get annee
  80. *
  81. * @return \DateTime
  82. */
  83. public function getAnnee()
  84. {
  85. return $this->annee;
  86. }
  87. }