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

@@ -18,85 +18,67 @@ use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
/**
* @ORM\Entity
*
* @ORM\Table(name="chill_person_social_action")
*/
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_social_action' => SocialAction::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_action')]
class SocialAction
{
/**
* @var Collection<SocialAction>
*
* @ORM\OneToMany(targetEntity=SocialAction::class, mappedBy="parent")
*/
#[ORM\OneToMany(targetEntity: SocialAction::class, mappedBy: 'parent')]
private Collection $children;
/**
* @ORM\Column(type="dateinterval", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATEINTERVAL, nullable: true)]
private ?\DateInterval $defaultNotificationDelay = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $desactivationDate = null;
/**
* @var Collection<Evaluation>
*
* @ORM\ManyToMany(targetEntity=Evaluation::class, inversedBy="socialActions")
*
* @ORM\JoinTable(name="chill_person_social_work_evaluation_action")
*/
#[ORM\ManyToMany(targetEntity: Evaluation::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_work_evaluation_action')]
private Collection $evaluations;
/**
* @var Collection<Goal>
*
* @ORM\ManyToMany(targetEntity=Goal::class, inversedBy="socialActions")
*
* @ORM\JoinTable(name="chill_person_social_action_goal")
*/
#[ORM\ManyToMany(targetEntity: Goal::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_action_goal')]
private Collection $goals;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions")
*/
#[ORM\ManyToOne(targetEntity: SocialIssue::class, inversedBy: 'socialActions')]
private ?SocialIssue $issue = null;
/**
* @ORM\Column(type="float", name="ordering", options={"default": 0.0})
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, name: 'ordering', options: ['default' => '0.0'])]
private float $ordering = 0.0;
/**
* @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children")
*/
#[ORM\ManyToOne(targetEntity: SocialAction::class, inversedBy: 'children')]
private ?SocialAction $parent = null;
/**
* @var Collection<Result>
*
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="socialActions")
*
* @ORM\JoinTable(name="chill_person_social_action_result")
*/
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'socialActions')]
#[ORM\JoinTable(name: 'chill_person_social_action_result')]
private Collection $results;
/**
* @ORM\Column(type="json")
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
private array $title = [];
public function __construct()