NotificationRelUser.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. namespace Chamilo\PluginBundle\Entity\CourseHomeNotify;
  4. use Chamilo\UserBundle\Entity\User;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * Class NotificationRelUser.
  8. *
  9. * @package Chamilo\PluginBundle\Entity\CourseHomeNotify
  10. *
  11. * @ORM\Table(name="course_home_notify_notification_rel_user")
  12. * @ORM\Entity()
  13. */
  14. class NotificationRelUser
  15. {
  16. /**
  17. * @var int
  18. *
  19. * @ORM\Column(name="id", type="integer")
  20. * @ORM\Id()
  21. * @ORM\GeneratedValue()
  22. */
  23. private $id = 0;
  24. /**
  25. * @var Notification
  26. *
  27. * @ORM\ManyToOne(targetEntity="Chamilo\PluginBundle\Entity\CourseHomeNotify\Notification")
  28. * @ORM\JoinColumn(name="notification_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  29. */
  30. private $notification;
  31. /**
  32. * @var User
  33. *
  34. * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
  35. * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  36. */
  37. private $user;
  38. /**
  39. * @return int
  40. */
  41. public function getId()
  42. {
  43. return $this->id;
  44. }
  45. /**
  46. * @param int $id
  47. *
  48. * @return NotificationRelUser
  49. */
  50. public function setId($id)
  51. {
  52. $this->id = $id;
  53. return $this;
  54. }
  55. /**
  56. * @return Notification
  57. */
  58. public function getNotification()
  59. {
  60. return $this->notification;
  61. }
  62. /**
  63. * @param Notification $notification
  64. *
  65. * @return NotificationRelUser
  66. */
  67. public function setNotification(Notification $notification)
  68. {
  69. $this->notification = $notification;
  70. return $this;
  71. }
  72. /**
  73. * @return User
  74. */
  75. public function getUser()
  76. {
  77. return $this->user;
  78. }
  79. /**
  80. * @param User $user
  81. *
  82. * @return NotificationRelUser
  83. */
  84. public function setUser($user)
  85. {
  86. $this->user = $user;
  87. return $this;
  88. }
  89. }