41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Services\Customer\Wallet;
|
|
|
|
use App\Entities\Customer\ClientEntity;
|
|
use App\Entities\Customer\Wallet\CouponEntity;
|
|
use App\Forms\Customer\Wallet\CouponForm;
|
|
use App\Helpers\Customer\Wallet\CouponHelper;
|
|
use App\Models\Customer\Wallet\CouponModel;
|
|
|
|
class CouponService extends WalletService
|
|
{
|
|
protected string $formClass = CouponForm::class;
|
|
protected string $helperClass = CouponHelper::class;
|
|
|
|
public function __construct(CouponModel $model)
|
|
{
|
|
parent::__construct($model);
|
|
$this->addClassPaths('Coupon');
|
|
$this->title = "쿠폰";
|
|
$this->balanceField = 'coupon_balance';
|
|
}
|
|
public function getEntityClass(): string
|
|
{
|
|
return CouponEntity::class;
|
|
}
|
|
//기본 기능부분
|
|
protected function getEntity_process(mixed $entity): CouponEntity
|
|
{
|
|
return $entity;
|
|
}
|
|
//고객 쿠폰
|
|
protected function getClientBalance(ClientEntity $clientEntity): int
|
|
{
|
|
return $clientEntity->getCouponBalance();
|
|
}
|
|
//List 검색용
|
|
//FormFilter 조건절 처리
|
|
//검색어조건절처리
|
|
}
|