<?php
declare(strict_types=1);
namespace App\Entity\Customer;
use Doctrine\ORM\Mapping as ORM;
use Sylius\B2BKit\Entity\CustomerGroupAwareTrait;
use Sylius\B2BKit\Entity\CustomerGroupInterface;
use Sylius\B2BKit\Entity\CustomerGroupPricingListInterface;
use Sylius\Component\Customer\Model\CustomerGroup as BaseCustomerGroup;
/**
* @ORM\Entity
* @ORM\Table(name="sylius_customer_group")
*/
class CustomerGroup extends BaseCustomerGroup implements CustomerGroupInterface
{
use CustomerGroupAwareTrait;
/**
* @ORM\ManyToOne(
* targetEntity="Sylius\B2BKit\Entity\CustomerGroupPricingListInterface",
* inversedBy="customerGroups",
* cascade={"all"}
* )
* @ORM\JoinColumn(
* name="pricing_list_id",
* referencedColumnName="id",
* nullable=true,
* onDelete="SET NULL",
* )
*/
protected ?CustomerGroupPricingListInterface $pricingList = null;
}
Override CustomerGroup
config
# config/packages/_sylius.yaml
sylius_customer:
resources:
customer_group:
classes:
model: App\Entity\Customer\CustomerGroup
repository: Sylius\B2BKit\Repository\CustomerGroupRepository