src/Entity/Certificate.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\CertificateRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\UX\Turbo\Attribute\Broadcast;
  7. #[ORM\Entity(repositoryClassCertificateRepository::class)]
  8. #[ApiResource]
  9. #[Broadcast]
  10. class Certificate
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $name null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $path null;
  20.     #[ORM\ManyToOne(inversedBy'certificates')]
  21.     private ?Attendee $attendee null;
  22.     #[ORM\ManyToOne(inversedBy'certificates')]
  23.     private ?Course $course null;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getName(): ?string
  29.     {
  30.         return $this->name;
  31.     }
  32.     public function setName(string $name): self
  33.     {
  34.         $this->name $name;
  35.         return $this;
  36.     }
  37.     public function getPath(): ?string
  38.     {
  39.         return $this->path;
  40.     }
  41.     public function setPath(?string $path): self
  42.     {
  43.         $this->path $path;
  44.         return $this;
  45.     }
  46.     public function getAttendee(): ?Attendee
  47.     {
  48.         return $this->attendee;
  49.     }
  50.     public function setAttendee(?Attendee $attendee): self
  51.     {
  52.         $this->attendee $attendee;
  53.         return $this;
  54.     }
  55.     public function getCourse(): ?Course
  56.     {
  57.         return $this->course;
  58.     }
  59.     public function setCourse(?Course $course): self
  60.     {
  61.         $this->course $course;
  62.         return $this;
  63.     }
  64. }