src/Entity/DoctorCategory.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DoctorCategoryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. #[ORM\Entity(repositoryClassDoctorCategoryRepository::class), ORM\Table(name'doctor_categories')]
  7. class DoctorCategory implements \Stringable
  8. {
  9.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  10.     private $id;
  11.     #[ORM\Column(type'string'length255)]
  12.     private $name;
  13.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  14.     private $createdAt;
  15.     public function getId(): ?int
  16.     {
  17.         return $this->id;
  18.     }
  19.     public function getName(): ?string
  20.     {
  21.         return $this->name;
  22.     }
  23.     public function setName(string $name): self
  24.     {
  25.         $this->name $name;
  26.         return $this;
  27.     }
  28.     public function getCreatedAt(): ?\DateTimeInterface
  29.     {
  30.         return $this->createdAt;
  31.     }
  32.     public function __toString(): string
  33.     {
  34.         return $this->getName();
  35.     }
  36. }