src/Entity/TeacherAvailabilityTime.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TeacherAvailabilityTimeRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7. * @ORM\Entity(repositoryClass=TeacherAvailabilityTimeRepository::class)
  8. */
  9. class TeacherAvailabilityTime
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. * @Groups({"TeacherAvailabilityEdit"})
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=Teacher::class, inversedBy="teacherAvailabilityTimes")
  20. */
  21. private $teacher;
  22. /**
  23. * @ORM\Column(type="time", nullable=true)
  24. * @Groups({"TeacherAvailabilityEdit"})
  25. */
  26. private $startTime;
  27. /**
  28. * @ORM\Column(type="time", nullable=true)
  29. * @Groups({"TeacherAvailabilityEdit"})
  30. */
  31. private $endTime;
  32. /**
  33. * @ORM\Column(type="integer", nullable=true)
  34. * @Groups({"TeacherAvailabilityEdit"})
  35. */
  36. private $weekday;
  37. /**
  38. * @ORM\Column(type="boolean", nullable=true)
  39. */
  40. private $isExtra;
  41. public function getId(): ?int
  42. {
  43. return $this->id;
  44. }
  45. public function getTeacher(): ?Teacher
  46. {
  47. return $this->teacher;
  48. }
  49. public function setTeacher(?Teacher $teacher): self
  50. {
  51. $this->teacher = $teacher;
  52. return $this;
  53. }
  54. public function getStartTime(): ?\DateTimeInterface
  55. {
  56. return $this->startTime;
  57. }
  58. public function setStartTime(?\DateTimeInterface $startTime): self
  59. {
  60. $this->startTime = $startTime;
  61. return $this;
  62. }
  63. public function getEndTime(): ?\DateTimeInterface
  64. {
  65. return $this->endTime;
  66. }
  67. public function setEndTime(?\DateTimeInterface $endTime): self
  68. {
  69. $this->endTime = $endTime;
  70. return $this;
  71. }
  72. public function getWeekday(): ?int
  73. {
  74. return $this->weekday;
  75. }
  76. public function setWeekday(?int $weekday): self
  77. {
  78. $this->weekday = $weekday;
  79. return $this;
  80. }
  81. public function getIsExtra(): ?bool
  82. {
  83. return $this->isExtra;
  84. }
  85. public function setIsExtra(?bool $isExtra): self
  86. {
  87. $this->isExtra = $isExtra;
  88. return $this;
  89. }
  90. }