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

@@ -17,56 +17,41 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity
*
* @ORM\Table(name="chill_person_social_issue")
*/
#[DiscriminatorMap(typeProperty: 'type', mapping: ['social_issue' => SocialIssue::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_social_issue')]
class SocialIssue
{
/**
* @var Collection<SocialIssue>
*
* @ORM\OneToMany(targetEntity=SocialIssue::class, mappedBy="parent")
*/
#[ORM\OneToMany(targetEntity: SocialIssue::class, mappedBy: 'parent')]
private Collection $children;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $desactivationDate = null;
/**
* @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\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=SocialIssue::class, inversedBy="children")
*/
#[ORM\ManyToOne(targetEntity: SocialIssue::class, inversedBy: 'children')]
private ?SocialIssue $parent = null;
/**
* @var Collection<SocialAction>
*
* @ORM\OneToMany(targetEntity=SocialAction::class, mappedBy="issue")
*/
#[ORM\OneToMany(targetEntity: SocialAction::class, mappedBy: 'issue')]
private Collection $socialActions;
/**
* @ORM\Column(type="json")
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
private array $title = [];
public function __construct()