mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -19,13 +19,12 @@ use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Order;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @EntityWorkflowCreation(groups={"creation"})
|
||||
*/
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['entity_workflow' => EntityWorkflow::class])]
|
||||
@@ -72,7 +71,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\OneToMany(targetEntity: EntityWorkflowComment::class, mappedBy: 'entityWorkflow', orphanRemoval: true)]
|
||||
private Collection $comments;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
@@ -85,13 +83,11 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
private int $relatedEntityId;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @var Collection<EntityWorkflowStep>
|
||||
*/
|
||||
#[Assert\Valid(traverse: true)]
|
||||
#[ORM\OneToMany(targetEntity: EntityWorkflowStep::class, mappedBy: 'entityWorkflow', orphanRemoval: true, cascade: ['persist'])]
|
||||
#[ORM\OrderBy(['transitionAt' => \Doctrine\Common\Collections\Criteria::ASC, 'id' => 'ASC'])]
|
||||
#[ORM\OrderBy(['transitionAt' => Order::Ascending, 'id' => 'ASC'])]
|
||||
private Collection $steps;
|
||||
|
||||
/**
|
||||
@@ -100,8 +96,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
private ?array $stepsChainedCache = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @var Collection<User>
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
@@ -109,8 +103,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
private Collection $subscriberToFinal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @var Collection<User>
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: User::class)]
|
||||
|
Reference in New Issue
Block a user