<?php
namespace App\Entity;
use App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\FinancialScopeRepository;
/**
* @ORM\Entity(repositoryClass=FinancialScopeRepository::class)
* @ORM\Table(name="financial_scope")
*/
class FinancialScope
{
/** @ORM\Id @ORM\GeneratedValue @ORM\Column(type="integer") */
private $id;
/** @ORM\Column(type="string", length=30) */
private $scopeType; // 'program','section','cycle','level','classRoom'
/** @ORM\Column(type="integer") */
private $scopeId;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
*/
private $financialManager;
public function getId(): ?int { return $this->id; }
public function getScopeType(): ?string { return $this->scopeType; }
public function setScopeType(string $t): self { $this->scopeType = $t; return $this; }
public function getScopeId(): ?int { return $this->scopeId; }
public function setScopeId(int $id): self { $this->scopeId = $id; return $this; }
public function getFinancialManager(): ?User { return $this->financialManager; }
public function setFinancialManager(User $u): self { $this->financialManager = $u; return $this; }
public function getDisplayName(): string
{
return ucfirst($this->scopeType) . ' #' . $this->scopeId;
}
}