<?php
declare(strict_types=1);
namespace App\Entity\Customer;
use App\Entity\UniverseCard\UniverseCard;
use App\Entity\UniverseCard\UniverseCardInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Customer as BaseCustomer;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_customer")
*/
class Customer extends BaseCustomer
{
/** @ORM\Column(name="max_user_id", type="integer", nullable=true) */
private int|null $maxUserId;
/**
* @ORM\OneToMany(targetEntity=UniverseCard::class, mappedBy="customer")
*
* @var Collection<UniverseCardInterface>
*/
private Collection $universeCards;
public string $customPlainPassword;
public int $formMaxUserId;
public function __construct()
{
parent::__construct();
$this->universeCards = new ArrayCollection();
}
public function getMaxUserId(): int|null
{
return $this->maxUserId;
}
public function setMaxUserId(int|null $maxUserId): self
{
$this->maxUserId = $maxUserId;
return $this;
}
public function getUniverseCards(): Collection
{
return $this->universeCards;
}
public function addUniverseCards(UniverseCardInterface $universeCard): void
{
if ($this->universeCards->contains($universeCard)) {
return;
}
$this->universeCards->add($universeCard);
}
public function removeUniverseCards(UniverseCardInterface $universeCard): void
{
if (! $this->universeCards->contains($universeCard)) {
return;
}
$this->universeCards->removeElement($universeCard);
}
}