mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 04:53:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -15,7 +15,6 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
|
||||
#[ORM\Entity(repositoryClass: \Chill\CustomFieldsBundle\EntityRepository\CustomFieldLongChoice\OptionRepository::class)]
|
||||
#[ORM\Table(name: 'custom_field_long_choice_options')]
|
||||
class Option
|
||||
@@ -26,10 +25,9 @@ class Option
|
||||
/**
|
||||
* @var Collection<Option>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option::class, mappedBy: 'parent')]
|
||||
#[ORM\OneToMany(targetEntity: Option::class, mappedBy: 'parent')]
|
||||
private Collection $children;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
@@ -41,8 +39,7 @@ class Option
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 15)]
|
||||
private ?string $key = null;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option::class, inversedBy: 'children')]
|
||||
#[ORM\ManyToOne(targetEntity: Option::class, inversedBy: 'children')]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
private ?Option $parent = null;
|
||||
|
||||
|
Reference in New Issue
Block a user