<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use App\Repository\FileTypeAnswerRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=FileTypeAnswerRepository::class)
*/
class FileTypeAnswer
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"pinpointCampaign:list"})
*/
private int $id;
/**
* @ORM\Column(type="string", length=128, nullable=true)
* @Assert\Length(max=128)
* @Groups({"pinpointCampaign:list"})
*/
public string $typeErrorMessage;
/**
* @var SurveyFormQuestion
*
* @ORM\OneToOne(targetEntity=SurveyFormQuestion::class, inversedBy="fileTypeAnswer", cascade={"persist", "remove"})
*/
private $formQuestion;
/**
* @ORM\Column(type="simple_array")
* @ApiProperty(
* attributes={
* "jsonld_context"={
* "@type"="http://www.w3.org/2001/XMLSchema#array",
* }
* }
* )
* @Groups({"pinpointCampaign:list"})
*/
private $allowedFiles = [];
public function getId(): ?int
{
return $this->id;
}
public function getTypeErrorMessage(): ?string
{
return $this->typeErrorMessage;
}
public function setTypeErrorMessage(?string $typeErrorMessage): self
{
$this->typeErrorMessage = $typeErrorMessage;
return $this;
}
public function getFormQuestion(): ?SurveyFormQuestion
{
return $this->formQuestion;
}
public function setFormQuestion(?SurveyFormQuestion $formQuestion): self
{
$this->formQuestion = $formQuestion;
return $this;
}
public function getAllowedFiles(): ?array
{
return $this->allowedFiles;
}
public function setAllowedFiles(array $allowedFiles): self
{
$this->allowedFiles = $allowedFiles;
return $this;
}
}