|
|
@@ -18,7 +18,6 @@ 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;
|
|
|
@@ -29,7 +28,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 +36,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,11 +51,12 @@ 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\Token\Token;
|
|
|
+use App\Entity\Traits\CreatedOnAndByTrait;
|
|
|
use App\Filter\ApiPlatform\Person\FullNameFilter;
|
|
|
use App\Filter\ApiPlatform\Utils\InFilter;
|
|
|
use App\Repository\Access\AccessRepository;
|
|
|
@@ -75,7 +75,7 @@ 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]
|
|
|
@@ -101,7 +101,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
#[Groups(['private'])]
|
|
|
private bool $superAdminAccess = false;
|
|
|
|
|
|
- #[ORM\Column(type: "smallint", nullable: true)]
|
|
|
+ #[ORM\Column(nullable: true)]
|
|
|
#[Groups(['my_access:input'])]
|
|
|
private ?int $activityYear = null;
|
|
|
|
|
|
@@ -127,79 +127,100 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
private ?array $setting = [];
|
|
|
|
|
|
#[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
- private AccessBilling $accessBilling;
|
|
|
+ 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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
private Collection $accessIntangibles;
|
|
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'publicationDirectors')]
|
|
|
#[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
|
|
|
- private ?Parameters $publicationDirector;
|
|
|
+ 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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
private Collection $educationStudent;
|
|
|
|
|
|
+ /** @var Collection<int, EducationStudent> */
|
|
|
#[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
private Collection $holidays;
|
|
|
|
|
|
+ /** @var Collection<int, Course> */
|
|
|
#[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
|
|
|
private Collection $courses;
|
|
|
|
|
|
+ /** @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;
|
|
|
|
|
|
+ /** @var Collection<int, EducationalProject> */
|
|
|
#[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
|
|
|
private Collection $educationalProjectOrganizers;
|
|
|
|
|
|
@@ -213,141 +234,184 @@ 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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
private Collection $sms;
|
|
|
|
|
|
+ /** @var Collection<int, Jury> */
|
|
|
#[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
private Collection $workByUsers;
|
|
|
|
|
|
+ /** @var Collection<int, Tagg> */
|
|
|
#[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accesses', cascade: ['persist'])]
|
|
|
#[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)]
|
|
|
- private Collection $bookingOrganizers;
|
|
|
+ // 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;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'access', targetEntity: AdvancePayment::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AdvancePayment> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AdvancePayment::class, mappedBy: 'access', cascade: [], orphanRemoval: true)]
|
|
|
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: [], orphanRemoval: true)]
|
|
|
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: [], orphanRemoval: false)]
|
|
|
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: [], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
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'], orphanRemoval: true)]
|
|
|
+ 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'], orphanRemoval: true)]
|
|
|
+ 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'], orphanRemoval: true)]
|
|
|
+ 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'], orphanRemoval: true)]
|
|
|
+ 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'], orphanRemoval: true)]
|
|
|
private Collection $tokens;
|
|
|
|
|
|
#[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], fetch: 'EAGER', orphanRemoval: true)]
|
|
|
private ?Preferences $preferences;
|
|
|
|
|
|
+ /** @var Collection<int, AbstractReport> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractReport::class, mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ private Collection $reports;
|
|
|
+
|
|
|
#[Pure]
|
|
|
public function __construct()
|
|
|
{
|
|
|
@@ -1115,9 +1179,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @return Collection<int, Course>
|
|
|
- */
|
|
|
public function getPracticalCourses(): Collection
|
|
|
{
|
|
|
return $this->practicalCourses;
|
|
|
@@ -1224,12 +1285,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 +1340,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;
|
|
|
}
|
|
|
@@ -2199,29 +2250,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
|
|
|
{
|
|
|
@@ -2240,9 +2291,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 +2349,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 +2359,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 +2392,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 +2478,28 @@ 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;
|
|
|
+ }
|
|
|
}
|