mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-10 22:28:23 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -14,11 +14,11 @@ namespace Chill\MainBundle\Entity;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Order;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
#[ORM\Table(name: 'chill_main_notification')]
|
||||
@@ -32,8 +32,6 @@ class Notification implements TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @var Collection<User>
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
#[ORM\JoinTable(name: 'chill_main_notification_addresses_user')]
|
||||
@@ -58,17 +56,14 @@ class Notification implements TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @var Collection<NotificationComment>
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: NotificationComment::class, mappedBy: 'notification', orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['createdAt' => \Doctrine\Common\Collections\Criteria::ASC])]
|
||||
#[ORM\OrderBy(['createdAt' => 'ASC'])]
|
||||
private Collection $comments;
|
||||
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)]
|
||||
private \DateTimeImmutable $date;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
@@ -85,7 +80,6 @@ class Notification implements TrackUpdateInterface
|
||||
|
||||
private array $removedAddresses = [];
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: User::class)]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
private ?User $sender = null;
|
||||
@@ -96,8 +90,6 @@ class Notification implements TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @var Collection<User>
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
#[ORM\JoinTable(name: 'chill_main_notification_addresses_unread')]
|
||||
|
||||
Reference in New Issue
Block a user