<?php
namespace App\Entity;
use App\Repository\ParameterRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table]
#[ORM\Index(name: 'name', columns: ['name'])]
#[ORM\Entity(repositoryClass: ParameterRepository::class)]
class Parameter
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $name;
#[ORM\Column(type: 'string', length: 255, nullable: false, options: ['default' => 'boolean'])]
private $type;
#[ORM\Column(type: 'string', options: ['default' => '0'])]
private $value;
/**
* @ORM\Column(type="integer", length=11, nullable=true, options={"default": null})
*/
#[ORM\JoinColumn(nullable: false)]
#[ORM\ManyToOne(targetEntity: ParameterCategory::class, inversedBy: 'parameters')]
private $parameterCategory;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(?string $value): self
{
if (null === $value) {
$value = '';
}
$this->value = $value;
return $this;
}
public function getParameterCategory(): ?ParameterCategory
{
return $this->parameterCategory;
}
public function setParameterCategory(?ParameterCategory $parameterCategory): self
{
$this->parameterCategory = $parameterCategory;
return $this;
}
}