mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 18:43:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -23,7 +23,6 @@ use Chill\MainBundle\Entity\HasScopeInterface;
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use DateTime;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -31,9 +30,6 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
* Class Event.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: \Chill\EventBundle\Repository\EventRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
@@ -44,22 +40,21 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
use TrackUpdateTrait;
|
||||
|
||||
#[Assert\NotNull]
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Center::class)] // A
|
||||
#[ORM\ManyToOne(targetEntity: Center::class)] // A
|
||||
private ?Center $center = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Scope::class)]
|
||||
#[ORM\ManyToOne(targetEntity: Scope::class)]
|
||||
private ?Scope $circle = null;
|
||||
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
|
||||
private ?\DateTime $date;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)]
|
||||
#[ORM\ManyToOne(targetEntity: User::class)]
|
||||
private ?User $moderator = null;
|
||||
|
||||
#[Assert\NotBlank]
|
||||
@@ -69,25 +64,22 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
|
||||
/**
|
||||
* @var Collection<Participation>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: \Chill\EventBundle\Entity\Participation::class, mappedBy: 'event')]
|
||||
#[ORM\OneToMany(targetEntity: Participation::class, mappedBy: 'event')]
|
||||
private Collection $participations;
|
||||
|
||||
#[Assert\NotNull]
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\EventType::class)]
|
||||
#[ORM\ManyToOne(targetEntity: EventType::class)]
|
||||
private ?EventType $type = null;
|
||||
|
||||
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
|
||||
private CommentEmbeddable $comment;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Location::class)]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
private ?Location $location = null;
|
||||
|
||||
/**
|
||||
* @var Collection<StoredObject>
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist', 'refresh'])]
|
||||
#[ORM\JoinTable('chill_event_event_documents')]
|
||||
|
Reference in New Issue
Block a user