src/Entity/Certificat.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\CertificatRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCertificatRepository::class)]
  8. #[ApiResource]
  9. class Certificat
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $titre null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $lien null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $pdf null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $image null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $dateobtention null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $datevalidite null;
  27.     #[ORM\ManyToOne(inversedBy'certificat')]
  28.     #[ORM\JoinColumn(referencedColumnName:"id",onDelete"CASCADE"name"user_id")]
  29.     private ?User $user null;
  30.     #[ORM\Column(length255nullabletrue)]
  31.     private ?string $slug null;
  32.     public function __toString(): string
  33.     {
  34.         return $this->getTitre();
  35.     }
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getTitre(): ?string
  41.     {
  42.         return $this->titre;
  43.     }
  44.     public function setTitre(?string $titre): self
  45.     {
  46.         $this->titre $titre;
  47.         return $this;
  48.     }
  49.     public function getLien(): ?string
  50.     {
  51.         return $this->lien;
  52.     }
  53.     public function setLien(?string $lien): self
  54.     {
  55.         $this->lien $lien;
  56.         return $this;
  57.     }
  58.     public function getPdf(): ?string
  59.     {
  60.         return $this->pdf;
  61.     }
  62.     public function setPdf(?string $pdf): self
  63.     {
  64.         $this->pdf $pdf;
  65.         return $this;
  66.     }
  67.     public function getImage(): ?string
  68.     {
  69.         return $this->image;
  70.     }
  71.     public function setImage(?string $image): self
  72.     {
  73.         $this->image $image;
  74.         return $this;
  75.     }
  76.     public function getDateobtention(): ?\DateTimeInterface
  77.     {
  78.         return $this->dateobtention;
  79.     }
  80.     public function setDateobtention(?\DateTimeInterface $dateobtention): self
  81.     {
  82.         $this->dateobtention $dateobtention;
  83.         return $this;
  84.     }
  85.     public function getDatevalidite(): ?\DateTimeInterface
  86.     {
  87.         return $this->datevalidite;
  88.     }
  89.     public function setDatevalidite(?\DateTimeInterface $datevalidite): self
  90.     {
  91.         $this->datevalidite $datevalidite;
  92.         return $this;
  93.     }
  94.     public function getUser(): ?User
  95.     {
  96.         return $this->user;
  97.     }
  98.     public function setUser(?User $user): self
  99.     {
  100.         $this->user $user;
  101.         return $this;
  102.     }
  103.     public function getSlug(): ?string
  104.     {
  105.         return $this->slug;
  106.     }
  107.     public function setSlug(?string $slug): self
  108.     {
  109.         $this->slug $slug;
  110.         return $this;
  111.     }
  112. }