<?php

namespace DAO;

class StoreCouponGoodsClassModel extends \DAO\AbstractModel {



    protected function init(){

    }
    /**
     * 表名
     *
     * @var string
     */
    protected $_tableName = 'han_store_coupon_goods_class';

    /**
     * 主键
     *
     * @var string
     */
    protected $_primaryKey = 'id';




    public function getCount($where){
        $this->setDb();
        return $this->db->from($this->_tableName)->join('han_goods_common','han_goods_common.gc_id_1 = han_store_coupon_goods_class.gc_id','inner')->where($where)->fetchNum();
    }

    /**
     * 类实例
     *
     * @var \DAO\UserModel
     */
    private static $_instance = null;

    /**
     * 获取类实例
     *
     * @return \DAO\UserModel
     */
    public static function getInstance() {
        if (!(self::$_instance instanceof self)) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }


}
