|
|
@@ -10,6 +10,7 @@ use App\Entity\Access\Access;
|
|
|
use App\Entity\Billing\BillingExportSetting;
|
|
|
use App\Entity\Billing\BillingSetting;
|
|
|
use App\Entity\Billing\BillSchedule;
|
|
|
+use App\Entity\Billing\FamilyQuotientBandDetail;
|
|
|
use App\Entity\Billing\FamilyQuotientModel;
|
|
|
use App\Entity\Booking\Attendance;
|
|
|
use App\Entity\Booking\AttendanceBookingReason;
|
|
|
@@ -31,6 +32,7 @@ use App\Entity\Education\EducationNotationConfig;
|
|
|
use App\Entity\Education\EducationTiming;
|
|
|
use App\Entity\Education\PeriodNotation;
|
|
|
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;
|
|
|
@@ -336,7 +338,7 @@ class Organization
|
|
|
#[ORM\OneToMany(targetEntity: Commission::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
|
|
private Collection $commissions;
|
|
|
|
|
|
- /** @var Collection<int, Place> */
|
|
|
+ /** @var Collection<int, AbstractPlace> */
|
|
|
#[ORM\OneToMany(mappedBy: 'organization', targetEntity: AbstractPlace::class, orphanRemoval: true)]
|
|
|
private Collection $places;
|
|
|
|
|
|
@@ -370,39 +372,52 @@ class Organization
|
|
|
#[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
|
|
|
private Collection $tags;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: NetworkOrganization::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, NetworkOrganization> */
|
|
|
+ #[ORM\OneToMany(targetEntity: NetworkOrganization::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $network;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'parent', targetEntity: NetworkOrganization::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, NetworkOrganization> */
|
|
|
+ #[ORM\OneToMany(targetEntity: NetworkOrganization::class, mappedBy: 'parent', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $networkChild;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'organization', targetEntity: BillingExportSetting::class, cascade: ['persist'])]
|
|
|
- protected BillingExportSetting $billingExportSetting;
|
|
|
+ #[ORM\OneToOne(targetEntity: BillingExportSetting::class, mappedBy: 'organization', cascade: ['persist'])]
|
|
|
+ protected ?BillingExportSetting $billingExportSetting;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Access::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Access> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Access::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $access;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AbstractMessage::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AbstractMessage> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractMessage::class, mappedBy: 'organization', cascade: [], orphanRemoval: true)]
|
|
|
protected Collection $messages;
|
|
|
|
|
|
- #[ORM\OneToOne(mappedBy: 'organization', targetEntity: OnlineRegistrationSettings::class, cascade: ['persist'])]
|
|
|
- protected OnlineRegistrationSettings $onlineRegistrationSettings;
|
|
|
+ #[ORM\OneToOne(targetEntity: OnlineRegistrationSettings::class, mappedBy: 'organization', cascade: ['persist'])]
|
|
|
+ protected ?OnlineRegistrationSettings $onlineRegistrationSettings;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: CotisationByYear::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, CotisationByYear> */
|
|
|
+ #[ORM\OneToMany(targetEntity: CotisationByYear::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $cotisationByYears;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: AttendanceBookingReason::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, AttendanceBookingReason> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AttendanceBookingReason::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $attendanceBookingReasons;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Cycle::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, Cycle> */
|
|
|
+ #[ORM\OneToMany(targetEntity: Cycle::class, mappedBy: 'organization', cascade: [], orphanRemoval: true)]
|
|
|
protected Collection $educationCurriculumPacks;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: FamilyQuotientModel::class, cascade: [], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, FamilyQuotientModel> */
|
|
|
+ #[ORM\OneToMany(targetEntity: FamilyQuotientModel::class, mappedBy: 'organization', cascade: [], orphanRemoval: true)]
|
|
|
protected Collection $familyQuotientModels;
|
|
|
|
|
|
- #[ORM\OneToMany(mappedBy: 'organization', targetEntity: BillSchedule::class, cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ /** @var Collection<int, BillSchedule> */
|
|
|
+ #[ORM\OneToMany(targetEntity: BillSchedule::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
|
|
|
protected Collection $billSchedules;
|
|
|
|
|
|
+ /** @var Collection<int, AbstractReport> */
|
|
|
+ #[ORM\OneToMany(targetEntity: AbstractReport::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
|
|
|
+ private Collection $reports;
|
|
|
+
|
|
|
#[Pure]
|
|
|
public function __construct()
|
|
|
{
|
|
|
@@ -2001,12 +2016,12 @@ class Organization
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getBillingExportSetting(): BillingExportSetting
|
|
|
+ public function getBillingExportSetting(): ?BillingExportSetting
|
|
|
{
|
|
|
return $this->billingExportSetting;
|
|
|
}
|
|
|
|
|
|
- public function setBillingExportSetting(BillingExportSetting $billingExportSetting): self
|
|
|
+ public function setBillingExportSetting(?BillingExportSetting $billingExportSetting): self
|
|
|
{
|
|
|
$this->billingExportSetting = $billingExportSetting;
|
|
|
|
|
|
@@ -2037,12 +2052,12 @@ class Organization
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getOnlineRegistrationSettings(): OnlineRegistrationSettings
|
|
|
+ public function getOnlineRegistrationSettings(): ?OnlineRegistrationSettings
|
|
|
{
|
|
|
return $this->onlineRegistrationSettings;
|
|
|
}
|
|
|
|
|
|
- public function setOnlineRegistrationSettings(OnlineRegistrationSettings $onlineRegistrationSettings): self
|
|
|
+ public function setOnlineRegistrationSettings(?OnlineRegistrationSettings $onlineRegistrationSettings): self
|
|
|
{
|
|
|
$this->onlineRegistrationSettings = $onlineRegistrationSettings;
|
|
|
|
|
|
@@ -2168,4 +2183,28 @@ class Organization
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
+
|
|
|
+ public function getReports(): Collection
|
|
|
+ {
|
|
|
+ return $this->reports;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function addReport(AbstractReport $report): self
|
|
|
+ {
|
|
|
+ if (!$this->reports->contains($report)) {
|
|
|
+ $this->reports[] = $report;
|
|
|
+ $report->setOrganization($this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function removeReport(AbstractReport $report): self
|
|
|
+ {
|
|
|
+ if ($this->reports->removeElement($report)) {
|
|
|
+ $report->setOrganization(null);
|
|
|
+ }
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
}
|