src/Entity/Lookup.php line 55

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use ApiPlatform\Core\Annotation\ApiProperty;
  5. use ApiPlatform\Core\Annotation\ApiResource;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9. * @ORM\Entity
  10. * @ApiResource(
  11. * iri="http://schema.org/Thing",
  12. * collectionOperations={
  13. * "get"={
  14. * "method"="GET",
  15. * "normalization_context"={
  16. * "groups"={"output"}
  17. * },
  18. * "denormalization_context"={
  19. * "groups"={"input"}
  20. * }
  21. * }
  22. * },
  23. * itemOperations={
  24. * "get"={
  25. * "method"="GET",
  26. * "normalization_context"={
  27. * "groups"={"output"}
  28. * },
  29. * "denormalization_context"={
  30. * "groups"={"input"}
  31. * }
  32. * }
  33. * },
  34. * attributes={
  35. * "filters"={
  36. * "lookup.search_filter"
  37. * },
  38. * "normalization_context"={
  39. * "groups"={""}
  40. * },
  41. * "denormalization_context"={
  42. * "groups"={""}
  43. * }
  44. * }
  45. * )
  46. *
  47. * The most generic type of item.
  48. *
  49. * @see http://schema.org/Thing Documentation on Schema.org
  50. */
  51. class Lookup
  52. {
  53. /**
  54. * @ORM\Id
  55. * @ORM\GeneratedValue(strategy="AUTO")
  56. * @ORM\Column(type="integer")
  57. * @Groups({"output"})
  58. *
  59. * @var int|null
  60. */
  61. protected $id;
  62. /**
  63. * @ORM\Column(type="string", length=180, nullable=false)
  64. * @Groups({"output"})
  65. *
  66. * @var string|null
  67. */
  68. protected $type;
  69. /**
  70. * @ORM\Column(type="string", length=180, nullable=false)
  71. * @ApiProperty(iri="http://schema.org/description")
  72. * @Groups({"output"})
  73. *
  74. * @var string|null a description of the item
  75. */
  76. protected $description;
  77. /**
  78. * @ORM\Column(type="string", length=180, nullable=false)
  79. * @ApiProperty(iri="http://schema.org/description")
  80. * @Groups({"output"})
  81. *
  82. * @var string|null a description of the item
  83. */
  84. protected $descriptionES;
  85. /**
  86. * @ORM\Column(type="integer", nullable=true)
  87. * @Groups({"output"})
  88. *
  89. * @var int|null
  90. */
  91. protected $code;
  92. /**
  93. * @ORM\Column(type="integer", nullable=true)
  94. * @Groups({"output"})
  95. *
  96. * @var int|null
  97. */
  98. protected $listOrder;
  99. /**
  100. * @ORM\Column(type="boolean", options={"default" = false})
  101. * @Groups({"output"})
  102. *
  103. * @var bool|null
  104. */
  105. protected $disabled;
  106. public function getId(): ?int
  107. {
  108. return $this->id;
  109. }
  110. public function setType(?string $type): self
  111. {
  112. $this->type = $type;
  113. return $this;
  114. }
  115. public function getType(): ?string
  116. {
  117. return $this->type;
  118. }
  119. public function setDescription(?string $description): self
  120. {
  121. $this->description = $description;
  122. return $this;
  123. }
  124. public function getDescription(): ?string
  125. {
  126. return $this->description;
  127. }
  128. public function setDescriptionES(?string $descriptionES): self
  129. {
  130. $this->descriptionES = $descriptionES;
  131. return $this;
  132. }
  133. public function getDescriptionES(): ?string
  134. {
  135. return $this->descriptionES;
  136. }
  137. public function setCode(?int $code): self
  138. {
  139. $this->code = $code;
  140. return $this;
  141. }
  142. public function getCode(): ?int
  143. {
  144. return $this->code;
  145. }
  146. public function setListOrder(?int $listOrder): self
  147. {
  148. $this->listOrder = $listOrder;
  149. return $this;
  150. }
  151. public function getListOrder(): ?int
  152. {
  153. return $this->listOrder;
  154. }
  155. public function setDisabled(?bool $disabled): self
  156. {
  157. $this->disabled = $disabled;
  158. return $this;
  159. }
  160. public function getDisabled(): ?bool
  161. {
  162. return $this->disabled;
  163. }
  164. }