src/Entity/SpecialCustomer.php line 9
<?phpnamespace App\Entity;use App\Repository\SpecialCustomerRepository;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SpecialCustomerRepository::class)]class SpecialCustomer{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'specialCustomerPourcent')]private $user;#[ORM\Column(name: 'active', type: 'boolean')]private ?bool $active;#[ORM\Column(name: 'pourcentRebate', type: 'float')]private ?float $pourcentRebate;#[ORM\Column(name: 'minQuantity', type: 'integer', nullable: true)]private ?int $minQuantity = null;public function getId(): ?int{return $this->id;}/*** @return mixed*/public function getUser(){return $this->user;}/*** @param mixed $user*/public function setUser($user): void{$this->user = $user;}/*** @return bool|null*/public function getActive(): ?bool{return $this->active;}/*** @param bool|null $active*/public function setActive(?bool $active): void{$this->active = $active;}/*** @return float|null*/public function getPourcentRebate(): ?float{return $this->pourcentRebate;}/*** @param float|null $pourcentRebate*/public function setPourcentRebate(?float $pourcentRebate): void{$this->pourcentRebate = $pourcentRebate;}/*** @return int|null*/public function getMinQuantity(): ?int{return $this->minQuantity;}/*** @param int|null $minQuantity*/public function setMinQuantity(?int $minQuantity): void{$this->minQuantity = $minQuantity;}/*** Getter virtuel pour le nom de l'entreprise (utilisé par EasyAdmin)*/public function getCompanyName(): ?string{if (!$this->user) {return null;}return $this->user->getCompanyNameFromAdditionalInfo() ?? $this->user->getCompanyName();}/*** Getter virtuel pour l'email de l'utilisateur (utilisé par EasyAdmin)*/public function getUserEmail(): ?string{return $this->user ? $this->user->getEmail() : null;}}