108 lines
2.1 KiB
PHP

<?php
namespace Chill\PersonBundle\Entity\Household;
use Chill\PersonBundle\Repository\Household\PositionRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
/**
* @ORM\Entity
* @ORM\Table(name="chill_person_household_position")
* @Serializer\DiscriminatorMap(typeProperty="type", mapping={
* "household_position"=Position::class
* })
*/
class Position
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({ "read" })
*/
private ?int $id;
/**
* @ORM\Column(type="json")
* @Serializer\Groups({ "read" })
*/
private array $label = [];
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private bool $shareHouseHold = true;
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
*/
private bool $allowHolder = false;
/**
* @ORM\Column(type="float")
* @Serializer\Groups({ "read" })
*/
private float $ordering = 0.00;
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): array
{
return $this->label;
}
public function setLabel(array $label): self
{
$this->label = $label;
return $this;
}
public function getShareHousehold(): bool
{
return $this->shareHouseHold;
}
public function setShareHousehold(bool $shareHouseHold): self
{
$this->shareHouseHold = $shareHouseHold;
return $this;
}
public function getAllowHolder(): bool
{
return $this->allowHolder;
}
public function isAllowHolder(): bool
{
return $this->getAllowHolder();
}
public function setAllowHolder(bool $allowHolder): self
{
$this->allowHolder = $allowHolder;
return $this;
}
public function getOrdering(): float
{
return $this->ordering;
}
public function setOrdering(float $ordering): self
{
$this->ordering = $ordering;
return $this;
}
}