<?phpnamespace App\Entity\Company;use ApiPlatform\Core\Annotation\ApiResource;use App\Repository\Company\ParamRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;/** * @ORM\Table( * uniqueConstraints={@ORM\UniqueConstraint(columns={"code","company_id"})} * ) * @ORM\Entity(repositoryClass=ParamRepository::class) * @UniqueEntity( * fields={"code","company"}, * message="credentials.duplicate.entry.provider-company" * ) */class Param{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="params") * @ORM\JoinColumn(nullable=false) */ private $company; /** * @ORM\Column(type="string", length=50) */ private $name; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $description; /** * @ORM\Column(type="string", length=50) */ private $code; /** * @ORM\Column(type="string", length=50) */ private $value; public function getId(): ?int { return $this->id; } public function getCompany(): ?Company { return $this->company; } public function setCompany(?Company $company): self { $this->company = $company; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getCode(): ?string { return $this->code; } public function setCode(string $code): self { $this->code = $code; return $this; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; }}