src/Entity/Tag.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TagRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassTagRepository::class)]
  7. class Tag
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'tags')]
  14.     private ?User $user null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $contenu null;
  17.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $createdAt null;
  19.     #[ORM\ManyToOne(inversedBy'tags')]
  20.     private ?Publication $publication null;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getUser(): ?User
  26.     {
  27.         return $this->user;
  28.     }
  29.     public function setUser(?User $user): self
  30.     {
  31.         $this->user $user;
  32.         return $this;
  33.     }
  34.     public function getContenu(): ?string
  35.     {
  36.         return $this->contenu;
  37.     }
  38.     public function setContenu(?string $contenu): self
  39.     {
  40.         $this->contenu $contenu;
  41.         return $this;
  42.     }
  43.     public function getCreatedAt(): ?\DateTimeInterface
  44.     {
  45.         return $this->createdAt;
  46.     }
  47.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  48.     {
  49.         $this->createdAt $createdAt;
  50.         return $this;
  51.     }
  52.     public function getPublication(): ?Publication
  53.     {
  54.         return $this->publication;
  55.     }
  56.     public function setPublication(?Publication $publication): self
  57.     {
  58.         $this->publication $publication;
  59.         return $this;
  60.     }
  61. }