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

@@ -14,37 +14,30 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
/**
* @ORM\Entity
*
* @ORM\Table("chill_main_user_job")
*/
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user_job' => UserJob::class])]
#[ORM\Entity]
#[ORM\Table('chill_main_user_job')]
class UserJob
{
/**
* @ORM\Column(name="active", type="boolean")
*/
#[ORM\Column(name: 'active', type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
protected bool $active = true;
/**
* @ORM\Id
*
* @ORM\Column(name="id", type="integer")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected ?int $id = null;
/**
* @var array<string, string>
*
* @ORM\Column(name="label", type="json")
*
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Column(name: 'label', type: \Doctrine\DBAL\Types\Types::JSON)]
protected array $label = [];
public function getId(): ?int