mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user