mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 09:05:01 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -15,47 +15,31 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="role_scopes")
|
||||
*
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE", region="acl_cache_region")
|
||||
*/
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')]
|
||||
#[ORM\Table(name: 'role_scopes')]
|
||||
class RoleScope
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Collection<PermissionsGroup>
|
||||
*
|
||||
* @ORM\ManyToMany(
|
||||
* targetEntity="Chill\MainBundle\Entity\PermissionsGroup",
|
||||
* mappedBy="roleScopes")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\PermissionsGroup::class, mappedBy: 'roleScopes')]
|
||||
private Collection $permissionsGroups;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
|
||||
private ?string $role = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="Chill\MainBundle\Entity\Scope",
|
||||
* inversedBy="roleScopes")
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=true, name="scope_id")
|
||||
*
|
||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
|
||||
*/
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Scope::class, inversedBy: 'roleScopes')]
|
||||
#[ORM\JoinColumn(nullable: true, name: 'scope_id')]
|
||||
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
|
||||
private ?Scope $scope = null;
|
||||
|
||||
public function __construct()
|
||||
|
Reference in New Issue
Block a user