src/Entity/FileTypeAnswer.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiProperty;
  4. use App\Repository\FileTypeAnswerRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @ORM\Entity(repositoryClass=FileTypeAnswerRepository::class)
  10.  */
  11. class FileTypeAnswer
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      * @Groups({"pinpointCampaign:list"})
  18.      */
  19.     private int $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=128, nullable=true)
  22.      * @Assert\Length(max=128)
  23.      * @Groups({"pinpointCampaign:list"})
  24.      */
  25.     public string $typeErrorMessage;
  26.     /**
  27.      * @var SurveyFormQuestion
  28.      *
  29.      * @ORM\OneToOne(targetEntity=SurveyFormQuestion::class, inversedBy="fileTypeAnswer", cascade={"persist", "remove"})
  30.      */
  31.     private $formQuestion;
  32.     /**
  33.      * @ORM\Column(type="simple_array")
  34.      * @ApiProperty(
  35.      *     attributes={
  36.      *         "jsonld_context"={
  37.      *             "@type"="http://www.w3.org/2001/XMLSchema#array",
  38.      *         }
  39.      *     }
  40.      * )
  41.      * @Groups({"pinpointCampaign:list"})
  42.      */
  43.     private $allowedFiles = [];
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getTypeErrorMessage(): ?string
  49.     {
  50.         return $this->typeErrorMessage;
  51.     }
  52.     public function setTypeErrorMessage(?string $typeErrorMessage): self
  53.     {
  54.         $this->typeErrorMessage $typeErrorMessage;
  55.         return $this;
  56.     }
  57.     public function getFormQuestion(): ?SurveyFormQuestion
  58.     {
  59.         return $this->formQuestion;
  60.     }
  61.     public function setFormQuestion(?SurveyFormQuestion $formQuestion): self
  62.     {
  63.         $this->formQuestion $formQuestion;
  64.         return $this;
  65.     }
  66.     public function getAllowedFiles(): ?array
  67.     {
  68.         return $this->allowedFiles;
  69.     }
  70.     public function setAllowedFiles(array $allowedFiles): self
  71.     {
  72.         $this->allowedFiles $allowedFiles;
  73.         return $this;
  74.     }
  75. }