<?php namespace App\Entity; use App\Repository\ServiceProFieldRepository; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ServiceProFieldRepository::class) */ class ServiceProField { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=ServicePro::class, inversedBy="serviceProFields") * @ORM\JoinColumn(nullable=false) */ private $servicePro; /** * @ORM\Column(type="string", length=255) */ private $label; /** * @ORM\Column(type="string", length=16) */ private $fieldType; /** * @ORM\Column(type="integer") */ private $position; /** * @ORM\Column(type="boolean") */ private $required; public function __construct() { $this->position = 1; } public function getId(): ?int { return $this->id; } public function getServicePro(): ?ServicePro { return $this->servicePro; } public function setServicePro( ?ServicePro $servicePro ): self { $this->servicePro = $servicePro; return $this; } public function getLabel(): ?string { return $this->label; } public function setLabel( string $label ): self { $this->label = $label; return $this; } public function getFieldType(): ?string { return $this->fieldType; } public function setFieldType( string $fieldType ): self { $this->fieldType = $fieldType; return $this; } public function getPosition(): ?int { return $this->position; } public function setPosition( int $position ): self { $this->position = $position; return $this; } public function isRequired(): ?bool { return $this->required; } public function setRequired( bool $required ): self { $this->required = $required; return $this; } }