Init Gitea
This commit is contained in:
71
Entity/CustomerTrait.php
Normal file
71
Entity/CustomerTrait.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user