src/Entity/News.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassNewsRepository::class)]
  7. class News
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255nullabletrue)]
  14.     private ?string $titre null;
  15.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  16.     private ?\DateTimeInterface $date null;
  17.     #[ORM\Column(length255nullabletrue)]
  18.     private ?string $lien null;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getTitre(): ?string
  24.     {
  25.         return $this->titre;
  26.     }
  27.     public function setTitre(?string $titre): static
  28.     {
  29.         $this->titre $titre;
  30.         return $this;
  31.     }
  32.     public function getDate(): ?\DateTimeInterface
  33.     {
  34.         return $this->date;
  35.     }
  36.     public function setDate(\DateTimeInterface $date): static
  37.     {
  38.         $this->date $date;
  39.         return $this;
  40.     }
  41.     public function getLien(): ?string
  42.     {
  43.         return $this->lien;
  44.     }
  45.     public function setLien(?string $lien): static
  46.     {
  47.         $this->lien $lien;
  48.         return $this;
  49.     }
  50. }