|
|
@@ -18,6 +18,7 @@ use App\Entity\Billing\Bill;
|
|
|
use App\Entity\Billing\BillCredit;
|
|
|
use App\Entity\Billing\BillLine;
|
|
|
use App\Entity\Billing\EducationalProjectPayer;
|
|
|
+use App\Entity\Booking\AbstractBooking;
|
|
|
use App\Entity\Booking\Attendance;
|
|
|
use App\Entity\Booking\AttendanceBooking;
|
|
|
use App\Entity\Booking\CalendarSynchro;
|
|
|
@@ -55,6 +56,8 @@ use App\Entity\Product\EquipmentControl;
|
|
|
use App\Entity\Product\EquipmentLoan;
|
|
|
use App\Entity\Product\EquipmentRepair;
|
|
|
use App\Entity\Reward\AccessReward;
|
|
|
+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;
|
|
|
@@ -126,38 +129,42 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
#[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
|
|
|
private ?array $setting = [];
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private ?AccessBilling $accessBilling;
|
|
|
|
|
|
/** @var Collection<int, PersonActivity> */
|
|
|
- #[ORM\OneToMany(targetEntity: PersonActivity::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: PersonActivity::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $personActivity;
|
|
|
|
|
|
/** @var Collection<int, OrganizationFunction> */
|
|
|
- #[ORM\OneToMany(targetEntity: OrganizationFunction::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: OrganizationFunction::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationFunction;
|
|
|
|
|
|
/** @var Collection<int, OrganizationLicence> */
|
|
|
- #[ORM\OneToMany(targetEntity: OrganizationLicence::class, mappedBy: 'licensee', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: OrganizationLicence::class, mappedBy: 'licensee', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationLicences;
|
|
|
|
|
|
/** @var Collection<int, PersonalizedList> */
|
|
|
- #[ORM\OneToMany(targetEntity: PersonalizedList::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: PersonalizedList::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $personalizedLists;
|
|
|
|
|
|
/** @var Collection<int, Notification> */
|
|
|
- #[ORM\OneToMany(targetEntity: Notification::class, mappedBy: 'recipientAccess', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Notification::class, mappedBy: 'recipientAccess', cascade: ['persist', 'remove'])]
|
|
|
private Collection $notifications;
|
|
|
|
|
|
/** @var Collection<int, NotificationUser> */
|
|
|
- #[ORM\OneToMany(targetEntity: NotificationUser::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: NotificationUser::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $notificationUsers;
|
|
|
|
|
|
- /** @var Collection<int, Access> */
|
|
|
+ /**
|
|
|
+ * @var Collection<int, Access>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Access::class, mappedBy: 'children', cascade: ['persist'])]
|
|
|
private Collection $guardians;
|
|
|
|
|
|
- /** @var Collection<int, Access> */
|
|
|
+ /**
|
|
|
+ * @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')]
|
|
|
@@ -165,54 +172,62 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
private Collection $children;
|
|
|
|
|
|
/** @var Collection<int, AccessPayer> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessPayer', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessPayer', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billingPayers;
|
|
|
|
|
|
/** @var Collection<int, AccessPayer> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessReceiver', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessReceiver', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billingReceivers;
|
|
|
|
|
|
/** @var Collection<int, AccessIntangible> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessIntangibles;
|
|
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'publicationDirectors')]
|
|
|
- #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
|
|
|
- private Parameters $publicationDirector;
|
|
|
+ #[ORM\JoinColumn(referencedColumnName: 'id')]
|
|
|
+ private ?Parameters $publicationDirector;
|
|
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'teachers')]
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
|
|
|
private ?EducationNotationConfig $educationNotationConfig;
|
|
|
|
|
|
/** @var Collection<int, CompanyPerson> */
|
|
|
- #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'company', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'company', cascade: ['persist', 'remove'])]
|
|
|
private Collection $companyPersonAccesses;
|
|
|
|
|
|
/** @var Collection<int, CompanyPerson> */
|
|
|
- #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $companyPersonCompany;
|
|
|
|
|
|
/** @var Collection<int, EducationStudent> */
|
|
|
- #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $educationStudent;
|
|
|
|
|
|
/** @var Collection<int, EducationStudent> */
|
|
|
- #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist'])]
|
|
|
private Collection $educationStudentByTeacher;
|
|
|
|
|
|
/** @var Collection<int, EducationTeacher> */
|
|
|
- #[ORM\OneToMany(targetEntity: EducationTeacher::class, mappedBy: 'teacher', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationTeacher::class, mappedBy: 'teacher', cascade: ['persist', 'remove'])]
|
|
|
private Collection $educationTeachers;
|
|
|
|
|
|
/** @var Collection<int, PersonHoliday> */
|
|
|
- #[ORM\OneToMany(targetEntity: PersonHoliday::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: PersonHoliday::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $holidays;
|
|
|
|
|
|
- /** @var Collection<int, Course> */
|
|
|
+ /**
|
|
|
+ * TODO: orphanRemoval?
|
|
|
+ *
|
|
|
+ * @var Collection<int, Course>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
|
|
|
private Collection $courses;
|
|
|
|
|
|
- /** @var Collection<int, Course> */
|
|
|
+ /**
|
|
|
+ * TODO: orphanRemoval?
|
|
|
+ *
|
|
|
+ * @var Collection<int, Course>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $practicalCourses;
|
|
|
|
|
|
@@ -220,7 +235,11 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
#[ORM\ManyToMany(targetEntity: Event::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $eventOrganizers;
|
|
|
|
|
|
- /** @var Collection<int, EducationalProject> */
|
|
|
+ /**
|
|
|
+ * TODO: orphanRemoval?
|
|
|
+ *
|
|
|
+ * @var Collection<int, EducationalProject>
|
|
|
+ */
|
|
|
#[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $educationalProjectOrganizers;
|
|
|
|
|
|
@@ -235,183 +254,201 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
private bool $ielEnabled = false;
|
|
|
|
|
|
/** @var Collection<int, EducationalProjectPayer> */
|
|
|
- #[ORM\OneToMany(targetEntity: EducationalProjectPayer::class, mappedBy: 'educationalProjectPayer', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProjectPayer::class, mappedBy: 'educationalProjectPayer', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billingEducationalProjectPayers;
|
|
|
|
|
|
/** @var Collection<int, Bill> */
|
|
|
- #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $bills;
|
|
|
|
|
|
/** @var Collection<int, BillLine> */
|
|
|
- #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billLines;
|
|
|
|
|
|
/** @var Collection<int, BillCredit> */
|
|
|
- #[ORM\OneToMany(targetEntity: BillCredit::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: BillCredit::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $billCredits;
|
|
|
|
|
|
/** @var Collection<int, EducationalProject> */
|
|
|
- #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'silentPartner', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'silentPartner', cascade: ['persist', 'remove'])]
|
|
|
private Collection $silentPartners;
|
|
|
|
|
|
/** @var Collection<int, EducationalProject> */
|
|
|
- #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'operationalPartner', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'operationalPartner', cascade: ['persist', 'remove'])]
|
|
|
private Collection $operationalPartners;
|
|
|
|
|
|
/** @var Collection<int, EventUser> */
|
|
|
- #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'guest', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'guest', cascade: ['persist', 'remove'])]
|
|
|
private Collection $eventUsers;
|
|
|
|
|
|
/** @var Collection<int, ExamenConvocation> */
|
|
|
- #[ORM\OneToMany(targetEntity: ExamenConvocation::class, mappedBy: 'student', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: ExamenConvocation::class, mappedBy: 'student', cascade: ['persist', 'remove'])]
|
|
|
private Collection $examenConvocations;
|
|
|
|
|
|
/** @var Collection<int, EquipmentRepair> */
|
|
|
- #[ORM\OneToMany(targetEntity: EquipmentRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EquipmentRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentRepairProviders;
|
|
|
|
|
|
/** @var Collection<int, Attendance> */
|
|
|
- #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $attendances;
|
|
|
|
|
|
/** @var Collection<int, AttendanceBooking> */
|
|
|
- #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $attendanceBookings;
|
|
|
|
|
|
/** @var Collection<int, Attendance> */
|
|
|
- #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'replacement', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'replacement', cascade: ['persist', 'remove'])]
|
|
|
private Collection $attendanceReplacements;
|
|
|
|
|
|
/** @var Collection<int, RoomRepair> */
|
|
|
- #[ORM\OneToMany(targetEntity: RoomRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: RoomRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'])]
|
|
|
private Collection $roomRepairProviders;
|
|
|
|
|
|
/** @var Collection<int, PlaceRepair> */
|
|
|
- #[ORM\OneToMany(targetEntity: PlaceRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: PlaceRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'])]
|
|
|
private Collection $placeRepairProviders;
|
|
|
|
|
|
/** @var Collection<int, Email> */
|
|
|
- #[ORM\OneToMany(targetEntity: Email::class, mappedBy: 'author', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Email::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $emails;
|
|
|
|
|
|
/** @var Collection<int, Mail> */
|
|
|
- #[ORM\OneToMany(targetEntity: Mail::class, mappedBy: 'author', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Mail::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $mails;
|
|
|
|
|
|
/** @var Collection<int, Sms> */
|
|
|
- #[ORM\OneToMany(targetEntity: Sms::class, mappedBy: 'author', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Sms::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $sms;
|
|
|
|
|
|
/** @var Collection<int, Jury> */
|
|
|
- #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', orphanRemoval: true)]
|
|
|
+ #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', cascade: ['persist'])]
|
|
|
private Collection $juryMembers;
|
|
|
|
|
|
/** @var Collection<int, Organization> */
|
|
|
- #[ORM\OneToMany(targetEntity: Organization::class, mappedBy: 'contactPerson', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Organization::class, mappedBy: 'contactPerson', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationContacts;
|
|
|
|
|
|
/** @var Collection<int, CommissionMember> */
|
|
|
- #[ORM\OneToMany(targetEntity: CommissionMember::class, mappedBy: 'member', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: CommissionMember::class, mappedBy: 'member', cascade: ['persist', 'remove'])]
|
|
|
private Collection $commissionMembers;
|
|
|
|
|
|
/** @var Collection<int, Equipment> */
|
|
|
- #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'supplier', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'supplier', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentSuppliers;
|
|
|
|
|
|
/** @var Collection<int, Equipment> */
|
|
|
- #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'controlManager', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'controlManager', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentControlManagers;
|
|
|
|
|
|
/** @var Collection<int, Equipment> */
|
|
|
- #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'editor', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'editor', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentEditors;
|
|
|
|
|
|
/** @var Collection<int, EquipmentLoan> */
|
|
|
- #[ORM\OneToMany(targetEntity: EquipmentLoan::class, mappedBy: 'borrower', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EquipmentLoan::class, mappedBy: 'borrower', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentLoans;
|
|
|
|
|
|
/** @var Collection<int, Equipment> */
|
|
|
- #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipments;
|
|
|
|
|
|
/** @var Collection<int, AccessFictionalIntangible> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessFictionalIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessFictionalIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessFictionalIntangibles;
|
|
|
|
|
|
/** @var Collection<int, Donor> */
|
|
|
- #[ORM\OneToMany(targetEntity: Donor::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Donor::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $donors;
|
|
|
|
|
|
/** @var Collection<int, AccessReward> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessRewards;
|
|
|
|
|
|
/** @var Collection<int, OrganizationResponsability> */
|
|
|
- #[ORM\OneToMany(targetEntity: OrganizationResponsability::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: OrganizationResponsability::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $organizationResponsabilities;
|
|
|
|
|
|
/** @var Collection<int, AccessWish> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessWish::class, mappedBy: 'accessOriginal', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessWish::class, mappedBy: 'accessOriginal', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accessWishes;
|
|
|
|
|
|
/** @var Collection<int, WorkByUser> */
|
|
|
- #[ORM\OneToMany(targetEntity: WorkByUser::class, mappedBy: 'student', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[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;
|
|
|
|
|
|
- // TODO: revoir le mapping, on ne peut pas mapper à une mapped superclass comme abstract booking
|
|
|
- // #[ORM\ManyToMany(mappedBy: 'organizer', targetEntity: AbstractBooking::class, cascade: ['persist'], orphanRemoval: false)]
|
|
|
- // private Collection $bookingOrganizers;
|
|
|
+ /** @var Collection<int, AbstractBooking> */
|
|
|
+ #[ORM\ManyToMany(targetEntity: AbstractBooking::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
+ private Collection $bookingOrganizers;
|
|
|
|
|
|
/** @var Collection<int, AdvancePayment> */
|
|
|
- #[ORM\OneToMany(targetEntity: AdvancePayment::class, mappedBy: 'access', cascade: [], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AdvancePayment::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $advancePayments;
|
|
|
|
|
|
/** @var Collection<int, AbstractMessage> */
|
|
|
- #[ORM\OneToMany(targetEntity: AbstractMessage::class, mappedBy: 'author', cascade: [], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractMessage::class, mappedBy: 'author', cascade: ['persist', 'remove'])]
|
|
|
private Collection $messages;
|
|
|
|
|
|
/** @var Collection<int, Equipment> */
|
|
|
- #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'managerControl', cascade: [], orphanRemoval: false)]
|
|
|
+ #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'managerControl', cascade: ['persist', 'remove'])]
|
|
|
private Collection $equipmentManagerControls;
|
|
|
|
|
|
/** @var Collection<int, EquipmentControl> */
|
|
|
- #[ORM\OneToMany(targetEntity: EquipmentControl::class, mappedBy: 'accompanist', cascade: [], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: EquipmentControl::class, mappedBy: 'accompanist', cascade: ['persist', 'remove'])]
|
|
|
private Collection $accompanistControl;
|
|
|
|
|
|
/** @var Collection<int, AccessReward> */
|
|
|
- #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private Collection $rewards;
|
|
|
|
|
|
- #[ORM\OneToOne(targetEntity: AccessSocial::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToOne(targetEntity: AccessSocial::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private ?AccessSocial $accessSocial;
|
|
|
|
|
|
- #[ORM\OneToOne(targetEntity: AccessNetworkSetting::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToOne(targetEntity: AccessNetworkSetting::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private ?AccessNetworkSetting $accessNetworkSetting;
|
|
|
|
|
|
- #[ORM\OneToOne(targetEntity: AccessCommunication::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToOne(targetEntity: AccessCommunication::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private ?AccessCommunication $accessCommunication;
|
|
|
|
|
|
- #[ORM\OneToOne(targetEntity: CalendarSynchro::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[ORM\OneToOne(targetEntity: CalendarSynchro::class, mappedBy: 'access', cascade: ['persist', 'remove'])]
|
|
|
private ?CalendarSynchro $calendarSynchro;
|
|
|
|
|
|
/** @var Collection<int, Token> */
|
|
|
- #[ORM\OneToMany(targetEntity: Token::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ #[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'], orphanRemoval: true)]
|
|
|
+ #[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()
|
|
|
{
|
|
|
@@ -468,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
|
|
|
@@ -2250,29 +2290,29 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- // public function getBookingOrganizers(): Collection
|
|
|
- // {
|
|
|
- // return $this->bookingOrganizers;
|
|
|
- // }
|
|
|
- //
|
|
|
- // public function addBookingOrganizer(AbstractBooking $bookingOrganizer): self
|
|
|
- // {
|
|
|
- // if (!$this->bookingOrganizers->contains($bookingOrganizer)) {
|
|
|
- // $this->bookingOrganizers[] = $bookingOrganizer;
|
|
|
- // $bookingOrganizer->addOrganizer($this);
|
|
|
- // }
|
|
|
- //
|
|
|
- // return $this;
|
|
|
- // }
|
|
|
- //
|
|
|
- // public function removeBookingOrganizer(AbstractBooking $bookingOrganizer): self
|
|
|
- // {
|
|
|
- // if ($this->bookingOrganizers->removeElement($bookingOrganizer)) {
|
|
|
- // $bookingOrganizer->removeOrganizer($this);
|
|
|
- // }
|
|
|
- //
|
|
|
- // return $this;
|
|
|
- // }
|
|
|
+ public function getBookingOrganizers(): Collection
|
|
|
+ {
|
|
|
+ return $this->bookingOrganizers;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addBookingOrganizer(AbstractBooking $bookingOrganizer): self
|
|
|
+ {
|
|
|
+ if (!$this->bookingOrganizers->contains($bookingOrganizer)) {
|
|
|
+ $this->bookingOrganizers[] = $bookingOrganizer;
|
|
|
+ $bookingOrganizer->addOrganizer($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeBookingOrganizer(AbstractBooking $bookingOrganizer): self
|
|
|
+ {
|
|
|
+ if ($this->bookingOrganizers->removeElement($bookingOrganizer)) {
|
|
|
+ $bookingOrganizer->removeOrganizer($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
|
|
|
public function getAdvancePayments(): Collection
|
|
|
{
|
|
|
@@ -2502,4 +2542,72 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
|
|
|
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;
|
|
|
+ }
|
|
|
}
|