mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 10:05:03 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -24,7 +24,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['personResource' => PersonResource::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_person_resource')]
|
||||
@@ -35,21 +34,19 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
use TrackUpdateTrait;
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\CommentEmbeddable::class, columnPrefix: 'comment_')]
|
||||
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
|
||||
private CommentEmbeddable $comment;
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
|
||||
private ?string $freeText = null;
|
||||
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
private ?int $id = null;
|
||||
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: PersonResourceKind::class, inversedBy: 'personResources')]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
@@ -57,8 +54,6 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* The person which host the owner of this resource.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
@@ -67,15 +62,12 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* The person linked with this resource.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[Groups(['read'])]
|
||||
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'resources')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Person $personOwner = null;
|
||||
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'personResources')]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
|
Reference in New Issue
Block a user