<?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;
    }


}
