src/Entity/System/Question.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity(repositoryClass="App\Repository\System\QuestionRepository")
  6. *
  7. * @ORM\Table(name="questions",
  8. * uniqueConstraints={
  9. *
  10. * @ORM\UniqueConstraint(name="uk_question_language", columns={"id_lang", "id_questions"})
  11. * })
  12. */
  13. class Question
  14. {
  15. public const BIGBUY_SOLUTIONS_INTERESTED_ID = 7;
  16. public const SHOPPING_ONLINE = 5;
  17. public const PREFERENCES_CONTACT = 8;
  18. /**
  19. * @ORM\Id
  20. *
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. *
  23. * @ORM\Column(type="integer", name="id")
  24. */
  25. private int $id;
  26. /** @var int
  27. *
  28. * @ORM\Column(type="integer", name="id_questions", nullable=false)
  29. */
  30. private int $questionId;
  31. /**
  32. * @ORM\ManyToOne(targetEntity="App\Entity\System\Language", inversedBy="questions")
  33. *
  34. * @ORM\JoinColumn(referencedColumnName="id_lang", name="id_lang", nullable=false)
  35. */
  36. private Language $language;
  37. /**
  38. * @ORM\Column(type="string", length=200, nullable=false)
  39. */
  40. private string $name;
  41. /** *
  42. * @ORM\Column(name="activo", type="boolean", nullable=false)
  43. */
  44. private bool $active = true;
  45. public function getId(): int
  46. {
  47. return $this->id;
  48. }
  49. public function setId(int $id): self
  50. {
  51. $this->id = $id;
  52. return $this;
  53. }
  54. public function getQuestionId(): int
  55. {
  56. return $this->questionId;
  57. }
  58. public function setQuestionId(int $questionId): Question
  59. {
  60. $this->questionId = $questionId;
  61. return $this;
  62. }
  63. public function getLanguage(): Language
  64. {
  65. return $this->language;
  66. }
  67. public function setLanguage(Language $language): self
  68. {
  69. $this->language = $language;
  70. return $this;
  71. }
  72. public function getName(): string
  73. {
  74. return $this->name;
  75. }
  76. public function setName(string $name): self
  77. {
  78. $this->name = $name;
  79. return $this;
  80. }
  81. public function getActive(): bool
  82. {
  83. return $this->active;
  84. }
  85. public function setActive(bool $active): self
  86. {
  87. $this->active = $active;
  88. return $this;
  89. }
  90. }