src/CoreBundle/Entity/KvikCustomization.php line 12

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use JsonSerializable;
  5. /**
  6. * @ORM\Table("kvik_customization")
  7. * @ORM\Entity
  8. */
  9. class KvikCustomization implements JsonSerializable
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private int $id;
  19. /**
  20. * @var string
  21. *
  22. * @ORM\Column(name="type", type="text", length=16)
  23. */
  24. private string $type;
  25. /**
  26. * @var ?string
  27. *
  28. * @ORM\Column(name="sub_type", type="text", length=16, nullable=true)
  29. */
  30. private ?string $subType;
  31. /**
  32. * @var string
  33. *
  34. * @ORM\Column(name="variant", type="text", length=64)
  35. */
  36. private string $variant;
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="name", type="text", length=64)
  41. */
  42. private string $name;
  43. /**
  44. * @var ?int
  45. *
  46. * @ORM\Column(name="price", type="integer", nullable=true)
  47. */
  48. private ?int $price;
  49. /**
  50. * @var string
  51. *
  52. * @ORM\Column(name="explicitly_allowed_classrooms", type="text", length=64)
  53. */
  54. private string $explicitlyAllowedClassrooms;
  55. public function getExplicitlyAllowedClassrooms(): string
  56. {
  57. return $this->explicitlyAllowedClassrooms;
  58. }
  59. public function setExplicitlyAllowedClassrooms(string $explicitlyAllowedClassrooms): void
  60. {
  61. $this->explicitlyAllowedClassrooms = $explicitlyAllowedClassrooms;
  62. }
  63. public function getId(): int
  64. {
  65. return $this->id;
  66. }
  67. public function setId(int $id): void
  68. {
  69. $this->id = $id;
  70. }
  71. public function getType(): string
  72. {
  73. return $this->type;
  74. }
  75. public function setType(string $type): void
  76. {
  77. $this->type = $type;
  78. }
  79. public function getSubType(): ?string
  80. {
  81. return $this->subType;
  82. }
  83. public function setSubType(?string $subType): void
  84. {
  85. $this->subType = $subType;
  86. }
  87. public function getVariant(): string
  88. {
  89. return $this->variant;
  90. }
  91. public function setVariant(string $variant): void
  92. {
  93. $this->variant = $variant;
  94. }
  95. public function getName(): ?string
  96. {
  97. return $this->name;
  98. }
  99. public function setName(?string $name): void
  100. {
  101. $this->name = $name;
  102. }
  103. public function getPrice(): ?int
  104. {
  105. return $this->price;
  106. }
  107. public function setPrice(?int $price): void
  108. {
  109. $this->price = $price;
  110. }
  111. public function jsonSerialize(): array
  112. {
  113. return [
  114. 'id' => $this->id,
  115. 'type' => $this->type,
  116. 'subType' => $this->subType,
  117. 'variant' => $this->variant,
  118. 'name' => $this->name,
  119. 'price' => $this->price,
  120. 'explicitlyAllowedClassroomsArray' => explode(',', $this->explicitlyAllowedClassrooms)
  121. ];
  122. }
  123. }