src/Entity/UserModuleParticipation.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserModuleParticipationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use JMS\Serializer\Annotation as Serializer;
  7. /**
  8. * @ORM\Entity(repositoryClass=UserModuleParticipationRepository::class)
  9. * @ORM\AssociationOverrides({
  10. * @ORM\AssociationOverride(
  11. * name="createdBy",
  12. * inversedBy="userModuleParticipations",
  13. * joinColumns={@ORM\JoinColumn(name="created_by", referencedColumnName="id", nullable=true, onDelete="CASCADE")}
  14. * )
  15. * })
  16. */
  17. class UserModuleParticipation extends BaseEntity
  18. {
  19. /**
  20. * @ORM\Id
  21. * @ORM\GeneratedValue
  22. * @ORM\Column(type="integer")
  23. */
  24. private $id;
  25. /**
  26. * @ORM\ManyToOne(targetEntity=Module::class, inversedBy="userModuleParticipations")
  27. */
  28. private $module;
  29. /**
  30. * @ORM\Column(type="datetime", nullable=true)
  31. */
  32. private $endAt;
  33. /**
  34. * @ORM\Column(type="datetime")
  35. */
  36. private $startAt;
  37. /**
  38. * @ORM\ManyToOne(targetEntity=Program::class, inversedBy="userModuleParticipations")
  39. */
  40. private $program;
  41. public function getId(): ?int
  42. {
  43. return $this->id;
  44. }
  45. public function getModule(): ?Module
  46. {
  47. return $this->module;
  48. }
  49. public function setModule(?Module $module): self
  50. {
  51. $this->module = $module;
  52. return $this;
  53. }
  54. public function getEndAt(): ?\DateTimeInterface
  55. {
  56. return $this->endAt;
  57. }
  58. public function setEndAt(?\DateTimeInterface $endAt): self
  59. {
  60. $this->endAt = $endAt;
  61. return $this;
  62. }
  63. public function getStartAt(): ?\DateTimeInterface
  64. {
  65. return $this->startAt;
  66. }
  67. public function setStartAt(\DateTimeInterface $startAt): self
  68. {
  69. $this->startAt = $startAt;
  70. return $this;
  71. }
  72. public function getProgram(): ?Program
  73. {
  74. return $this->program;
  75. }
  76. public function setProgram(?Program $program): self
  77. {
  78. $this->program = $program;
  79. return $this;
  80. }
  81. public function getParticipant(): ?User
  82. {
  83. return $this->createdBy;
  84. }
  85. public function setParticipant(?User $createdBy): self
  86. {
  87. $this->createdBy = $createdBy;
  88. return $this;
  89. }
  90. }