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(repositoryClass: GaleriesRepository::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]
  17.     private ?string $img_gal = null;
  18.     #[ORM\Column(type: "datetime", nullable: true, options: ['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->$img_gal;}
  25.     public function setImage(string $img_gal): static{$this->img_gal = $img_gal;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. }