Adding a second phone number to thirdparty entity

This commit is contained in:
juminet
2025-04-15 12:59:57 +00:00
committed by Julien Fastré
parent 1c1f418b18
commit a7517eb647
22 changed files with 168 additions and 15 deletions

View File

@@ -209,6 +209,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
#[PhonenumberConstraint(type: 'any')]
private ?PhoneNumber $telephone = null;
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
#[ORM\Column(name: 'telephone2', type: 'phone_number', nullable: true)]
#[PhonenumberConstraint(type: 'any')]
private ?PhoneNumber $telephone2 = null;
#[ORM\Column(name: 'types', type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
private ?array $thirdPartyTypes = [];
@@ -429,6 +434,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
return $this->telephone;
}
public function getTelephone2(): ?PhoneNumber
{
return $this->telephone2;
}
/**
* Get type.
*/
@@ -712,6 +722,13 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
return $this;
}
public function setTelephone2(?PhoneNumber $telephone2 = null): self
{
$this->telephone2 = $telephone2;
return $this;
}
/**
* Set type.
*