|
@@ -7,8 +7,12 @@ namespace App\Entity\Organization;
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
|
use ApiPlatform\Metadata\Get;
|
|
use ApiPlatform\Metadata\Get;
|
|
|
use App\Entity\Access\Access;
|
|
use App\Entity\Access\Access;
|
|
|
|
|
+use App\Entity\Billing\BillingExportSetting;
|
|
|
use App\Entity\Billing\BillingSetting;
|
|
use App\Entity\Billing\BillingSetting;
|
|
|
|
|
+use App\Entity\Billing\BillSchedule;
|
|
|
|
|
+use App\Entity\Billing\FamilyQuotientModel;
|
|
|
use App\Entity\Booking\Attendance;
|
|
use App\Entity\Booking\Attendance;
|
|
|
|
|
+use App\Entity\Booking\AttendanceBookingReason;
|
|
|
use App\Entity\Booking\Course;
|
|
use App\Entity\Booking\Course;
|
|
|
use App\Entity\Booking\EducationalProject;
|
|
use App\Entity\Booking\EducationalProject;
|
|
|
use App\Entity\Booking\Event;
|
|
use App\Entity\Booking\Event;
|
|
@@ -26,12 +30,13 @@ use App\Entity\Education\EducationCategory;
|
|
|
use App\Entity\Education\EducationNotationConfig;
|
|
use App\Entity\Education\EducationNotationConfig;
|
|
|
use App\Entity\Education\EducationTiming;
|
|
use App\Entity\Education\EducationTiming;
|
|
|
use App\Entity\Education\PeriodNotation;
|
|
use App\Entity\Education\PeriodNotation;
|
|
|
|
|
+use App\Entity\Message\AbstractMessage;
|
|
|
use App\Entity\Message\Email;
|
|
use App\Entity\Message\Email;
|
|
|
use App\Entity\Message\Mail;
|
|
use App\Entity\Message\Mail;
|
|
|
use App\Entity\Message\Sms;
|
|
use App\Entity\Message\Sms;
|
|
|
use App\Entity\Network\NetworkOrganization;
|
|
use App\Entity\Network\NetworkOrganization;
|
|
|
use App\Entity\Person\Commission;
|
|
use App\Entity\Person\Commission;
|
|
|
-use App\Entity\Place\Place;
|
|
|
|
|
|
|
+use App\Entity\Place\AbstractPlace;
|
|
|
use App\Entity\Product\Equipment;
|
|
use App\Entity\Product\Equipment;
|
|
|
use App\Entity\Product\Intangible;
|
|
use App\Entity\Product\Intangible;
|
|
|
use App\Entity\Reward\Reward;
|
|
use App\Entity\Reward\Reward;
|
|
@@ -296,7 +301,7 @@ class Organization
|
|
|
#[ORM\OneToMany(mappedBy: 'organization', targetEntity: Commission::class, orphanRemoval: true)]
|
|
#[ORM\OneToMany(mappedBy: 'organization', targetEntity: Commission::class, orphanRemoval: true)]
|
|
|
private Collection $commissions;
|
|
private Collection $commissions;
|
|
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Place::class, orphanRemoval: true)]
|
|
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AbstractPlace::class, orphanRemoval: true)]
|
|
|
private Collection $places;
|
|
private Collection $places;
|
|
|
|
|
|
|
|
#[ORM\OneToMany(mappedBy: 'organization', targetEntity: Attendance::class, orphanRemoval: true)]
|
|
#[ORM\OneToMany(mappedBy: 'organization', targetEntity: Attendance::class, orphanRemoval: true)]
|
|
@@ -323,6 +328,39 @@ class Organization
|
|
|
#[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
|
|
#[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
|
|
|
private Collection $tags;
|
|
private Collection $tags;
|
|
|
|
|
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: NetworkOrganization::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $network;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'parent', targetEntity: NetworkOrganization::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $networkChild;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToOne(mappedBy: 'organization', targetEntity: BillingExportSetting::class, cascade: ['persist'])]
|
|
|
|
|
+ protected BillingExportSetting $billingExportSetting;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Access::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $access;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AbstractMessage::class, cascade: [], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $messages;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToOne(mappedBy: 'organization', targetEntity: OnlineRegistrationSettings::class, cascade: ['persist'])]
|
|
|
|
|
+ protected OnlineRegistrationSettings $onlineRegistrationSettings;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: CotisationByYear::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $cotisationByYears;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AttendanceBookingReason::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $attendanceBookingReasons;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Cycle::class, cascade: [], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $educationCurriculumPacks;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: FamilyQuotientModel::class, cascade: [], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $familyQuotientModels;
|
|
|
|
|
+
|
|
|
|
|
+ #[ORM\OneToMany(mappedBy: 'organization', targetEntity: BillSchedule::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
|
|
+ protected Collection $billSchedules;
|
|
|
|
|
+
|
|
|
#[Pure]
|
|
#[Pure]
|
|
|
public function __construct()
|
|
public function __construct()
|
|
|
{
|
|
{
|
|
@@ -362,6 +400,15 @@ class Organization
|
|
|
$this->donors = new ArrayCollection();
|
|
$this->donors = new ArrayCollection();
|
|
|
$this->tags = new ArrayCollection();
|
|
$this->tags = new ArrayCollection();
|
|
|
$this->rewards = new ArrayCollection();
|
|
$this->rewards = new ArrayCollection();
|
|
|
|
|
+ $this->network = new ArrayCollection();
|
|
|
|
|
+ $this->networkChild = new ArrayCollection();
|
|
|
|
|
+ $this->access = new ArrayCollection();
|
|
|
|
|
+ $this->messages = new ArrayCollection();
|
|
|
|
|
+ $this->cotisationByYears = new ArrayCollection();
|
|
|
|
|
+ $this->attendanceBookingReasons = new ArrayCollection();
|
|
|
|
|
+ $this->educationCurriculumPacks = new ArrayCollection();
|
|
|
|
|
+ $this->familyQuotientModels = new ArrayCollection();
|
|
|
|
|
+ $this->billSchedules = new ArrayCollection();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function getId(): ?int
|
|
public function getId(): ?int
|
|
@@ -438,6 +485,22 @@ class Organization
|
|
|
return $this->accesses;
|
|
return $this->accesses;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ function addAccess(Access $access): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->access->contains($access)) {
|
|
|
|
|
+ $this->access[] = $access;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeAccess(Access $access): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->access->removeElement($access);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function getNetworkOrganizations(): Collection
|
|
public function getNetworkOrganizations(): Collection
|
|
|
{
|
|
{
|
|
|
return $this->networkOrganizations;
|
|
return $this->networkOrganizations;
|
|
@@ -1197,28 +1260,6 @@ class Organization
|
|
|
return $this->subdomains;
|
|
return $this->subdomains;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function addAccess(Access $access): self
|
|
|
|
|
- {
|
|
|
|
|
- if (!$this->accesses->contains($access)) {
|
|
|
|
|
- $this->accesses[] = $access;
|
|
|
|
|
- $access->setOrganization($this);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return $this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public function removeAccess(Access $access): self
|
|
|
|
|
- {
|
|
|
|
|
- if ($this->accesses->removeElement($access)) {
|
|
|
|
|
- // set the owning side to null (unless already changed)
|
|
|
|
|
- if ($access->getOrganization() === $this) {
|
|
|
|
|
- $access->setOrganization(null);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return $this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public function getContactPerson(): ?Access
|
|
public function getContactPerson(): ?Access
|
|
|
{
|
|
{
|
|
|
return $this->contactPerson;
|
|
return $this->contactPerson;
|
|
@@ -1646,14 +1687,14 @@ class Organization
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @return Collection<int, Place>
|
|
|
|
|
|
|
+ * @return Collection<int, AbstractPlace>
|
|
|
*/
|
|
*/
|
|
|
public function getPlaces(): Collection
|
|
public function getPlaces(): Collection
|
|
|
{
|
|
{
|
|
|
return $this->places;
|
|
return $this->places;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function addPlace(Place $place): self
|
|
|
|
|
|
|
+ public function addPlace(AbstractPlace $place): self
|
|
|
{
|
|
{
|
|
|
if (!$this->places->contains($place)) {
|
|
if (!$this->places->contains($place)) {
|
|
|
$this->places[] = $place;
|
|
$this->places[] = $place;
|
|
@@ -1663,7 +1704,7 @@ class Organization
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function removePlace(Place $place): self
|
|
|
|
|
|
|
+ public function removePlace(AbstractPlace $place): self
|
|
|
{
|
|
{
|
|
|
if ($this->places->removeElement($place)) {
|
|
if ($this->places->removeElement($place)) {
|
|
|
// set the owning side to null (unless already changed)
|
|
// set the owning side to null (unless already changed)
|
|
@@ -1855,4 +1896,189 @@ class Organization
|
|
|
|
|
|
|
|
return $this;
|
|
return $this;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ function getNetwork(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->network;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addNetwork(NetworkOrganization $network): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->network->contains($network)) {
|
|
|
|
|
+ $this->network[] = $network;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeNetwork(NetworkOrganization $network): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->network->removeElement($network);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getNetworkChild(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->networkChild;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addNetworkChild(NetworkOrganization $networkChild): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->networkChild->contains($networkChild)) {
|
|
|
|
|
+ $this->networkChild[] = $networkChild;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeNetworkChild(NetworkOrganization $networkChild): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->networkChild->removeElement($networkChild);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getBillingExportSetting(): BillingExportSetting
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->billingExportSetting;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function setBillingExportSetting(BillingExportSetting $billingExportSetting): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->billingExportSetting = $billingExportSetting;
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getMessages(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->messages;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addMessage(mixed $message): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->messages->contains($message)) {
|
|
|
|
|
+ $this->messages[] = $message;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeMessage(mixed $message): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->messages->removeElement($message);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getOnlineRegistrationSettings(): OnlineRegistrationSettings
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->onlineRegistrationSettings;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function setOnlineRegistrationSettings(OnlineRegistrationSettings $onlineRegistrationSettings): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->onlineRegistrationSettings = $onlineRegistrationSettings;
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getCotisationByYears(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->cotisationByYears;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addCotisationByYear(CotisationByYear $cotisationByYear): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->cotisationByYears->contains($cotisationByYear)) {
|
|
|
|
|
+ $this->cotisationByYears[] = $cotisationByYear;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeCotisationByYear(CotisationByYear $cotisationByYear): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->cotisationByYears->removeElement($cotisationByYear);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getAttendanceBookingReasons(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->attendanceBookingReasons;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addAttendanceBookingReason(AttendanceBookingReason $attendanceBookingReason): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->attendanceBookingReasons->contains($attendanceBookingReason)) {
|
|
|
|
|
+ $this->attendanceBookingReasons[] = $attendanceBookingReason;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeAttendanceBookingReason(AttendanceBookingReason $attendanceBookingReason): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->attendanceBookingReasons->removeElement($attendanceBookingReason);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getEducationCurriculumPacks(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->educationCurriculumPacks;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addEducationCurriculumPack(Cycle $educationCurriculumPack): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->educationCurriculumPacks->contains($educationCurriculumPack)) {
|
|
|
|
|
+ $this->educationCurriculumPacks[] = $educationCurriculumPack;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeEducationCurriculumPack(Cycle $educationCurriculumPack): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->educationCurriculumPacks->removeElement($educationCurriculumPack);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getFamilyQuotientModels(): Collection
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->familyQuotientModels;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addFamilyQuotientModel(FamilyQuotientModel $familyQuotientModel): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->familyQuotientModels->contains($familyQuotientModel)) {
|
|
|
|
|
+ $this->familyQuotientModels[] = $familyQuotientModel;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeFamilyQuotientModel(FamilyQuotientModel $familyQuotientModel): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->familyQuotientModels->removeElement($familyQuotientModel);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addBillSchedule(BillSchedule $billSchedule): self
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$this->billSchedules->contains($billSchedule)) {
|
|
|
|
|
+ $this->billSchedules[] = $billSchedule;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeBillSchedule(BillSchedule $billSchedule): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->billSchedules->removeElement($billSchedule);
|
|
|
|
|
+
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|