src/Entity/AdminFinance/Bank/BankMouvementCategorie.php line 11

  1. <?php
  2. namespace App\Entity\AdminFinance\Bank;
  3. use App\Repository\AdminFinance\Bank\BankMouvementCategorieRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassBankMouvementCategorieRepository::class)]
  8. class BankMouvementCategorie
  9. {
  10.     const TYPE_DEBIT 'D';
  11.     const TYPE_CREDIT 'C';
  12.     
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length1)]
  18.     private string $type self::TYPE_DEBIT;
  19.     #[ORM\Column(length50nullabletrue)]
  20.     private ?string $libelle null;
  21.     #[ORM\ManyToOne(targetEntity:BankMouvementCategorie::class)]
  22.     #[ORM\JoinColumn(nullabletrue)]
  23.     private ?BankMouvementCategorie $parent null;
  24.     #[ORM\Column]
  25.     private ?bool $selection;
  26.     #[ORM\Column]
  27.     private ?bool $budget;
  28.     public function __construct()
  29.     {
  30.         
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getType(): ?string
  37.     {
  38.         return $this->type;
  39.     }
  40.     public function setType(string $type): self
  41.     {
  42.         $this->type $type;
  43.         return $this;
  44.     }
  45.     public function getLibelle(): ?string
  46.     {
  47.         return $this->libelle;
  48.     }
  49.     public function setLibelle(string $libelle): self
  50.     {
  51.         $this->libelle $libelle;
  52.         return $this;
  53.     }
  54.     public function __toString() {
  55.         return $this->getLibelle();
  56.     }
  57.     public function getParent(): ?self
  58.     {
  59.         return $this->parent;
  60.     }
  61.     public function setParent(?self $parent): self
  62.     {
  63.         $this->parent $parent;
  64.         return $this;
  65.     }
  66.     public function getSelection(): ?bool
  67.     {
  68.         return $this->selection;
  69.     }
  70.     public function setSelection(?bool $selection): self
  71.     {
  72.         $this->selection $selection;
  73.         return $this;
  74.     }
  75.     public function getBudget(): ?bool
  76.     {
  77.         return $this->budget;
  78.     }
  79.     public function setBudget(?bool $budget): self
  80.     {
  81.         $this->budget $budget;
  82.         return $this;
  83.     }
  84.     public function isSelection(): ?bool
  85.     {
  86.         return $this->selection;
  87.     }
  88.     public function isBudget(): ?bool
  89.     {
  90.         return $this->budget;
  91.     }
  92. }