src/Entity/Contact.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassContactRepository::class)]
  7. class Contact
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255nullabletrue)]
  14.     private ?string $object null;
  15.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  16.     private ?string $content null;
  17.     #[ORM\Column]
  18.     private ?\DateTimeImmutable $createAt null;
  19.     #[ORM\ManyToOne(inversedBy'contacts')]
  20.     #[ORM\JoinColumn(nullablefalse)]
  21.     private ?User $user null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getObject(): ?string
  27.     {
  28.         return $this->object;
  29.     }
  30.     public function setObject(?string $object): static
  31.     {
  32.         $this->object $object;
  33.         return $this;
  34.     }
  35.     public function getContent(): ?string
  36.     {
  37.         return $this->content;
  38.     }
  39.     public function setContent(?string $content): static
  40.     {
  41.         $this->content $content;
  42.         return $this;
  43.     }
  44.     public function getCreateAt(): ?\DateTimeImmutable
  45.     {
  46.         return $this->createAt;
  47.     }
  48.     public function setCreateAt(\DateTimeImmutable $createAt): static
  49.     {
  50.         $this->createAt $createAt;
  51.         return $this;
  52.     }
  53.     public function getUser(): ?User
  54.     {
  55.         return $this->user;
  56.     }
  57.     public function setUser(?User $user): static
  58.     {
  59.         $this->user $user;
  60.         return $this;
  61.     }
  62. }