<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use ApiPlatform\Core\Annotation\ApiResource;use App\Repository\FaqRepository;use ApiPlatform\Metadata\ApiFilter;use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;/** * Faq * * @ApiResource() * @ORM\Table() * @ORM\Entity(repositoryClass=FaqRepository::class) */#[ApiFilter(SearchFilter::class, properties: ["type" => "exact"])]class Faq{ /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var text * * @ORM\Column(name="titre", type="text") * * @Assert\NotBlank() */ private $titre; /** * @var text * * @ORM\Column(name="message", type="text") * * @Assert\NotBlank() */ private $message; /** * @var string * * @ORM\Column(type="string", length=75) * * @Assert\NotBlank() */ private $type; public function __toString() { return ($this->getTitre()) ? $this->getTitre() : ''; } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Get titre * * @return text */ public function getTitre() { return $this->titre; } /** * Set titre * * @param text $titre * * @return Faq */ public function setTitre($titre) { $this->titre = $titre; return $this; } /** * Get message * * @return text */ public function getMessage() { return $this->message; } /** * Set message * * @param text $message * * @return Faq */ public function setMessage($message) { $this->message = $message; return $this; } /** * Get type * * @return string */ public function getType() { return $this->type; } /** * Set type * * @param string $type * * @return Faq */ public function setType($type) { $this->type = $type; return $this; }}