Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 00:01:30 +02:00
parent 579bd829f8
commit 72016e1a21
124 changed files with 1724 additions and 3770 deletions

View File

@@ -19,63 +19,51 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
/**
* @ORM\Entity
*
* @ORM\Table(name="chill_person_social_work_result")
*/
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_result' => Result::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_work_result')]
class Result
{
/**
* @var Collection<AccompanyingPeriodWorkGoal>
*
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWorkGoal::class, mappedBy="results")
*/
#[ORM\ManyToMany(targetEntity: AccompanyingPeriodWorkGoal::class, mappedBy: 'results')]
private Collection $accompanyingPeriodWorkGoals;
/**
* @var Collection<AccompanyingPeriodWork>
*
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWork::class, mappedBy="results")
*/
#[ORM\ManyToMany(targetEntity: AccompanyingPeriodWork::class, mappedBy: 'results')]
private Collection $accompanyingPeriodWorks;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTime $desactivationDate = null;
/**
* @var Collection<Goal>
*
* @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results")
*/
#[ORM\ManyToMany(targetEntity: Goal::class, mappedBy: 'results')]
private Collection $goals;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @var Collection<SocialAction>
*
* @ORM\ManyToMany(targetEntity=SocialAction::class, mappedBy="results")
*/
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'results')]
private Collection $socialActions;
/**
* @ORM\Column(type="json")
*
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
private array $title = [];
public function __construct()