FEATURE [profession] change field type of profession into string

This commit is contained in:
2023-02-15 20:08:04 +01:00
committed by Julien Fastré
parent c953da3fd0
commit ac4c821290
2 changed files with 34 additions and 8 deletions

View File

@@ -250,14 +250,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
/**
* [fr] Qualité.
*
* @var ThirdPartyProfession
* @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdPartyProfession")
* ORM\JoinColumn(name="profession", referencedColumnName="id", nullable=true)
* @ORM\Column(name="profession", type="string", length=255, nullable=false)
* @Groups({"read", "write", "docgen:read", "docgen:read:3party:parent"})
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
*/
private ?ThirdPartyProfession $profession = null;
private string $profession = '';
/**
* @ORM\Column(name="telephone", type="phone_number", nullable=true)
@@ -491,9 +488,9 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
}
/**
* @return ThirdPartyProfession
* @return string
*/
public function getProfession(): ?ThirdPartyProfession
public function getProfession(): string
{
return $this->profession;
}
@@ -811,7 +808,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface
/**
* @return $this
*/
public function setProfession(?ThirdPartyProfession $profession): ThirdParty
public function setProfession(string $profession): self
{
$this->profession = $profession;