Files
Passkeys/Entity/CustomerTrait.php
2025-10-06 21:45:33 +09:00

72 lines
1.6 KiB
PHP

<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Plugin\Passkeys\Entity;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Eccube\Annotation\EntityExtension;
/**
* @EntityExtension("Eccube\Entity\Customer")
*/
trait CustomerTrait
{
/**
* @var boolean
*
* @ORM\Column(name="enable_passkeys", type="boolean", nullable=false, options={"default":true})
*/
private bool $enable_passkeys = true;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="\Plugin\Passkeys\Entity\PasskeysCustomerCookie", mappedBy="Customer")
*/
private $PasskeysCustomerCookies;
/**
* @return bool
*/
public function isEnablePasskeys(): bool
{
return $this->enable_passkeys;
}
/**
* @param bool $enable_passkeys
*/
public function setEnablePasskeys(bool $enable_passkeys): void
{
$this->enable_passkeys = $enable_passkeys;
}
/**
* @return Collection
*/
public function getPasskeysCustomerCookies(): Collection
{
return $this->PasskeysCustomerCookies;
}
/**
* @param Collection $PasskeysCustomerCookies
*/
public function setPasskeysCustomerCookies(Collection $PasskeysCustomerCookies): void
{
$this->PasskeysCustomerCookies = $PasskeysCustomerCookies;
}
}