<?php
namespace App\Entity;
use App\Repository\AddressingRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: AddressingRepository::class)]
class Addressing
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
#[Groups(['list'])]
private ?int $id;
#[ORM\Column(type: 'integer')]
#[Groups(['list'])]
private ?int $parentId;
#[ORM\Column(type: 'string', length: 100)]
#[Groups(['list'])]
private ?string $name;
#[ORM\ManyToOne(targetEntity: GlobalConstant::class)]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
#[Groups(['list'])]
private ?GlobalConstant $addressingType;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
#[Groups(['list'])]
private ?string $orderKey;
#[ORM\Column(type: 'boolean')]
private ?bool $isDeleted;
public function __construct()
{
$this->isDeleted = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getParentId(): ?int
{
return $this->parentId;
}
public function setParentId(int $parentId): self
{
$this->parentId = $parentId;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getOrderKey(): ?string
{
return $this->orderKey;
}
public function setOrderKey(string $orderKey): self
{
$this->orderKey = $orderKey;
return $this;
}
public function getIsDeleted(): ?bool
{
return $this->isDeleted;
}
public function setIsDeleted(bool $isDeleted): self
{
$this->isDeleted = $isDeleted;
return $this;
}
public function getAddressingType(): ?GlobalConstant
{
return $this->addressingType;
}
public function setAddressingType(?GlobalConstant $addressingType): self
{
$this->addressingType = $addressingType;
return $this;
}
public function isIsDeleted(): ?bool
{
return $this->isDeleted;
}
}