<?php



namespace app\common\dao\system\merchant;


use app\common\dao\BaseDao;
use app\common\model\BaseModel;
use app\common\model\system\merchant\MerchantType;

class MerchantTypeDao extends BaseDao
{

    protected function getModel(): string
    {
        return MerchantType::class;
    }

    public function search(array $where = [])
    {
        return MerchantType::getDB();
    }

    public function getOptions()
    {
        $data = MerchantType::getDB()->column('type_name', 'mer_type_id');
        $options = [];
        foreach ($data as $value => $label) {
            $options[] = compact('value', 'label');
        }
        return $options;
    }

}