src/Entity/Parameter.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParameterRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table]
  6. #[ORM\Index(name: 'name', columns: ['name'])]
  7. #[ORM\Entity(repositoryClass: ParameterRepository::class)]
  8. class Parameter
  9. {
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue]
  12. #[ORM\Column(type: 'integer')]
  13. private $id;
  14. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  15. private $name;
  16. #[ORM\Column(type: 'string', length: 255, nullable: false, options: ['default' => 'boolean'])]
  17. private $type;
  18. #[ORM\Column(type: 'string', options: ['default' => '0'])]
  19. private $value;
  20. /**
  21. * @ORM\Column(type="integer", length=11, nullable=true, options={"default": null})
  22. */
  23. #[ORM\JoinColumn(nullable: false)]
  24. #[ORM\ManyToOne(targetEntity: ParameterCategory::class, inversedBy: 'parameters')]
  25. private $parameterCategory;
  26. public function getId(): ?int
  27. {
  28. return $this->id;
  29. }
  30. public function getName(): ?string
  31. {
  32. return $this->name;
  33. }
  34. public function setName(?string $name): self
  35. {
  36. $this->name = $name;
  37. return $this;
  38. }
  39. public function getType(): ?string
  40. {
  41. return $this->type;
  42. }
  43. public function setType(?string $type): self
  44. {
  45. $this->type = $type;
  46. return $this;
  47. }
  48. public function getValue(): ?string
  49. {
  50. return $this->value;
  51. }
  52. public function setValue(?string $value): self
  53. {
  54. if (null === $value) {
  55. $value = '';
  56. }
  57. $this->value = $value;
  58. return $this;
  59. }
  60. public function getParameterCategory(): ?ParameterCategory
  61. {
  62. return $this->parameterCategory;
  63. }
  64. public function setParameterCategory(?ParameterCategory $parameterCategory): self
  65. {
  66. $this->parameterCategory = $parameterCategory;
  67. return $this;
  68. }
  69. }