<?phpnamespace App\Entity\Gos;use App\Repository\Gos\ShippingTypeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ShippingTypeRepository::class) */class ShippingType{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\ManyToMany(targetEntity=ProductVariant::class, mappedBy="shippingTypes") */ private $productVariants; /** * @ORM\ManyToOne(targetEntity=ProductVariant::class) * @ORM\JoinColumn(nullable=true) */ private $shippingProductVariant; /** * @ORM\Column(type="boolean", options={"default":0}) */ private $isDefault = false; /** * @ORM\Column(type="integer", nullable=true) */ private $gosShippingType; /** * @ORM\Column(type="boolean", options={"default":0}) */ private $isPhoneRequired = false; public function __construct() { $this->productVariants = new ArrayCollection(); } public function __toString(): string { return $this->title; } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } /** * @return Collection|ProductVariant[] */ public function getProductVariants(): Collection { return $this->productVariants; } public function addProductVariant(ProductVariant $productVariant): self { if (!$this->productVariants->contains($productVariant)) { $this->productVariants[] = $productVariant; $productVariant->addShippingType($this); } return $this; } public function removeProductVariant(ProductVariant $productVariant): self { if ($this->productVariants->contains($productVariant)) { $this->productVariants->removeElement($productVariant); $productVariant->removeShippingType($this); } return $this; } public function getShippingProductVariant(): ?ProductVariant { return $this->shippingProductVariant; } public function setShippingProductVariant(?ProductVariant $shippingProductVariant): self { $this->shippingProductVariant = $shippingProductVariant; return $this; } public function getIsDefault(): ?bool { return $this->isDefault; } public function setIsDefault(bool $isDefault): self { $this->isDefault = $isDefault; return $this; } public function getGosShippingType(): ?int { return $this->gosShippingType; } public function setGosShippingType(?int $gosShippingType): self { $this->gosShippingType = $gosShippingType; return $this; } public function getIsPhoneRequired(): ?bool { return $this->isPhoneRequired; } public function setIsPhoneRequired(bool $isPhoneRequired): self { $this->isPhoneRequired = $isPhoneRequired; return $this; }}