mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 20:39:40 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -20,9 +20,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* **About denormalization**: this operation is operated by @see{AccompanyingPeriodResourdeNormalizer}.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_resource' => Resource::class])]
|
||||
#[ORM\Entity]
|
||||
@@ -33,8 +30,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
||||
#[ORM\UniqueConstraint(name: 'thirdparty_unique', columns: ['thirdparty_id', 'accompanyingperiod_id'])]
|
||||
class Resource
|
||||
{
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod::class, inversedBy: 'resources')]
|
||||
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'resources')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?AccompanyingPeriod $accompanyingPeriod = null;
|
||||
|
||||
@@ -42,20 +38,17 @@ class Resource
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
|
||||
private ?string $comment = '';
|
||||
|
||||
|
||||
#[Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
private ?int $id = null;
|
||||
|
||||
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
private ?Person $person = null;
|
||||
|
||||
|
||||
#[Groups(['docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: ThirdParty::class)]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
|
Reference in New Issue
Block a user