|
|
@@ -51,6 +51,7 @@ use App\Entity\Person\PersonActivity;
|
|
|
use App\Entity\Place\PlaceRepair;
|
|
|
use App\Entity\Place\RoomRepair;
|
|
|
use App\Entity\Product\EquipmentRepair;
|
|
|
+use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
@@ -62,6 +63,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
|
|
* Fais le lien entre une Person et une Organization
|
|
|
* @ApiResource @see : config/api_platform/Access/access.yaml
|
|
|
*/
|
|
|
+#[Auditable]
|
|
|
#[ORM\Entity(repositoryClass: AccessRepository::class)]
|
|
|
#[ApiFilter(BooleanFilter::class, properties: ['person.isPhysical'])]
|
|
|
#[ApiFilter(FullNameFilter::class)]
|
|
|
@@ -280,6 +282,9 @@ class Access implements UserInterface
|
|
|
#[ORM\OneToMany(mappedBy: 'student', targetEntity: WorkByUser::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
private Collection $workByUsers;
|
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'access', targetEntity: Email::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ private Collection $report;
|
|
|
+
|
|
|
#[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accesses', cascade: ['persist'])]
|
|
|
#[ORM\JoinTable(name: 'tag_access')]
|
|
|
#[ORM\JoinColumn(name: 'access_id', referencedColumnName: 'id')]
|