src/Entity/ShopPlan.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ShopPlanRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassShopPlanRepository::class)]
  8. class ShopPlan
  9. {
  10.     public const VerifKYC = [
  11.         => 'Automatique',
  12.         => 'Manuel',
  13.         => 'Manuel + audit'
  14.     ];
  15.     public const SupportLevel = [
  16.         => 'Email',
  17.         => 'Email + Chat',
  18.         => 'Chat prioritaire',
  19.         => 'Support dédié'
  20.     ];
  21.     public const AnalyticsLevel = [
  22.         => 'Basique',
  23.         => 'Avancé',
  24.         => 'Premium',
  25.         => 'Enterprise'
  26.     ];
  27.     #[ORM\Id]
  28.     #[ORM\GeneratedValue]
  29.     #[ORM\Column]
  30.     private ?int $id null;
  31.     #[ORM\Column(length30)]
  32.     private ?string $name null;
  33.     #[ORM\Column]
  34.     private ?int $price null;
  35.     #[ORM\Column]
  36.     private ?float $transactionFee null;
  37.     #[ORM\Column]
  38.     private ?int $maxProducts null;
  39.     #[ORM\Column]
  40.     private ?int $maxEmployees null;
  41.     #[ORM\Column]
  42.     private ?int $orderLimit null;
  43.     #[ORM\Column]
  44.     private ?int $storageLimit null;
  45.     #[ORM\Column]
  46.     private ?bool $requireSiretNif null;
  47.     #[ORM\Column]
  48.     private ?bool $requireIban null;
  49.     #[ORM\Column]
  50.     private ?int $supportLevel null;
  51.     #[ORM\OneToMany(targetEntityShop::class, mappedBy'plan')]
  52.     private Collection $shops;
  53.     #[ORM\Column]
  54.     private ?int $caLimit null;
  55.     #[ORM\Column]
  56.     private ?int $apiCallLimit null;
  57.     #[ORM\Column]
  58.     private ?int $latencyLimit null;
  59.     #[ORM\Column]
  60.     private ?int $analyticsLevel null;
  61.     #[ORM\Column]
  62.     private ?int $kycLevel null;
  63.     public function __construct()
  64.     {
  65.         $this->shops = new ArrayCollection();
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getName(): ?string
  72.     {
  73.         return $this->name;
  74.     }
  75.     public function setName(string $name): static
  76.     {
  77.         $this->name $name;
  78.         return $this;
  79.     }
  80.     public function getPrice(): ?int
  81.     {
  82.         return $this->price;
  83.     }
  84.     public function setPrice(int $price): static
  85.     {
  86.         $this->price $price;
  87.         return $this;
  88.     }
  89.     public function getTransactionFee(): ?float
  90.     {
  91.         return $this->transactionFee;
  92.     }
  93.     public function setTransactionFee(float $transactionFee): static
  94.     {
  95.         $this->transactionFee $transactionFee;
  96.         return $this;
  97.     }
  98.     public function getMaxProducts(): ?int
  99.     {
  100.         return $this->maxProducts;
  101.     }
  102.     public function setMaxProducts(int $maxProducts): static
  103.     {
  104.         $this->maxProducts $maxProducts;
  105.         return $this;
  106.     }
  107.     public function getMaxEmployees(): ?int
  108.     {
  109.         return $this->maxEmployees;
  110.     }
  111.     public function setMaxEmployees(int $maxEmployees): static
  112.     {
  113.         $this->maxEmployees $maxEmployees;
  114.         return $this;
  115.     }
  116.     public function getOrderLimit(): ?int
  117.     {
  118.         return $this->orderLimit;
  119.     }
  120.     public function setOrderLimit(int $orderLimit): static
  121.     {
  122.         $this->orderLimit $orderLimit;
  123.         return $this;
  124.     }
  125.     public function getStorageLimit(): ?int
  126.     {
  127.         return $this->storageLimit;
  128.     }
  129.     public function setStorageLimit(int $storageLimit): static
  130.     {
  131.         $this->storageLimit $storageLimit;
  132.         return $this;
  133.     }
  134.     public function isRequireSiretNif(): ?bool
  135.     {
  136.         return $this->requireSiretNif;
  137.     }
  138.     public function setRequireSiretNif(bool $requireSiretNif): static
  139.     {
  140.         $this->requireSiretNif $requireSiretNif;
  141.         return $this;
  142.     }
  143.     public function isRequireIban(): ?bool
  144.     {
  145.         return $this->requireIban;
  146.     }
  147.     public function setRequireIban(bool $requireIban): static
  148.     {
  149.         $this->requireIban $requireIban;
  150.         return $this;
  151.     }
  152.     public function getSupportLevel(): ?int
  153.     {
  154.         return $this->supportLevel;
  155.     }
  156.     public function setSupportLevel(int $supportLevel): static
  157.     {
  158.         $this->supportLevel $supportLevel;
  159.         return $this;
  160.     }
  161.     /**
  162.      * @return Collection<int, Shop>
  163.      */
  164.     public function getShops(): Collection
  165.     {
  166.         return $this->shops;
  167.     }
  168.     public function addShop(Shop $shop): static
  169.     {
  170.         if (!$this->shops->contains($shop)) {
  171.             $this->shops->add($shop);
  172.             $shop->setPlan($this);
  173.         }
  174.         return $this;
  175.     }
  176.     public function removeShop(Shop $shop): static
  177.     {
  178.         if ($this->shops->removeElement($shop)) {
  179.             // set the owning side to null (unless already changed)
  180.             if ($shop->getPlan() === $this) {
  181.                 $shop->setPlan(null);
  182.             }
  183.         }
  184.         return $this;
  185.     }
  186.     public function getCaLimit(): ?int
  187.     {
  188.         return $this->caLimit;
  189.     }
  190.     public function setCaLimit(int $caLimit): static
  191.     {
  192.         $this->caLimit $caLimit;
  193.         return $this;
  194.     }
  195.     public function getApiCallLimit(): ?int
  196.     {
  197.         return $this->apiCallLimit;
  198.     }
  199.     public function setApiCallLimit(int $apiCallLimit): static
  200.     {
  201.         $this->apiCallLimit $apiCallLimit;
  202.         return $this;
  203.     }
  204.     public function getLatencyLimit(): ?int
  205.     {
  206.         return $this->latencyLimit;
  207.     }
  208.     public function setLatencyLimit(int $latencyLimit): static
  209.     {
  210.         $this->latencyLimit $latencyLimit;
  211.         return $this;
  212.     }
  213.     public function getAnalyticsLevel(): ?int
  214.     {
  215.         return $this->analyticsLevel;
  216.     }
  217.     public function setAnalyticsLevel(int $analyticsLevel): static
  218.     {
  219.         $this->analyticsLevel $analyticsLevel;
  220.         return $this;
  221.     }
  222.     public function getKycLevel(): ?int
  223.     {
  224.         return $this->kycLevel;
  225.     }
  226.     public function setKycLevel(int $kycLevel): static
  227.     {
  228.         $this->kycLevel $kycLevel;
  229.         return $this;
  230.     }
  231. }