<?phpnamespace App\Entity;use ApiPlatform\Core\Annotation\ApiResource;use App\Repository\DiplomeRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: DiplomeRepository::class)]#[ApiResource]class Diplome{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255, nullable: true)] private ?string $titre = null; #[ORM\Column(length: 255, nullable: true)] private ?string $pdf = null; #[ORM\Column(length: 255, nullable: true)] private ?string $image = null; #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] private ?\DateTimeInterface $dateobtention = null; #[ORM\ManyToOne(inversedBy: 'diplome')] #[ORM\JoinColumn(referencedColumnName:"id",onDelete: "CASCADE", name: "user_id")] private ?User $user = null; public function __toString(): string { return $this->getImage(); } public function getId(): ?int { return $this->id; } public function getTitre(): ?string { return $this->titre; } public function setTitre(?string $titre): self { $this->titre = $titre; return $this; } public function getPdf(): ?string { return $this->pdf; } public function setPdf(?string $pdf): self { $this->pdf = $pdf; return $this; } public function getImage(): ?string { return $this->image; } public function setImage(?string $image): self { $this->image = $image; return $this; } public function getDateobtention(): ?\DateTimeInterface { return $this->dateobtention; } public function setDateobtention(?\DateTimeInterface $dateobtention): self { $this->dateobtention = $dateobtention; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; }}