ChillPersonBundle: add administrativeStatus property to Person

This commit is contained in:
Christophe Siraut
2024-11-27 17:05:50 +01:00
parent 9e3431f397
commit 6c37d798bf
17 changed files with 431 additions and 2 deletions

View File

@@ -304,6 +304,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
private string $memo = '';
/**
* The person's administrative status.
*/
#[ORM\ManyToOne(targetEntity: AdministrativeStatus::class)]
#[ORM\JoinColumn(nullable: true)]
private ?AdministrativeStatus $administrativeStatus = null;
/**
* The person's mobile phone number.
*/
@@ -777,6 +784,11 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this->addresses;
}
public function getAdministrativeStatus(): ?AdministrativeStatus
{
return $this->administrativeStatus;
}
/**
* Return the age of a person, calculated at the date 'now'.
*
@@ -1420,6 +1432,13 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function setAdministrativeStatus(?AdministrativeStatus $administrativeStatus): self
{
$this->administrativeStatus = $administrativeStatus;
return $this;
}
public function setAcceptSMS(bool $acceptSMS): self
{
$this->acceptSMS = $acceptSMS;