reconfigure
This commit is contained in:
parent
758a439187
commit
91723ed9be
@ -6,8 +6,6 @@ use App\Enums\NoteLocation;
|
|||||||
use App\Enums\NoteMethod;
|
use App\Enums\NoteMethod;
|
||||||
use App\Enums\NoteStatus;
|
use App\Enums\NoteStatus;
|
||||||
use App\Repository\NoteRepository;
|
use App\Repository\NoteRepository;
|
||||||
use DateTime;
|
|
||||||
use Doctrine\Common\Collections\Collection;
|
|
||||||
use Doctrine\DBAL\Types\Types;
|
use Doctrine\DBAL\Types\Types;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Doctrine\ORM\Mapping\MappedSuperclass;
|
use Doctrine\ORM\Mapping\MappedSuperclass;
|
||||||
@ -39,18 +37,19 @@ class Note
|
|||||||
#[ORM\Column(enumType: NoteStatus::class)]
|
#[ORM\Column(enumType: NoteStatus::class)]
|
||||||
private ?NoteStatus $status = null;
|
private ?NoteStatus $status = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Collection<int, Member>
|
|
||||||
*/
|
|
||||||
#[ORM\OneToMany(targetEntity: Member::class, mappedBy: 'note')]
|
|
||||||
public Collection $members;
|
|
||||||
|
|
||||||
#[ORM\Column(enumType: NoteLocation::class)]
|
#[ORM\Column(enumType: NoteLocation::class)]
|
||||||
private ?NoteLocation $location = null;
|
private ?NoteLocation $location = null;
|
||||||
|
|
||||||
#[ORM\Column(enumType: NoteMethod::class)]
|
#[ORM\Column(enumType: NoteMethod::class)]
|
||||||
private ?NoteMethod $method = null;
|
private ?NoteMethod $method = null;
|
||||||
|
|
||||||
|
private ?array $members = null;
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->members = [];
|
||||||
|
}
|
||||||
|
|
||||||
public function getId(): ?UUid
|
public function getId(): ?UUid
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
@ -116,37 +115,6 @@ class Note
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return Collection<int, Member>
|
|
||||||
*/
|
|
||||||
public function getMembers(): Collection
|
|
||||||
{
|
|
||||||
return $this->members;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addUser(Member $member): static
|
|
||||||
{
|
|
||||||
if (!$this->members->contains($member)) {
|
|
||||||
$this->members->add($member);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeUser(Member $member): static
|
|
||||||
{
|
|
||||||
$this->members->removeElement($member);
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setMembers(?array $members): static
|
|
||||||
{
|
|
||||||
$this->members = $members;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getLocation(): ?NoteLocation
|
public function getLocation(): ?NoteLocation
|
||||||
{
|
{
|
||||||
return $this->location;
|
return $this->location;
|
||||||
@ -171,6 +139,25 @@ class Note
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getMembers(): ?array
|
||||||
|
{
|
||||||
|
return $this->members;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setMembers(?array $members): static
|
||||||
|
{
|
||||||
|
$this->members = $members;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addMember(Member $member): static
|
||||||
|
{
|
||||||
|
$this->members[] = $member;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to calculate the number of minutes used for a visit rounded to the nearest 15 min increment
|
* Method to calculate the number of minutes used for a visit rounded to the nearest 15 min increment
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user