src/Entity/Idea.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Generic\User;
  4. use App\Repository\IdeaRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  8. #[ORM\Entity(repositoryClassIdeaRepository::class)]
  9. class Idea extends BaseEntity
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\Column(type'guid'uniquetrue)]
  13.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  14.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  15.     private ?string $id null;
  16.     #[ORM\ManyToOne(inversedBy'ideas')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?User $author null;
  19.     #[ORM\Column(typeTypes::TEXT)]
  20.     private ?string $text null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $dateToAd null;
  23.     public function getId(): ?string
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getAuthor(): ?User
  28.     {
  29.         return $this->author;
  30.     }
  31.     public function setAuthor(?User $author): static
  32.     {
  33.         $this->author $author;
  34.         return $this;
  35.     }
  36.     public function getText(): ?string
  37.     {
  38.         return $this->text;
  39.     }
  40.     public function setText(string $text): static
  41.     {
  42.         $this->text $text;
  43.         return $this;
  44.     }
  45.     public function getDateToAd(): ?string
  46.     {
  47.         return $this->dateToAd;
  48.     }
  49.     public function setDateToAd(?string $dateToAd): static
  50.     {
  51.         $this->dateToAd $dateToAd;
  52.         return $this;
  53.     }
  54. }