mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -18,7 +18,6 @@ use Symfony\Component\Serializer\Annotation\Context;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['scope' => Scope::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')]
|
||||
@@ -28,7 +27,6 @@ class Scope
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => true])]
|
||||
private bool $active = true;
|
||||
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
@@ -37,7 +35,6 @@ class Scope
|
||||
|
||||
/**
|
||||
* translatable names.
|
||||
*
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
@@ -46,10 +43,8 @@ class Scope
|
||||
|
||||
/**
|
||||
* @var Collection<RoleScope>
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: \Chill\MainBundle\Entity\RoleScope::class, mappedBy: 'scope')]
|
||||
#[ORM\OneToMany(targetEntity: RoleScope::class, mappedBy: 'scope')]
|
||||
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
|
||||
private Collection $roleScopes;
|
||||
|
||||
|
Reference in New Issue
Block a user