This commit is contained in:
2025-10-04 11:46:59 +07:00
commit 97427d7cff
498 changed files with 47596 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace Hura8\Components\Marketing\Controller;
use Hura8\Components\Marketing\Model\CouponModel;
use Hura8\System\Controller\aEntityBaseController;
class bCouponController extends aEntityBaseController
{
protected $type_list = array(
'pro' => "Tặng sản phẩm",
'cash' => "Tặng tiền mặt",
'priceoff' => "Giảm giá %",
'other' => "Khác"
);
/* @var CouponModel $objCouponModel */
protected $objCouponModel;
public function __construct()
{
$this->objCouponModel = new CouponModel();
parent::__construct($this->objCouponModel);
}
public function getTotalProduct($coupon_id, array $condition = [])
{
return $this->objCouponModel->getTotalProduct($coupon_id, $condition);
}
public function getListProduct($coupon_id, array $condition = []) {
return $this->objCouponModel->getListProduct($coupon_id, $condition);
}
public function getTypeList() {
return $this->type_list;
}
}