src/Entity/CategoriesHebergements.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Trait\CreatedAtTrait;
  4. use App\Repository\CategoriesHebergementsRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCategoriesHebergementsRepository::class)]
  7. class CategoriesHebergements
  8. {
  9.     use CreatedAtTrait///////////////////
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $name null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $description null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $slug null;
  20.     public function __construct()
  21.     {
  22.         $this->created_at = new \DateTimeImmutable();
  23.         //// $this->createdAt = new \DateTimeImmutable(); /////////////////
  24.     }
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getName(): ?string
  30.     {
  31.         return $this->name;
  32.     }
  33.     public function setName(string $name): static
  34.     {
  35.         $this->name $name;
  36.         return $this;
  37.     }
  38.     public function getDescription(): ?string
  39.     {
  40.         return $this->description;
  41.     }
  42.     public function setDescription(string $description): static
  43.     {
  44.         $this->description $description;
  45.         return $this;
  46.     }
  47.     public function getSlug(): ?string
  48.     {
  49.         return $this->slug;
  50.     }
  51.     public function setSlug(string $slug): static
  52.     {
  53.         $this->slug $slug;
  54.         return $this;
  55.     }
  56. }