<?php
namespace App\Entity;
use App\Entity\Generic\User;
use App\Repository\IdeaRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: IdeaRepository::class)]
class Idea extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?string $id = null;
#[ORM\ManyToOne(inversedBy: 'ideas')]
#[ORM\JoinColumn(nullable: false)]
private ?User $author = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $text = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $dateToAd = null;
public function getId(): ?string
{
return $this->id;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): static
{
$this->author = $author;
return $this;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(string $text): static
{
$this->text = $text;
return $this;
}
public function getDateToAd(): ?string
{
return $this->dateToAd;
}
public function setDateToAd(?string $dateToAd): static
{
$this->dateToAd = $dateToAd;
return $this;
}
}