mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user