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

@@ -18,46 +18,33 @@ use Symfony\Component\Serializer\Annotation\Groups;
/**
* AccompanyingPeriodParticipation Class.
*
* @ORM\Entity
*
* @ORM\Table(name="chill_person_accompanying_period_participation")
*/
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_participation' => AccompanyingPeriodParticipation::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_participation')]
class AccompanyingPeriodParticipation
{
/**
* @ORM\Column(type="date", nullable=true)
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
private ?\DateTime $endDate = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @ORM\Column(type="date", nullable=false)
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: false)]
private ?\DateTime $startDate = null;
public function __construct(/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations", cascade={"persist"})
*
* @ORM\JoinColumn(name="accompanyingperiod_id", referencedColumnName="id", nullable=false)
*/
private ?AccompanyingPeriod $accompanyingPeriod, /**
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodParticipations")
*
* @ORM\JoinColumn(name="person_id", referencedColumnName="id", nullable=false)
*/
#[Groups(['read', 'docgen:read'])]
public function __construct(
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'participations', cascade: ['persist'])]
#[ORM\JoinColumn(name: 'accompanyingperiod_id', referencedColumnName: 'id', nullable: false)]
private ?AccompanyingPeriod $accompanyingPeriod,
#[Groups(['read', 'docgen:read'])] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'accompanyingPeriodParticipations')] #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id', nullable: false)]
private ?Person $person
) {
$this->startDate = new \DateTime('now');