|
|
@@ -29,7 +29,6 @@ use App\Entity\Booking\EventUser;
|
|
|
use App\Entity\Booking\ExamenConvocation;
|
|
|
use App\Entity\Booking\PersonHoliday;
|
|
|
use App\Entity\Booking\WorkByUser;
|
|
|
-use App\Entity\Core\AbstractControl;
|
|
|
use App\Entity\Core\Notification;
|
|
|
use App\Entity\Core\NotificationUser;
|
|
|
use App\Entity\Core\Tagg;
|
|
|
@@ -38,6 +37,7 @@ use App\Entity\Education\EducationNotationConfig;
|
|
|
use App\Entity\Education\EducationStudent;
|
|
|
use App\Entity\Education\EducationTeacher;
|
|
|
use App\Entity\Message\AbstractMessage;
|
|
|
+use App\Entity\Message\AbstractReport;
|
|
|
use App\Entity\Message\Email;
|
|
|
use App\Entity\Message\Mail;
|
|
|
use App\Entity\Message\Sms;
|
|
|
@@ -52,15 +52,18 @@ use App\Entity\Person\PersonActivity;
|
|
|
use App\Entity\Place\PlaceRepair;
|
|
|
use App\Entity\Place\RoomRepair;
|
|
|
use App\Entity\Product\Equipment;
|
|
|
+use App\Entity\Product\EquipmentControl;
|
|
|
use App\Entity\Product\EquipmentLoan;
|
|
|
use App\Entity\Product\EquipmentRepair;
|
|
|
use App\Entity\Reward\AccessReward;
|
|
|
-use App\Entity\Traits\CreatedOnAndByTrait;
|
|
|
+use App\Entity\Shop\Orders;
|
|
|
+use App\Entity\SimulationSession\SimulationSession;
|
|
|
use App\Entity\Token\Token;
|
|
|
+use App\Entity\Traits\CreatedOnAndByTrait;
|
|
|
use App\Filter\ApiPlatform\Person\FullNameFilter;
|
|
|
use App\Filter\ApiPlatform\Utils\InFilter;
|
|
|
use App\Repository\Access\AccessRepository;
|
|
|
-// use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
|
|
|
+use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
@@ -75,10 +78,10 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
|
|
* Security :
|
|
|
*
|
|
|
* @see ~/config/api_platform/Access/access.yaml
|
|
|
- * @see App\Doctrine\Access\CurrentAccessExtension
|
|
|
+ * @see \App\Doctrine\Access\CurrentAccessExtension
|
|
|
*/
|
|
|
#[ApiResource]
|
|
|
-// #[Auditable]
|
|
|
+#[Auditable]
|
|
|
#[ORM\Entity(repositoryClass: AccessRepository::class)]
|
|
|
#[ApiFilter(filterClass: BooleanFilter::class, properties: ['person.isPhysical'])]
|
|
|
#[ApiFilter(filterClass: FullNameFilter::class)]
|
|
|
@@ -126,80 +129,117 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
#[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
|
|
|
private ?array $setting = [];
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
- private AccessBilling $accessBilling;
|
|
|
+ #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
+ private ?AccessBilling $accessBilling;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonActivity::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, PersonActivity> */
|
|
|
+ #[ORM\OneToMany(targetEntity: PersonActivity::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $personActivity;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationFunction::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, OrganizationFunction> */
|
|
|
+ #[ORM\OneToMany(targetEntity: OrganizationFunction::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationFunction;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'licensee', targetEntity: OrganizationLicence::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, OrganizationLicence> */
|
|
|
+ #[ORM\OneToMany(targetEntity: OrganizationLicence::class, mappedBy: 'licensee', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationLicences;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonalizedList::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, PersonalizedList> */
|
|
|
+ #[ORM\OneToMany(targetEntity: PersonalizedList::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $personalizedLists;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'recipientAccess', targetEntity: Notification::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Notification> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Notification::class, mappedBy: 'recipientAccess', cascade: ['persist', 'remove'])]
|
|
|
private Collection $notifications;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: NotificationUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, NotificationUser> */
|
|
|
+ #[ORM\OneToMany(targetEntity: NotificationUser::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $notificationUsers;
|
|
|
|
|
|
+ /**
|
|
|
+ * @var Collection<int, Access>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Access::class, mappedBy: 'children', cascade: ['persist'])]
|
|
|
private Collection $guardians;
|
|
|
|
|
|
+ /**
|
|
|
+ * @var Collection<int, Access>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'guardians', cascade: ['persist'])]
|
|
|
#[ORM\JoinTable(name: 'children_guardians')]
|
|
|
#[ORM\JoinColumn(name: 'guardians_id', referencedColumnName: 'id')]
|
|
|
#[ORM\InverseJoinColumn(name: 'children_id', referencedColumnName: 'id')]
|
|
|
private Collection $children;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'accessPayer', targetEntity: AccessPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessPayer> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessPayer', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billingPayers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'accessReceiver', targetEntity: AccessPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessPayer> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessReceiver', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billingReceivers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessIntangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessIntangible> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessIntangibles;
|
|
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'publicationDirectors')]
|
|
|
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
|
|
|
+ #[ORM\JoinColumn(referencedColumnName: 'id')]
|
|
|
private ?Parameters $publicationDirector;
|
|
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'teachers')]
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
|
|
|
private ?EducationNotationConfig $educationNotationConfig;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'company', targetEntity: CompanyPerson::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, CompanyPerson> */
|
|
|
+ #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'company', cascade: ['persist', 'remove'])]
|
|
|
private Collection $companyPersonAccesses;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: CompanyPerson::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, CompanyPerson> */
|
|
|
+ #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $companyPersonCompany;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: EducationStudent::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EducationStudent> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $educationStudent;
|
|
|
|
|
|
- #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EducationStudent> */
|
|
|
+ #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist'])]
|
|
|
private Collection $educationStudentByTeacher;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'teacher', targetEntity: EducationTeacher::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EducationTeacher> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationTeacher::class, mappedBy: 'teacher', cascade: ['persist', 'remove'])]
|
|
|
private Collection $educationTeachers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonHoliday::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, PersonHoliday> */
|
|
|
+ #[ORM\OneToMany(targetEntity: PersonHoliday::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $holidays;
|
|
|
|
|
|
+ /**
|
|
|
+ * TODO: orphanRemoval?
|
|
|
+ *
|
|
|
+ * @var Collection<int, Course>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
|
|
|
private Collection $courses;
|
|
|
|
|
|
+ /**
|
|
|
+ * TODO: orphanRemoval?
|
|
|
+ *
|
|
|
+ * @var Collection<int, Course>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $practicalCourses;
|
|
|
|
|
|
+ /** @var Collection<int, Event> */
|
|
|
#[ORM\ManyToMany(targetEntity: Event::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $eventOrganizers;
|
|
|
|
|
|
+ /**
|
|
|
+ * TODO: orphanRemoval?
|
|
|
+ *
|
|
|
+ * @var Collection<int, EducationalProject>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $educationalProjectOrganizers;
|
|
|
|
|
|
@@ -213,141 +253,202 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
#[ORM\Column]
|
|
|
private bool $ielEnabled = false;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'educationalProjectPayer', targetEntity: EducationalProjectPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EducationalProjectPayer> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProjectPayer::class, mappedBy: 'educationalProjectPayer', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billingEducationalProjectPayers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Bill::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Bill> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $bills;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillLine::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, BillLine> */
|
|
|
+ #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billLines;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillCredit::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, BillCredit> */
|
|
|
+ #[ORM\OneToMany(targetEntity: BillCredit::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billCredits;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'silentPartner', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EducationalProject> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'silentPartner', cascade: ['persist', 'remove'])]
|
|
|
private Collection $silentPartners;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'operationalPartner', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EducationalProject> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'operationalPartner', cascade: ['persist', 'remove'])]
|
|
|
private Collection $operationalPartners;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'guest', targetEntity: EventUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EventUser> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'guest', cascade: ['persist', 'remove'])]
|
|
|
private Collection $eventUsers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'student', targetEntity: ExamenConvocation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, ExamenConvocation> */
|
|
|
+ #[ORM\OneToMany(targetEntity: ExamenConvocation::class, mappedBy: 'student', cascade: ['persist', 'remove'])]
|
|
|
private Collection $examenConvocations;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'provider', targetEntity: EquipmentRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EquipmentRepair> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EquipmentRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentRepairProviders;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Attendance> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $attendances;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AttendanceBooking::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AttendanceBooking> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $attendanceBookings;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'replacement', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Attendance> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'replacement', cascade: ['persist', 'remove'])]
|
|
|
private Collection $attendanceReplacements;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'provider', targetEntity: RoomRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, RoomRepair> */
|
|
|
+ #[ORM\OneToMany(targetEntity: RoomRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'])]
|
|
|
private Collection $roomRepairProviders;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'provider', targetEntity: PlaceRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, PlaceRepair> */
|
|
|
+ #[ORM\OneToMany(targetEntity: PlaceRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'])]
|
|
|
private Collection $placeRepairProviders;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: Email::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Email> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Email::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $emails;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: Mail::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Mail> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Mail::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $mails;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: Sms::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Sms> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Sms::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $sms;
|
|
|
|
|
|
- #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Jury> */
|
|
|
+ #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', cascade: ['persist'])]
|
|
|
private Collection $juryMembers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'contactPerson', targetEntity: Organization::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Organization> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Organization::class, mappedBy: 'contactPerson', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationContacts;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'member', targetEntity: CommissionMember::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, CommissionMember> */
|
|
|
+ #[ORM\OneToMany(targetEntity: CommissionMember::class, mappedBy: 'member', cascade: ['persist', 'remove'])]
|
|
|
private Collection $commissionMembers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'supplier', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Equipment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'supplier', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentSuppliers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'controlManager', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Equipment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'controlManager', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentControlManagers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'editor', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Equipment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'editor', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentEditors;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'borrower', targetEntity: EquipmentLoan::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EquipmentLoan> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EquipmentLoan::class, mappedBy: 'borrower', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentLoans;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Equipment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipments;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessFictionalIntangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessFictionalIntangible> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessFictionalIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessFictionalIntangibles;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Donor::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Donor> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Donor::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $donors;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessReward::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessReward> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessRewards;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationResponsability::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, OrganizationResponsability> */
|
|
|
+ #[ORM\OneToMany(targetEntity: OrganizationResponsability::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationResponsabilities;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'accessOriginal', targetEntity: AccessWish::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessWish> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessWish::class, mappedBy: 'accessOriginal', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessWishes;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'student', targetEntity: WorkByUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, WorkByUser> */
|
|
|
+ #[ORM\OneToMany(targetEntity: WorkByUser::class, mappedBy: 'student', cascade: ['persist', 'remove'])]
|
|
|
private Collection $workByUsers;
|
|
|
|
|
|
+ /** @var Collection<int, Tagg> */
|
|
|
#[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accesses', cascade: ['persist'])]
|
|
|
+ #[ORM\OrderBy(value: ['label' => 'ASC'])]
|
|
|
#[ORM\JoinTable(name: 'tag_access')]
|
|
|
#[ORM\JoinColumn(name: 'access_id', referencedColumnName: 'id')]
|
|
|
#[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
|
|
|
private Collection $tags;
|
|
|
|
|
|
- #[ORM\ManyToMany(mappedBy: 'organizer', targetEntity: AbstractBooking::class, cascade: ['persist'], orphanRemoval: false)]
|
|
|
+ /** @var Collection<int, AbstractBooking> */
|
|
|
+ #[ORM\ManyToMany(targetEntity: AbstractBooking::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $bookingOrganizers;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AdvancePayment::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AdvancePayment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AdvancePayment::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $advancePayments;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'author', targetEntity: AbstractMessage::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AbstractMessage> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractMessage::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $messages;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'managerControl', targetEntity: Equipment::class, cascade: [], orphanRemoval: false)]
|
|
|
+ /** @var Collection<int, Equipment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'managerControl', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentManagerControls;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'accompanist', targetEntity: AbstractControl::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, EquipmentControl> */
|
|
|
+ #[ORM\OneToMany(targetEntity: EquipmentControl::class, mappedBy: 'accompanist', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accompanistControl;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessReward::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AccessReward> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $rewards;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', targetEntity: AccessSocial::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
- private AccessSocial $accessSocial;
|
|
|
+ #[ORM\OneToOne(targetEntity: AccessSocial::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
+ private ?AccessSocial $accessSocial;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', targetEntity: AccessNetworkSetting::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
- private AccessNetworkSetting $accessNetworkSetting;
|
|
|
+ #[ORM\OneToOne(targetEntity: AccessNetworkSetting::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
+ private ?AccessNetworkSetting $accessNetworkSetting;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', targetEntity: AccessCommunication::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
- private AccessCommunication $accessCommunication;
|
|
|
+ #[ORM\OneToOne(targetEntity: AccessCommunication::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
+ private ?AccessCommunication $accessCommunication;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', targetEntity: CalendarSynchro::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
- private CalendarSynchro $calendarSynchro;
|
|
|
+ #[ORM\OneToOne(targetEntity: CalendarSynchro::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
+ private ?CalendarSynchro $calendarSynchro;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: Token::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Token> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Token::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $tokens;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], fetch: 'EAGER', orphanRemoval: true)]
|
|
|
+ #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist', 'remove'], fetch: 'EAGER')]
|
|
|
private ?Preferences $preferences;
|
|
|
|
|
|
+ /** @var Collection<int, AbstractReport> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractReport::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
+ private Collection $reports;
|
|
|
+
|
|
|
+ /** @var Collection<int, SimulationSession> */
|
|
|
+ #[ORM\OneToMany(targetEntity: SimulationSession::class, mappedBy: 'accessInitiator', cascade: ['persist', 'remove'])]
|
|
|
+ protected Collection $simulationSessionAccessInitiators;
|
|
|
+
|
|
|
+ /** @var Collection<int, SimulationSession> */
|
|
|
+ #[ORM\OneToMany(
|
|
|
+ targetEntity: SimulationSession::class,
|
|
|
+ mappedBy: 'accessSimulated',
|
|
|
+ cascade: ['persist', 'remove'],
|
|
|
+ orphanRemoval: false,
|
|
|
+ )]
|
|
|
+ protected Collection $simulationSessionAccessSimulateds;
|
|
|
+
|
|
|
+ /** @var Collection<int, Orders> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Orders::class, mappedBy: 'access', cascade: [], orphanRemoval: true)]
|
|
|
+ protected Collection $orders;
|
|
|
+
|
|
|
#[Pure]
|
|
|
public function __construct()
|
|
|
{
|
|
|
@@ -404,6 +505,9 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
$this->emails = new ArrayCollection();
|
|
|
$this->mails = new ArrayCollection();
|
|
|
$this->sms = new ArrayCollection();
|
|
|
+ $this->simulationSessionAccessInitiators = new ArrayCollection();
|
|
|
+ $this->simulationSessionAccessSimulateds = new ArrayCollection();
|
|
|
+ $this->orders = new ArrayCollection();
|
|
|
}
|
|
|
|
|
|
public function getId(): ?int
|
|
|
@@ -1115,9 +1219,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @return Collection<int, Course>
|
|
|
- */
|
|
|
public function getPracticalCourses(): Collection
|
|
|
{
|
|
|
return $this->practicalCourses;
|
|
|
@@ -1224,12 +1325,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
|
|
|
public function removeBill(Bill $bill): self
|
|
|
{
|
|
|
- if ($this->bills->removeElement($bill)) {
|
|
|
- // set the owning side to null (unless already changed)
|
|
|
- if ($bill->getAccess() === $this) {
|
|
|
- $bill->setAccess(null);
|
|
|
- }
|
|
|
- }
|
|
|
+ $this->bills->removeElement($bill);
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
@@ -1284,12 +1380,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
|
|
|
public function removeBillCredit(BillCredit $billCredit): self
|
|
|
{
|
|
|
- if ($this->billCredits->removeElement($billCredit)) {
|
|
|
- // set the owning side to null (unless already changed)
|
|
|
- if ($billCredit->getAccess() === $this) {
|
|
|
- $billCredit->setAccess(null);
|
|
|
- }
|
|
|
- }
|
|
|
+ $this->billCredits->removeElement($billCredit);
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
@@ -2240,9 +2331,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
|
|
|
public function removeAdvancePayment(AdvancePayment $advancePayment): self
|
|
|
{
|
|
|
- if ($this->advancePayments->removeElement($advancePayment)) {
|
|
|
- $advancePayment->setAccess(null);
|
|
|
- }
|
|
|
+ $this->advancePayments->removeElement($advancePayment);
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
@@ -2300,7 +2389,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
return $this->accompanistControl;
|
|
|
}
|
|
|
|
|
|
- public function addAccompanistControl(AbstractControl $accompanistControl): self
|
|
|
+ public function addAccompanistControl(EquipmentControl $accompanistControl): self
|
|
|
{
|
|
|
if (!$this->accompanistControl->contains($accompanistControl)) {
|
|
|
$this->accompanistControl[] = $accompanistControl;
|
|
|
@@ -2310,7 +2399,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function removeAccompanistControl(AbstractControl $accompanistControl): self
|
|
|
+ public function removeAccompanistControl(EquipmentControl $accompanistControl): self
|
|
|
{
|
|
|
if ($this->accompanistControl->removeElement($accompanistControl)) {
|
|
|
// $accompanistControl->setAccompanist(null); // TODO: actuellement, pas nullable: conserver?
|
|
|
@@ -2343,48 +2432,48 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getAccessSocial(): AccessSocial
|
|
|
+ public function getAccessSocial(): ?AccessSocial
|
|
|
{
|
|
|
return $this->accessSocial;
|
|
|
}
|
|
|
|
|
|
- public function setAccessSocial(AccessSocial $accessSocial): self
|
|
|
+ public function setAccessSocial(?AccessSocial $accessSocial): self
|
|
|
{
|
|
|
$this->accessSocial = $accessSocial;
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getAccessNetworkSetting(): AccessNetworkSetting
|
|
|
+ public function getAccessNetworkSetting(): ?AccessNetworkSetting
|
|
|
{
|
|
|
return $this->accessNetworkSetting;
|
|
|
}
|
|
|
|
|
|
- public function setAccessNetworkSetting(AccessNetworkSetting $accessNetworkSetting): self
|
|
|
+ public function setAccessNetworkSetting(?AccessNetworkSetting $accessNetworkSetting): self
|
|
|
{
|
|
|
$this->accessNetworkSetting = $accessNetworkSetting;
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getAccessCommunication(): AccessCommunication
|
|
|
+ public function getAccessCommunication(): ?AccessCommunication
|
|
|
{
|
|
|
return $this->accessCommunication;
|
|
|
}
|
|
|
|
|
|
- public function setAccessCommunication(AccessCommunication $accessCommunication): self
|
|
|
+ public function setAccessCommunication(?AccessCommunication $accessCommunication): self
|
|
|
{
|
|
|
$this->accessCommunication = $accessCommunication;
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getCalendarSynchro(): CalendarSynchro
|
|
|
+ public function getCalendarSynchro(): ?CalendarSynchro
|
|
|
{
|
|
|
return $this->calendarSynchro;
|
|
|
}
|
|
|
|
|
|
- public function setCalendarSynchro(CalendarSynchro $calendarSynchro): self
|
|
|
+ public function setCalendarSynchro(?CalendarSynchro $calendarSynchro): self
|
|
|
{
|
|
|
$this->calendarSynchro = $calendarSynchro;
|
|
|
|
|
|
@@ -2429,4 +2518,96 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
{
|
|
|
return $this->preferences;
|
|
|
}
|
|
|
+
|
|
|
+ public function getReports(): Collection
|
|
|
+ {
|
|
|
+ return $this->reports;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addReport(AbstractReport $report): self
|
|
|
+ {
|
|
|
+ if (!$this->reports->contains($report)) {
|
|
|
+ $this->reports[] = $report;
|
|
|
+ $report->setAccess($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeReport(AbstractReport $report): self
|
|
|
+ {
|
|
|
+ if ($this->reports->removeElement($report)) {
|
|
|
+ $report->setAccess(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getSimulationSessionAccessInitiators(): Collection
|
|
|
+ {
|
|
|
+ return $this->simulationSessionAccessInitiators;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addSimulationSessionAccessInitiator(SimulationSession $simulationSessionAccessInitiator): self
|
|
|
+ {
|
|
|
+ if (!$this->simulationSessionAccessInitiators->contains($simulationSessionAccessInitiator)) {
|
|
|
+ $this->simulationSessionAccessInitiators[] = $simulationSessionAccessInitiator;
|
|
|
+ $simulationSessionAccessInitiator->setAccessInitiator($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeSimulationSessionAccessInitiator(SimulationSession $simulationSessionAccessInitiator): self
|
|
|
+ {
|
|
|
+ $this->simulationSessionAccessInitiators->removeElement($simulationSessionAccessInitiator);
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getSimulationSessionAccessSimulateds(): Collection
|
|
|
+ {
|
|
|
+ return $this->simulationSessionAccessSimulateds;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addSimulationSessionAccessSimulated(SimulationSession $simulationSessionAccessSimulated): self
|
|
|
+ {
|
|
|
+ if (!$this->simulationSessionAccessSimulateds->contains($simulationSessionAccessSimulated)) {
|
|
|
+ $this->simulationSessionAccessSimulateds[] = $simulationSessionAccessSimulated;
|
|
|
+ $simulationSessionAccessSimulated->setAccessSimulated($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeSimulationSessionAccessSimulated(SimulationSession $simulationSessionAccessSimulated): self
|
|
|
+ {
|
|
|
+ $this->simulationSessionAccessSimulateds->removeElement($simulationSessionAccessSimulated);
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getOrders(): Collection
|
|
|
+ {
|
|
|
+ return $this->orders;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addOrder(Orders $order): self
|
|
|
+ {
|
|
|
+ if (!$this->orders->contains($order)) {
|
|
|
+ $this->orders[] = $order;
|
|
|
+ $order->setAccess($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeOrder(Orders $order): self
|
|
|
+ {
|
|
|
+ if ($this->orders->removeElement($order)) {
|
|
|
+ $order->setAccess(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
}
|