src/Entity/CompanyFormAnswer.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\CompanyFormAnswerRepository")
  7.  */
  8. class CompanyFormAnswer
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @var string
  18.      *
  19.      * @ORM\Column(type="string", length=255)
  20.      * @Assert\Length(max="255")
  21.      * @Assert\NotBlank()
  22.      */
  23.     private $value;
  24.     /**
  25.      * @var int
  26.      *
  27.      * @ORM\Column(type="integer")
  28.      * @Assert\NotBlank()
  29.      * @Assert\Type(type="integer")
  30.      */
  31.     private $position;
  32.     /**
  33.      * @var bool
  34.      *
  35.      * @ORM\Column(type="boolean")
  36.      * @Assert\Type(type="boolean")
  37.      */
  38.     private $other;
  39.     /**
  40.      * @var CompanyFormQuestion
  41.      *
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\CompanyFormQuestion", inversedBy="formAnswers")
  43.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  44.      * @Assert\NotNull()
  45.      */
  46.     private $formQuestion;
  47.     /**
  48.      * CompanyFormAnswer constructor.
  49.      */
  50.     public function __construct()
  51.     {
  52.         $this->other false;
  53.     }
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getValue(): ?string
  59.     {
  60.         return $this->value;
  61.     }
  62.     public function setValue(string $value): self
  63.     {
  64.         $this->value $value;
  65.         return $this;
  66.     }
  67.     public function getPosition(): ?int
  68.     {
  69.         return $this->position;
  70.     }
  71.     public function setPosition(int $position): self
  72.     {
  73.         $this->position $position;
  74.         return $this;
  75.     }
  76.     public function getFormQuestion(): ?CompanyFormQuestion
  77.     {
  78.         return $this->formQuestion;
  79.     }
  80.     public function setFormQuestion(?CompanyFormQuestion $formQuestion): self
  81.     {
  82.         $this->formQuestion $formQuestion;
  83.         return $this;
  84.     }
  85.     public function getOther(): ?bool
  86.     {
  87.         return $this->other;
  88.     }
  89.     public function setOther(bool $other): self
  90.     {
  91.         $this->other $other;
  92.         return $this;
  93.     }
  94. }