<?php
namespace App\Entity;
use App\Repository\FieldParamsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=FieldParamsRepository::class)
* @UniqueEntity(fields={"field","paramKey"}, groups={"Unique_fields"})
*/
class FieldParams
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Field::class, inversedBy="fieldParams")
*/
private $field;
/**
* @ORM\Column(type="string", length=255)
*/
private $paramKey;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $value;
public function getId(): ?int
{
return $this->id;
}
public function getField(): ?Field
{
return $this->field;
}
public function setField(?Field $field): self
{
$this->field = $field;
return $this;
}
/**
* @return mixed
*/
public function getParamKey()
{
return $this->paramKey;
}
/**
* @param mixed $paramKey
*/
public function setParamKey($paramKey): void
{
$this->paramKey = $paramKey;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(?string $value): self
{
$this->value = $value;
return $this;
}
}