<?php
namespace App\Entity;
use App\Repository\ShopPlanRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ShopPlanRepository::class)]
class ShopPlan
{
public const VerifKYC = [
0 => 'Automatique',
1 => 'Manuel',
2 => 'Manuel + audit'
];
public const SupportLevel = [
0 => 'Email',
1 => 'Email + Chat',
2 => 'Chat prioritaire',
3 => 'Support dédié'
];
public const AnalyticsLevel = [
0 => 'Basique',
1 => 'Avancé',
2 => 'Premium',
3 => 'Enterprise'
];
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 30)]
private ?string $name = null;
#[ORM\Column]
private ?int $price = null;
#[ORM\Column]
private ?float $transactionFee = null;
#[ORM\Column]
private ?int $maxProducts = null;
#[ORM\Column]
private ?int $maxEmployees = null;
#[ORM\Column]
private ?int $orderLimit = null;
#[ORM\Column]
private ?int $storageLimit = null;
#[ORM\Column]
private ?bool $requireSiretNif = null;
#[ORM\Column]
private ?bool $requireIban = null;
#[ORM\Column]
private ?int $supportLevel = null;
#[ORM\OneToMany(targetEntity: Shop::class, mappedBy: 'plan')]
private Collection $shops;
#[ORM\Column]
private ?int $caLimit = null;
#[ORM\Column]
private ?int $apiCallLimit = null;
#[ORM\Column]
private ?int $latencyLimit = null;
#[ORM\Column]
private ?int $analyticsLevel = null;
#[ORM\Column]
private ?int $kycLevel = null;
public function __construct()
{
$this->shops = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getPrice(): ?int
{
return $this->price;
}
public function setPrice(int $price): static
{
$this->price = $price;
return $this;
}
public function getTransactionFee(): ?float
{
return $this->transactionFee;
}
public function setTransactionFee(float $transactionFee): static
{
$this->transactionFee = $transactionFee;
return $this;
}
public function getMaxProducts(): ?int
{
return $this->maxProducts;
}
public function setMaxProducts(int $maxProducts): static
{
$this->maxProducts = $maxProducts;
return $this;
}
public function getMaxEmployees(): ?int
{
return $this->maxEmployees;
}
public function setMaxEmployees(int $maxEmployees): static
{
$this->maxEmployees = $maxEmployees;
return $this;
}
public function getOrderLimit(): ?int
{
return $this->orderLimit;
}
public function setOrderLimit(int $orderLimit): static
{
$this->orderLimit = $orderLimit;
return $this;
}
public function getStorageLimit(): ?int
{
return $this->storageLimit;
}
public function setStorageLimit(int $storageLimit): static
{
$this->storageLimit = $storageLimit;
return $this;
}
public function isRequireSiretNif(): ?bool
{
return $this->requireSiretNif;
}
public function setRequireSiretNif(bool $requireSiretNif): static
{
$this->requireSiretNif = $requireSiretNif;
return $this;
}
public function isRequireIban(): ?bool
{
return $this->requireIban;
}
public function setRequireIban(bool $requireIban): static
{
$this->requireIban = $requireIban;
return $this;
}
public function getSupportLevel(): ?int
{
return $this->supportLevel;
}
public function setSupportLevel(int $supportLevel): static
{
$this->supportLevel = $supportLevel;
return $this;
}
/**
* @return Collection<int, Shop>
*/
public function getShops(): Collection
{
return $this->shops;
}
public function addShop(Shop $shop): static
{
if (!$this->shops->contains($shop)) {
$this->shops->add($shop);
$shop->setPlan($this);
}
return $this;
}
public function removeShop(Shop $shop): static
{
if ($this->shops->removeElement($shop)) {
// set the owning side to null (unless already changed)
if ($shop->getPlan() === $this) {
$shop->setPlan(null);
}
}
return $this;
}
public function getCaLimit(): ?int
{
return $this->caLimit;
}
public function setCaLimit(int $caLimit): static
{
$this->caLimit = $caLimit;
return $this;
}
public function getApiCallLimit(): ?int
{
return $this->apiCallLimit;
}
public function setApiCallLimit(int $apiCallLimit): static
{
$this->apiCallLimit = $apiCallLimit;
return $this;
}
public function getLatencyLimit(): ?int
{
return $this->latencyLimit;
}
public function setLatencyLimit(int $latencyLimit): static
{
$this->latencyLimit = $latencyLimit;
return $this;
}
public function getAnalyticsLevel(): ?int
{
return $this->analyticsLevel;
}
public function setAnalyticsLevel(int $analyticsLevel): static
{
$this->analyticsLevel = $analyticsLevel;
return $this;
}
public function getKycLevel(): ?int
{
return $this->kycLevel;
}
public function setKycLevel(int $kycLevel): static
{
$this->kycLevel = $kycLevel;
return $this;
}
}