| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
- declare(strict_types=1);
- namespace App\Entity\Booking;
- use App\Entity\Access\Access;
- use App\Entity\Product\Equipment;
- use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Classe ... qui ...
- */
- #[Auditable]
- #[ORM\Entity]
- class ExamenConvocation
- {
- #[ORM\Id]
- #[ORM\Column]
- #[ORM\GeneratedValue]
- private ?int $id = null;
- #[ORM\ManyToOne(inversedBy: 'convocation')]
- private Examen $examen;
- #[ORM\ManyToOne(inversedBy: 'examenConvocations')]
- #[ORM\JoinColumn(nullable: false)]
- private Access $student;
- #[ORM\ManyToMany(targetEntity: Equipment::class)]
- #[ORM\JoinColumn(name: 'examenconvocation_id', referencedColumnName: 'id')]
- #[ORM\InverseJoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
- private Collection $equipments;
- public function __construct()
- {
- $this->equipments = new ArrayCollection();
- }
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getExamen(): ?Examen
- {
- return $this->examen;
- }
- public function setExamen(?Examen $examen): self
- {
- $this->examen = $examen;
- return $this;
- }
- public function getStudent(): ?Access
- {
- return $this->student;
- }
- public function setStudent(?Access $student): self
- {
- $this->student = $student;
- return $this;
- }
- /**
- * @return Collection<int, Equipment>
- */
- public function getEquipments(): Collection
- {
- return $this->equipments;
- }
- public function addEquipment(Equipment $equipment): self
- {
- if (!$this->equipments->contains($equipment)) {
- $this->equipments[] = $equipment;
- }
- return $this;
- }
- public function removeEquipment(Equipment $equipment): self
- {
- $this->equipments->removeElement($equipment);
- return $this;
- }
- }
|