mv: Refactor
* Move entities for organization
This commit is contained in:
parent
ee2fce4c41
commit
bcc32bf445
@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Repository\CaseItineraryRepository;
|
||||
use App\Entity\System\Location;
|
||||
use App\Repository\Case\CaseItineraryRepository;
|
||||
use DateTime;
|
||||
use DateInterval;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@ -19,6 +21,9 @@ class CaseItinerary
|
||||
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
|
||||
private ?Uuid $id = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $date = null;
|
||||
|
||||
#[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $departure = null;
|
||||
|
||||
@ -26,9 +31,6 @@ class CaseItinerary
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Location $originLocation = null;
|
||||
|
||||
#[ORM\Column(type: Types::TIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $arrival = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?Location $destLocation = null;
|
||||
@ -43,9 +45,6 @@ class CaseItinerary
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?MemberCase $memberCase = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $date = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?float $distance = null;
|
||||
|
||||
@ -81,18 +80,6 @@ class CaseItinerary
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getArrival(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->arrival;
|
||||
}
|
||||
|
||||
public function setArrival(?\DateTimeInterface $arrival): static
|
||||
{
|
||||
$this->arrival = $arrival;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDestLocation(): ?Location
|
||||
{
|
||||
return $this->destLocation;
|
||||
@ -132,7 +119,7 @@ class CaseItinerary
|
||||
|
||||
public function calcDuration()
|
||||
{
|
||||
$this->duration = $this->departure - $this->arrival;
|
||||
//$this->duration = $this->departure - $this->arrival;
|
||||
}
|
||||
|
||||
public function getMemberCase(): ?MemberCase
|
||||
@ -203,10 +190,13 @@ class CaseItinerary
|
||||
|
||||
public function destinationInfoWindow(): string
|
||||
{
|
||||
/** @var DateTime $arrival */
|
||||
$arrival = $this->departure;
|
||||
$arrival->add($this->duration);
|
||||
return <<<EOL
|
||||
{$this->destLocation->getName()}<br/>
|
||||
<a href='http://maps.google.com/?q={$this->destLocation->getLat()},{$this->destLocation->getLon()}'>{$this->destLocation->getFormattedAddress()}</a><br/>
|
||||
{$this->arrival->format("g:i a")}
|
||||
{$arrival->format("g:i a")}
|
||||
EOL;
|
||||
}
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Repository\CaseLocationRepository;
|
||||
use App\Entity\System\Location;
|
||||
use App\Repository\Case\CaseLocationRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Enums\GenderType;
|
||||
use App\Enums\RaceType;
|
||||
use App\Enums\RelationshipType;
|
||||
use App\Repository\MemberRepository;
|
||||
use App\Enums\System\GenderType;
|
||||
use App\Enums\Case\RaceType;
|
||||
use App\Enums\Case\RelationshipType;
|
||||
use App\Repository\Case\MemberRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
@ -1,11 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Enums\CaseLevel;
|
||||
use App\Enums\County;
|
||||
use App\Entity\Staff\StaffNote;
|
||||
use App\Entity\System\ReferralSource;
|
||||
use App\Entity\System\UserCase;
|
||||
use App\Enums\Case\CaseLevel;
|
||||
use App\Enums\System\County;
|
||||
use App\Enums\Case\ReferralType;
|
||||
use App\Repository\MemberCaseRepository;
|
||||
use App\Repository\Case\MemberCaseRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
@ -506,4 +509,10 @@ class MemberCase
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function emptyStaffNotes(): static
|
||||
{
|
||||
$this->staffNotes->clear();
|
||||
return $this;
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Repository\MemberDocumentRepository;
|
||||
use App\Entity\Company\CompanyDocument;
|
||||
use App\Entity\System\User;
|
||||
use App\Repository\Case\MemberDocumentRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
@ -41,6 +43,9 @@ class MemberDocument
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?array $workerSignature = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $docData = null;
|
||||
|
||||
public function getId(): ?Uuid
|
||||
{
|
||||
return $this->id;
|
||||
@ -129,4 +134,16 @@ class MemberDocument
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDocData(): ?string
|
||||
{
|
||||
return $this->docData;
|
||||
}
|
||||
|
||||
public function setDocData(?string $docData): static
|
||||
{
|
||||
$this->docData = $docData;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
115
src/Entity/Case/MonthlyCaseNote.php
Normal file
115
src/Entity/Case/MonthlyCaseNote.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Repository\Case\MonthlyCaseNoteRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: MonthlyCaseNoteRepository::class)]
|
||||
class MonthlyCaseNote
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(type: UuidType::NAME, unique: true)]
|
||||
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
|
||||
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
|
||||
private ?Uuid $id = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $reason = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $familyStrength = null;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $recAndProgress = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'monthlyCaseNotes')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?MemberCase $memberCase = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $date = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $nextVisit = null;
|
||||
|
||||
public function getId(): ?Uuid
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getReason(): ?string
|
||||
{
|
||||
return $this->reason;
|
||||
}
|
||||
|
||||
public function setReason(?string $reason): static
|
||||
{
|
||||
$this->reason = $reason;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFamilyStrength(): ?string
|
||||
{
|
||||
return $this->familyStrength;
|
||||
}
|
||||
|
||||
public function setFamilyStrength(?string $familyStrength): static
|
||||
{
|
||||
$this->familyStrength = $familyStrength;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRecAndProgress(): ?string
|
||||
{
|
||||
return $this->recAndProgress;
|
||||
}
|
||||
|
||||
public function setRecAndProgress(?string $recAndProgress): static
|
||||
{
|
||||
$this->recAndProgress = $recAndProgress;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMemberCase(): ?MemberCase
|
||||
{
|
||||
return $this->memberCase;
|
||||
}
|
||||
|
||||
public function setMemberCase(?MemberCase $memberCase): static
|
||||
{
|
||||
$this->memberCase = $memberCase;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTimeInterface $date): static
|
||||
{
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNextVisit(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->nextVisit;
|
||||
}
|
||||
|
||||
public function setNextVisit(\DateTimeInterface $nextVisit): static
|
||||
{
|
||||
$this->nextVisit = $nextVisit;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Enums\NoteLocation;
|
||||
use App\Enums\NoteMethod;
|
||||
use App\Enums\NoteStatus;
|
||||
use App\Repository\NoteRepository;
|
||||
use App\Enums\Case\NoteLocation;
|
||||
use App\Enums\Case\NoteMethod;
|
||||
use App\Enums\Case\NoteStatus;
|
||||
use App\Repository\Case\NoteRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\ORM\Mapping\MappedSuperclass;
|
@ -1,12 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Enums\DischargeReason;
|
||||
use App\Enums\ReferralServiceType;
|
||||
use App\Repository\ReferralRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use App\Enums\Case\DischargeReason;
|
||||
use App\Enums\Case\ReferralServiceType;
|
||||
use App\Repository\Case\ReferralRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Enums\ReferralServiceType;
|
||||
use App\Repository\StandardNoteRepository;
|
||||
use App\Enums\Case\ReferralServiceType;
|
||||
use App\Repository\Case\StandardNoteRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JsonSerializable;
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Repository\StandardNoteMemberRepository;
|
||||
use App\Repository\Case\StandardNoteMemberRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Enums\ReferralServiceType;
|
||||
use App\Enums\VisitQualityLevel;
|
||||
use App\Repository\VisitNoteRepository;
|
||||
use App\Enums\Case\ReferralServiceType;
|
||||
use App\Enums\Case\VisitQualityLevel;
|
||||
use App\Repository\Case\VisitNoteRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use JsonSerializable;
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Case;
|
||||
|
||||
use App\Repository\VisitNoteMembersRepository;
|
||||
use App\Repository\Case\VisitNoteMembersRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Company;
|
||||
|
||||
use App\Repository\CompanyRepository;
|
||||
use App\Entity\System\User;
|
||||
use App\Repository\Company\CompanyRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Company;
|
||||
|
||||
use App\Enums\DocumentExtras;
|
||||
use App\Repository\CompanyDocumentRepository;
|
||||
use App\Enums\Company\DocumentExtras;
|
||||
use App\Repository\Company\CompanyDocumentRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Resources;
|
||||
|
||||
use App\Enums\County;
|
||||
use App\Enums\ResourceType;
|
||||
use App\Enums\State;
|
||||
use App\Entity\System\Location;
|
||||
use App\Enums\System\County;
|
||||
use App\Enums\Case\ResourceType;
|
||||
use App\Enums\System\State;
|
||||
use App\Libs\Libs;
|
||||
use App\Repository\CommunityResourceRepository;
|
||||
use App\Repository\Resources\CommunityResourceRepository;
|
||||
use DateTime;
|
||||
use DateTimeZone;
|
||||
use Doctrine\DBAL\Types\Types;
|
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Staff;
|
||||
|
||||
use App\Enums\ReferralServiceType;
|
||||
use App\Repository\StaffNoteRepository;
|
||||
use App\Entity\Case\MemberCase;
|
||||
use App\Enums\Case\ReferralServiceType;
|
||||
use App\Repository\Staff\StaffNoteRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\Staff;
|
||||
|
||||
use App\Repository\SupervisionRepository;
|
||||
use App\Entity\System\User;
|
||||
use App\Repository\Staff\SupervisionRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\System;
|
||||
|
||||
use App\Enums\State;
|
||||
use App\Repository\LocationRepository;
|
||||
use App\Enums\System\State;
|
||||
use App\Repository\System\LocationRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\System;
|
||||
|
||||
use App\Enums\MessageType;
|
||||
use App\Repository\MessagesRepository;
|
||||
use App\Enums\System\MessageType;
|
||||
use App\Repository\System\MessagesRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\System;
|
||||
|
||||
use App\Repository\ReferralSourceRepository;
|
||||
use App\Repository\System\ReferralSourceRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
86
src/Entity/System/Subscription.php
Normal file
86
src/Entity/System/Subscription.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\System;
|
||||
|
||||
use App\Enums\System\UserSubscriptions;
|
||||
use App\Repository\System\SubscriptionRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Types\UuidType;
|
||||
use Symfony\Component\Uid\Uuid;
|
||||
|
||||
#[ORM\Entity(repositoryClass: SubscriptionRepository::class)]
|
||||
class Subscription
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\Column(type: UuidType::NAME, unique: true)]
|
||||
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
|
||||
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
|
||||
private ?Uuid $id = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'subscriptions')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?User $user = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $active = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $expiration = null;
|
||||
|
||||
#[ORM\Column(enumType: UserSubscriptions::class)]
|
||||
private ?UserSubscriptions $level = null;
|
||||
|
||||
public function getId(): ?Uuid
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getUser(): ?User
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
public function setUser(?User $user): static
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isActive(): ?bool
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
public function setActive(bool $active): static
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getExpiration(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->expiration;
|
||||
}
|
||||
|
||||
public function setExpiration(\DateTimeInterface $expiration): static
|
||||
{
|
||||
$this->expiration = $expiration;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLevel(): ?UserSubscriptions
|
||||
{
|
||||
return $this->level;
|
||||
}
|
||||
|
||||
public function setLevel(UserSubscriptions $level): static
|
||||
{
|
||||
$this->level = $level;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\System;
|
||||
|
||||
use App\Repository\UserRepository;
|
||||
use App\Enums\RateType;
|
||||
use App\Enums\CaseLevel;
|
||||
use App\Entity\Company\Company;
|
||||
use App\Repository\System\UserRepository;
|
||||
use App\Enums\System\RateType;
|
||||
use App\Enums\Case\CaseLevel;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
@ -95,9 +96,16 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
|
||||
private ?User $supervisor = null;
|
||||
|
||||
/**
|
||||
* @var Collection<int, Subscription>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Subscription::class, mappedBy: 'user', orphanRemoval: true)]
|
||||
private Collection $subscriptions;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->userCases = new ArrayCollection();
|
||||
$this->subscriptions = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?Uuid
|
||||
@ -441,4 +449,34 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
($this->imageName ? "\nPHOTO;TYPE={$fileExt};ENCODING=b:{$b64image}" : null) .
|
||||
"\nEND:VCARD";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, Subscription>
|
||||
*/
|
||||
public function getSubscriptions(): Collection
|
||||
{
|
||||
return $this->subscriptions;
|
||||
}
|
||||
|
||||
public function addSubscription(Subscription $subscription): static
|
||||
{
|
||||
if (!$this->subscriptions->contains($subscription)) {
|
||||
$this->subscriptions->add($subscription);
|
||||
$subscription->setUser($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSubscription(Subscription $subscription): static
|
||||
{
|
||||
if ($this->subscriptions->removeElement($subscription)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($subscription->getUser() === $this) {
|
||||
$subscription->setUser(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
namespace App\Entity\System;
|
||||
|
||||
use App\Enums\CaseLevel;
|
||||
use App\Repository\UserCaseRepository;
|
||||
use App\Entity\Case\MemberCase;
|
||||
use App\Repository\System\UserCaseRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: UserCaseRepository::class)]
|
Loading…
Reference in New Issue
Block a user