src/Entity/CancelReason.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\CancelReasonRepository;
  5. /**
  6.  * @ORM\Entity(repositoryClass=App\Repository\CancelReasonRepository::class)
  7.  * @ORM\Table(name="cancel_reason")
  8.  */
  9. class CancelReason
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, unique=true)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="text", nullable=true)
  23.      */
  24.     private $description;
  25.     /**
  26.      * @ORM\Column(type="boolean")
  27.      */
  28.     private $isActive true;
  29.     /**
  30.      * @ORM\Column(type="integer")
  31.      */
  32.     private $displayOrder 0;
  33.     
  34.     /**
  35.      * @ORM\Column(type="string", length=20, options={"default": "client"})
  36.      */
  37.     private string $category 'client'// 'client' | 'fournisseur'
  38.     
  39.     // ðŸ”½ Getters et setters
  40.     public function getId(): ?int 
  41.     
  42.         return $this->id
  43.     }
  44.     public function getName(): ?string 
  45.     
  46.         return $this->name
  47.     }
  48.     public function setName(string $name): self 
  49.     
  50.         $this->name $name; return $this
  51.     }
  52.     public function getDescription(): ?string 
  53.     
  54.         return $this->description;
  55.      }
  56.     public function setDescription(?string $description): self 
  57.     
  58.         $this->description $description; return $this
  59.     }
  60.     public function getIsActive(): bool 
  61.     
  62.         return $this->isActive;
  63.     }
  64.     public function setIsActive(bool $isActive): self 
  65.     
  66.         $this->isActive $isActive; return $this
  67.     }
  68.     public function getDisplayOrder(): int 
  69.     
  70.         return $this->displayOrder
  71.     }
  72.     public function setDisplayOrder(int $order): self 
  73.     
  74.         $this->displayOrder $order; return $this;
  75.     }
  76.      public function getCategory(): string
  77.     {
  78.         return $this->category;
  79.     }
  80.     public function setCategory(string $category): static
  81.     {
  82.         $this->category $category;
  83.         return $this;
  84.     }
  85.     public function __toString(): string
  86.     {
  87.         return $this->name ?? '';
  88.     }
  89. }