src/Entity/PriceGroup.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table(name="price_groups")
  6. * @ORM\Entity
  7. */
  8. class PriceGroup
  9. {
  10. public const CODE_VIVOG = 'VV';
  11. public const CODE_EXPERT = 'EX';
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer", nullable=false)
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="IDENTITY")
  18. */
  19. private $id;
  20. /**
  21. * @var string|null
  22. *
  23. * @ORM\Column(name="code", type="string", length=255, nullable=true)
  24. */
  25. private $code;
  26. /**
  27. * @var string|null
  28. *
  29. * @ORM\Column(name="name", type="string", length=255, nullable=true)
  30. */
  31. private $name;
  32. public function getId(): int {
  33. return $this->id;
  34. }
  35. public function getCode(): ?string {
  36. return $this->code;
  37. }
  38. public function getName(): ?string {
  39. return $this->name;
  40. }
  41. public function setId(int $id): void {
  42. $this->id = $id;
  43. }
  44. public function setCode(?string $code): void {
  45. $this->code = $code;
  46. }
  47. public function setName(?string $name): void {
  48. $this->name = $name;
  49. }
  50. public function toArray(): array {
  51. return [
  52. 'name' => $this->getName(),
  53. 'code' => $this->getCode()
  54. ];
  55. }
  56. }