src/Entity/CodeB2BClient.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Customer\Customer;
  4. use App\Repository\CodeB2BClientRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCodeB2BClientRepository::class)]
  7. class CodeB2BClient
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $code null;
  15.     #[ORM\ManyToOne(inversedBy'codeB2BClients')]
  16.     private ?CodeEvent $codeEvent null;
  17.     #[ORM\Column]
  18.     private ?bool $hasBeenUsed false;
  19.     #[ORM\Column(options: ['default' => false])]
  20.     private bool $isFinal false;
  21.     /** Customer who used this code at registration (optional). */
  22.     #[ORM\ManyToOne(targetEntityCustomer::class)]
  23.     #[ORM\JoinColumn(nullabletrueonDelete'SET NULL')]
  24.     private ?Customer $customer null;
  25.     public function __construct()
  26.     {
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getCode(): ?string
  33.     {
  34.         return $this->code;
  35.     }
  36.     public function setCode(string $code): self
  37.     {
  38.         $this->code $code;
  39.         return $this;
  40.     }
  41.     public function getCodeEvent(): ?CodeEvent
  42.     {
  43.         return $this->codeEvent;
  44.     }
  45.     public function setCodeEvent(?CodeEvent $codeEvent): self
  46.     {
  47.         $this->codeEvent $codeEvent;
  48.         return $this;
  49.     }
  50.     public function isHasBeenUsed(): ?bool
  51.     {
  52.         return $this->hasBeenUsed;
  53.     }
  54.     public function setHasBeenUsed(bool $hasBeenUsed): self
  55.     {
  56.         $this->hasBeenUsed $hasBeenUsed;
  57.         return $this;
  58.     }
  59.     public function isFinal(): bool
  60.     {
  61.         return $this->isFinal;
  62.     }
  63.     public function setIsFinal(bool $isFinal): self
  64.     {
  65.         $this->isFinal $isFinal;
  66.         return $this;
  67.     }
  68.     public function getCustomer(): ?Customer
  69.     {
  70.         return $this->customer;
  71.     }
  72.     public function setCustomer(?Customer $customer): self
  73.     {
  74.         $this->customer $customer;
  75.         return $this;
  76.     }
  77. }