not sure what I did here
This commit is contained in:
@ -91,10 +91,31 @@ class MemberCase
|
||||
#[ORM\OneToMany(targetEntity: Referral::class, mappedBy: 'memberCase', orphanRemoval: true)]
|
||||
private Collection $referrals;
|
||||
|
||||
/**
|
||||
* @var Collection<int, MonthlyCaseNote>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: MonthlyCaseNote::class, mappedBy: 'memberCase')]
|
||||
private Collection $monthlyCaseNotes;
|
||||
|
||||
/**
|
||||
* @var Collection<int, Member>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: Member::class, mappedBy: 'memberCase', orphanRemoval: true)]
|
||||
private Collection $members;
|
||||
|
||||
/**
|
||||
* @var Collection<int, StaffNote>
|
||||
*/
|
||||
#[ORM\OneToMany(targetEntity: StaffNote::class, mappedBy: 'memberCase')]
|
||||
private Collection $staffNotes;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->userCases = new ArrayCollection();
|
||||
$this->referrals = new ArrayCollection();
|
||||
$this->monthlyCaseNotes = new ArrayCollection();
|
||||
$this->members = new ArrayCollection();
|
||||
$this->staffNotes = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?Uuid
|
||||
@ -394,4 +415,94 @@ class MemberCase
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, MonthlyCaseNote>
|
||||
*/
|
||||
public function getMonthlyCaseNotes(): Collection
|
||||
{
|
||||
return $this->monthlyCaseNotes;
|
||||
}
|
||||
|
||||
public function addMonthlyCaseNote(MonthlyCaseNote $monthlyCaseNote): static
|
||||
{
|
||||
if (!$this->monthlyCaseNotes->contains($monthlyCaseNote)) {
|
||||
$this->monthlyCaseNotes->add($monthlyCaseNote);
|
||||
$monthlyCaseNote->setMemberCase($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeMonthlyCaseNote(MonthlyCaseNote $monthlyCaseNote): static
|
||||
{
|
||||
if ($this->monthlyCaseNotes->removeElement($monthlyCaseNote)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($monthlyCaseNote->getMemberCase() === $this) {
|
||||
$monthlyCaseNote->setMemberCase(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, Member>
|
||||
*/
|
||||
public function getMembers(): Collection
|
||||
{
|
||||
return $this->members;
|
||||
}
|
||||
|
||||
public function addMember(Member $member): static
|
||||
{
|
||||
if (!$this->members->contains($member)) {
|
||||
$this->members->add($member);
|
||||
$member->setCaseId($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeMember(Member $member): static
|
||||
{
|
||||
if ($this->members->removeElement($member)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($member->getCaseId() === $this) {
|
||||
$member->setCaseId(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, StaffNote>
|
||||
*/
|
||||
public function getStaffNotes(): Collection
|
||||
{
|
||||
return $this->staffNotes;
|
||||
}
|
||||
|
||||
public function addStaffNote(StaffNote $staffNote): static
|
||||
{
|
||||
if (!$this->staffNotes->contains($staffNote)) {
|
||||
$this->staffNotes->add($staffNote);
|
||||
$staffNote->setMemberCase($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeStaffNote(StaffNote $staffNote): static
|
||||
{
|
||||
if ($this->staffNotes->removeElement($staffNote)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($staffNote->getMemberCase() === $this) {
|
||||
$staffNote->setMemberCase(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@ -140,6 +140,13 @@ class Note
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setMembers(?array $members): static
|
||||
{
|
||||
$this->members = $members;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLocation(): ?NoteLocation
|
||||
{
|
||||
return $this->location;
|
||||
@ -166,10 +173,10 @@ class Note
|
||||
|
||||
/**
|
||||
* Method to calculate the number of minutes used for a visit rounded to the nearest 15 min increment
|
||||
*
|
||||
*
|
||||
* @param int $precision
|
||||
* The number of minutes to round the time to defaulted to 15
|
||||
*
|
||||
*
|
||||
* @return int
|
||||
* The number of minutes calculated
|
||||
*/
|
||||
|
Reference in New Issue
Block a user