quick fix for phonenumber alt on person

This commit is contained in:
Julien Fastré 2022-03-03 15:44:30 +01:00
parent db4b0b104b
commit e9236875d2

View File

@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Entity;
use DateTime; use DateTime;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use libphonenumber\PhoneNumber;
/** /**
* Person Phones. * Person Phones.
@ -51,9 +52,9 @@ class PersonPhone
private Person $person; private Person $person;
/** /**
* @ORM\Column(type="text", length=40, nullable=false) * @ORM\Column(type="phone_number", nullable=false)
*/ */
private string $phonenumber = ''; private ?PhoneNumber $phonenumber = null;
/** /**
* @ORM\Column(type="text", length=40, nullable=true) * @ORM\Column(type="text", length=40, nullable=true)
@ -85,7 +86,7 @@ class PersonPhone
return $this->person; return $this->person;
} }
public function getPhonenumber(): string public function getPhonenumber(): ?PhoneNumber
{ {
return $this->phonenumber; return $this->phonenumber;
} }
@ -115,7 +116,7 @@ class PersonPhone
$this->person = $person; $this->person = $person;
} }
public function setPhonenumber(string $phonenumber): void public function setPhonenumber(?PhoneNumber $phonenumber): void
{ {
$this->phonenumber = $phonenumber; $this->phonenumber = $phonenumber;
} }