src/Entity/Faq.php line 14

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Faq
  7.  *
  8.  * @ORM\Table("faq")
  9.  * @ORM\Entity
  10.  */
  11. class Faq
  12. {
  13.     /**
  14.      * @var integer
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(name="question", type="string", length=255)
  25.      */
  26.     private $question;
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="answer", type="text")
  31.      */
  32.     private $answer;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(name="idioma", type="string", length=255, nullable=true)
  37.      */
  38.     private $idioma="es";
  39.     /**
  40.      * @var boolean
  41.      *
  42.      * @ORM\Column(name="popular", type="boolean")
  43.      */
  44.     private $popular;
  45.     
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity="FaqCategory", inversedBy="faqs", cascade={"persist"})
  48.      * @ORM\JoinColumn(name="faqcategory_id", referencedColumnName="id"))
  49.      */
  50.     private $category;
  51.     /**
  52.      * Get id
  53.      *
  54.      * @return integer 
  55.      */
  56.     public function getId()
  57.     {
  58.         return $this->id;
  59.     }
  60.     /**
  61.      * Set question
  62.      *
  63.      * @param string $question
  64.      * @return Faq
  65.      */
  66.     public function setQuestion($question)
  67.     {
  68.         $this->question $question;
  69.         return $this;
  70.     }
  71.     /**
  72.      * Get question
  73.      *
  74.      * @return string 
  75.      */
  76.     public function getQuestion()
  77.     {
  78.         return $this->question;
  79.     }
  80.     /**
  81.      * @param mixed $Idioma(
  82.      */
  83.     public function setIdioma($idioma)
  84.     {
  85.         $this->idioma $idioma;
  86.     }
  87.     /**
  88.      * Get Idioma
  89.      *
  90.      * @return string 
  91.      */
  92.     public function getIdioma()
  93.     {
  94.         return $this->idioma;
  95.     }
  96.     /**
  97.      * @param string $Categoria
  98.      */
  99.     public function setCategoria($categoria)
  100.     {
  101.         $this->categoria $categoria;
  102.     }
  103.     /**
  104.      * Get Categoria
  105.      *
  106.      * @return string 
  107.      */
  108.     public function getCategoria()
  109.     {
  110.         return $this->categoria;
  111.     }
  112.     /**
  113.      * Set popular
  114.      * @param boolean $popular
  115.      */
  116.     public function setPopular($popular)
  117.     {
  118.         $this->popular $popular;
  119.     }
  120.     /**
  121.      * Get popular
  122.      *
  123.      * @return boolean 
  124.      */
  125.     public function getPopular()
  126.     {
  127.         return $this->popular;
  128.     }
  129.     /**
  130.      * Set answer
  131.      *
  132.      * @param string $answer
  133.      * @return Faq
  134.      */
  135.     public function setAnswer($answer)
  136.     {
  137.         $this->answer $answer;
  138.         return $this;
  139.     }
  140.     /**
  141.      * Get answer
  142.      *
  143.      * @return string 
  144.      */
  145.     public function getAnswer()
  146.     {
  147.         return $this->answer;
  148.     }
  149.     public function isPopular(): ?bool
  150.     {
  151.         return $this->popular;
  152.     }
  153.     public function getCategory(): ?FaqCategory
  154.     {
  155.         return $this->category;
  156.     }
  157.     public function setCategory(?FaqCategory $category): self
  158.     {
  159.         $this->category $category;
  160.         return $this;
  161.     }
  162. }