Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 13:11:42 +02:00
parent a3f775a69b
commit 0ff4593863
118 changed files with 143 additions and 658 deletions

View File

@@ -21,7 +21,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity]
#[ORM\Table(name: 'chill_calendar.calendar_range')]
#[ORM\UniqueConstraint(name: 'idx_calendar_range_remote', columns: ['remoteId'], options: ['where' => "remoteId <> ''"])]
@@ -41,14 +40,12 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)]
private ?\DateTimeImmutable $endDate = null;
#[Groups(['read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
#[Groups(['read', 'write', 'calendar:read'])]
#[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: Location::class)]
@@ -62,7 +59,7 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
#[Groups(['read', 'write', 'calendar:read'])]
#[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)]
#[ORM\ManyToOne(targetEntity: User::class)]
private ?User $user = null;
public function getCalendar(): ?Calendar