mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-10 15:29:41 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -16,49 +16,35 @@ use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="centers")
|
||||
*/
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'centers')]
|
||||
class Center implements HasCenterInterface, \Stringable
|
||||
{
|
||||
/**
|
||||
* @var Collection<GroupCenter>
|
||||
*
|
||||
* @ORM\OneToMany(
|
||||
* targetEntity="Chill\MainBundle\Entity\GroupCenter",
|
||||
* mappedBy="center"
|
||||
* )
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: \Chill\MainBundle\Entity\GroupCenter::class, mappedBy: 'center')]
|
||||
private Collection $groupCenters;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
*
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||
private bool $isActive = true;
|
||||
|
||||
/**
|
||||
* @var Collection<Regroupment>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Regroupment::class, mappedBy="centers")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: Regroupment::class, mappedBy: 'centers')]
|
||||
private Collection $regroupments;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user