mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -20,7 +20,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_person_household_composition')]
|
||||
@@ -38,18 +37,15 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])]
|
||||
private ?\DateTimeImmutable $endDate = null;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Household::class, inversedBy: 'compositions')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Household $household = null;
|
||||
|
||||
|
||||
#[Serializer\Groups(['docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: HouseholdCompositionType::class)]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?HouseholdCompositionType $householdCompositionType = null;
|
||||
|
||||
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
|
Reference in New Issue
Block a user