src/Entity/Phone.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PhoneRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=PhoneRepository::class)
  7.  * @ORM\Table(name="app_phone")
  8.  */
  9. class Phone
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private ?int $id;
  17.     /**
  18.      * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": "CURRENT_TIMESTAMP"})
  19.      */
  20.     private $createAt;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private ?string $phone;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function __toString(): string
  30.     {
  31.         return $this->getPhone();
  32.     }
  33.     public function getCreateAt(): ?\DateTimeImmutable
  34.     {
  35.         return $this->createAt;
  36.     }
  37.     public function setCreateAt(\DateTimeInterface $createAt): self
  38.     {
  39.         $this->createAt $createAt;
  40.         return $this;
  41.     }
  42.     public function getPhone(): ?string
  43.     {
  44.         return $this->phone;
  45.     }
  46.     public function setPhone(?string $phone): self
  47.     {
  48.         $this->phone $phone;
  49.         return $this;
  50.     }
  51. }