src/Entity/Galeries.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\GaleriesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassGaleriesRepository::class)]
  6. #[ORM\Table(name"galeries")]
  7. class Galeries
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     // Relation avec table Ville (si elle existe)
  14.     #[ORM\Column]
  15.     private ?string $nom null;
  16.     #[ORM\Column(name"img_gal")]
  17.     private ?string $imgal null;
  18.     #[ORM\Column(type"datetime"nullabletrueoptions: ['default' => 'CURRENT_TIMESTAMP'])]
  19.     private ?\DateTimeInterface $created_at null;
  20.     public function __construct(){$this->created_at = new \DateTime();}
  21.     public function getId(): ?int { return $this->id;}
  22.     public function getNom(): String{ return $this->nom;}
  23.     public function setNom(String $nom): self{$this->nom $nom;return $this;}
  24.     public function getImage(): string{return $this->imgal;}
  25.     public function setImage(string $imgal): static{$this->imgal $imgal;return $this;}
  26.     public function getCreatedAt(): ?\DateTimeInterface{ return $this->created_at;}
  27.     public function setCreatedAt(?\DateTimeInterface $created_at): self$this->created_at $created_at;return $this;}
  28. }