add position for household and prefix tables names

This commit is contained in:
2021-05-28 13:25:37 +02:00
parent 85dda8b680
commit 74520330b1
8 changed files with 282 additions and 1 deletions

View File

@@ -8,6 +8,9 @@ use Chill\MainBundle\Entity\Address;
/**
* @ORM\Entity
* @ORM\Table(
* name="chill_person_household"
* )
*/
class Household
{

View File

@@ -5,9 +5,14 @@ namespace Chill\PersonBundle\Entity\Household;
use Doctrine\ORM\Mapping as ORM;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Household\Position;
/**
* @ORM\Entity
* @ORM\Table(
* name="chill_person_household_members"
* )
*/
class HouseholdMembers
{
@@ -19,7 +24,7 @@ class HouseholdMembers
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @ORM\ManyToOne(targetEntity=Position::class)
*/
private $position;

View File

@@ -0,0 +1,93 @@
<?php
namespace Chill\PersonBundle\Entity\Household;
use Chill\PersonBundle\Repository\Household\PositionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=PositionRepository::class)
* @ORM\Table(name="chill_person_household_position")
*/
class Position
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="json")
*/
private $label = [];
/**
* @ORM\Column(type="boolean")
*/
private $shareHouseHold;
/**
* @ORM\Column(type="boolean")
*/
private $allowHolder;
/**
* @ORM\Column(type="float")
*/
private $ordering;
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 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;
}
}