ChillPersonBundle: Add numberOfDependents and numberOfDependentsWithDisabilities

This commit is contained in:
Christophe Siraut
2024-12-20 11:28:36 +01:00
parent 5f31473c90
commit fbdc0d32f0
15 changed files with 220 additions and 6 deletions

View File

@@ -58,6 +58,18 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
private ?int $numberOfChildren = null;
#[Assert\NotNull]
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
#[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
private ?int $numberOfDependents = null;
#[Assert\NotNull]
#[Assert\GreaterThanOrEqual(0, groups: ['Default', 'household_composition'])]
#[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: true, options: ['default' => null])]
private ?int $numberOfDependentsWithDisabilities = null;
#[Assert\NotNull(groups: ['Default', 'household_composition'])]
#[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: false)]
@@ -98,6 +110,16 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
return $this->numberOfChildren;
}
public function getNumberOfDependents(): ?int
{
return $this->numberOfDependents;
}
public function getNumberOfDependentsWithDisabilities(): ?int
{
return $this->numberOfDependentsWithDisabilities;
}
public function getStartDate(): ?\DateTimeImmutable
{
return $this->startDate;
@@ -142,6 +164,20 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
return $this;
}
public function setNumberOfDependents(?int $numberOfDependents): HouseholdComposition
{
$this->numberOfDependents = $numberOfDependents;
return $this;
}
public function setNumberOfDependentsWithDisabilities(?int $numberOfDependentsWithDisabilities): HouseholdComposition
{
$this->numberOfDependentsWithDisabilities = $numberOfDependentsWithDisabilities;
return $this;
}
public function setStartDate(?\DateTimeImmutable $startDate): HouseholdComposition
{
$this->startDate = $startDate;