mv: Refactor
* Move entities for organization
This commit is contained in:
132
src/Entity/Staff/StaffNote.php
Normal file
132
src/Entity/Staff/StaffNote.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Staff;
|
||||
|
||||
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;
|
||||
|
||||
#[ORM\Entity(repositoryClass: StaffNoteRepository::class)]
|
||||
class StaffNote
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $date = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'staffNotes')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?MemberCase $memberCase = null;
|
||||
|
||||
#[ORM\Column(type: Types::SIMPLE_ARRAY, enumType: ReferralServiceType::class)]
|
||||
private array $servicesProvided = [];
|
||||
|
||||
#[ORM\Column(type: Types::TEXT)]
|
||||
private ?string $note = null;
|
||||
|
||||
#[ORM\Column(length: 500, nullable: true)]
|
||||
private ?string $recommendations = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $workerSignDatetime = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $supervisorSignDateTime = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTimeInterface $date): static
|
||||
{
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getMemberCase(): ?MemberCase
|
||||
{
|
||||
return $this->memberCase;
|
||||
}
|
||||
|
||||
public function setMemberCase(?MemberCase $memberCase): static
|
||||
{
|
||||
$this->memberCase = $memberCase;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ReferralServiceType[]
|
||||
*/
|
||||
public function getServicesProvided(): array
|
||||
{
|
||||
return $this->servicesProvided;
|
||||
}
|
||||
|
||||
public function setServicesProvided(array $servicesProvided): static
|
||||
{
|
||||
$this->servicesProvided = $servicesProvided;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getNote(): ?string
|
||||
{
|
||||
return $this->note;
|
||||
}
|
||||
|
||||
public function setNote(string $note): static
|
||||
{
|
||||
$this->note = $note;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRecommendations(): ?string
|
||||
{
|
||||
return $this->recommendations;
|
||||
}
|
||||
|
||||
public function setRecommendations(string $recommendations): static
|
||||
{
|
||||
$this->recommendations = $recommendations;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWorkerSignDatetime(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->workerSignDatetime;
|
||||
}
|
||||
|
||||
public function setWorkerSignDatetime(?\DateTimeInterface $workerSignDatetime): static
|
||||
{
|
||||
$this->workerSignDatetime = $workerSignDatetime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getSupervisorSignDateTime(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->supervisorSignDateTime;
|
||||
}
|
||||
|
||||
public function setSupervisorSignDateTime(?\DateTimeInterface $supervisorSignDateTime): static
|
||||
{
|
||||
$this->supervisorSignDateTime = $supervisorSignDateTime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
56
src/Entity/Staff/Supervision.php
Normal file
56
src/Entity/Staff/Supervision.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Staff;
|
||||
|
||||
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;
|
||||
|
||||
#[ORM\Entity(repositoryClass: SupervisionRepository::class)]
|
||||
class Supervision
|
||||
{
|
||||
#[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]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?User $supervisor = null;
|
||||
|
||||
#[ORM\OneToOne(cascade: ['persist', 'remove'])]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?User $worker = null;
|
||||
|
||||
public function getId(): ?Uuid
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getSupervisor(): ?User
|
||||
{
|
||||
return $this->supervisor;
|
||||
}
|
||||
|
||||
public function setSupervisor(?User $supervisor): static
|
||||
{
|
||||
$this->supervisor = $supervisor;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getWorker(): ?User
|
||||
{
|
||||
return $this->worker;
|
||||
}
|
||||
|
||||
public function setWorker(User $worker): static
|
||||
{
|
||||
$this->worker = $worker;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user