src/Entity/FinancialScope.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use App\Repository\FinancialScopeRepository;
  6. /**
  7. * @ORM\Entity(repositoryClass=FinancialScopeRepository::class)
  8. * @ORM\Table(name="financial_scope")
  9. */
  10. class FinancialScope
  11. {
  12. /** @ORM\Id @ORM\GeneratedValue @ORM\Column(type="integer") */
  13. private $id;
  14. /** @ORM\Column(type="string", length=30) */
  15. private $scopeType; // 'program','section','cycle','level','classRoom'
  16. /** @ORM\Column(type="integer") */
  17. private $scopeId;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=User::class)
  20. * @ORM\JoinColumn(nullable=false)
  21. */
  22. private $financialManager;
  23. public function getId(): ?int { return $this->id; }
  24. public function getScopeType(): ?string { return $this->scopeType; }
  25. public function setScopeType(string $t): self { $this->scopeType = $t; return $this; }
  26. public function getScopeId(): ?int { return $this->scopeId; }
  27. public function setScopeId(int $id): self { $this->scopeId = $id; return $this; }
  28. public function getFinancialManager(): ?User { return $this->financialManager; }
  29. public function setFinancialManager(User $u): self { $this->financialManager = $u; return $this; }
  30. public function getDisplayName(): string
  31. {
  32. return ucfirst($this->scopeType) . ' #' . $this->scopeId;
  33. }
  34. }