mv: Refactor

* Move entities for organization
This commit is contained in:
2025-01-28 20:47:26 -05:00
parent ee2fce4c41
commit bcc32bf445
23 changed files with 345 additions and 87 deletions

View 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;
}
}