<?php

namespace DAO\Store;


class QmStoreInvite extends \DAO\AbstractModel
{


    

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

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

    public function init()
    {
    }
    public function getQmStoreInviteOne($where, $field = '*')
    {
        $this->setDb($this->dbName);
        return $this->db->select($field)->where($where)->fetchOne();
    }
    public function addQmStoreInvite($data)
    {
        $this->setDb(\Our\DbNameConst::masterDBConnectName);
        return $this->db->insert($this->_tableName)->rows($data)->execute();
    }
    /**
     * 类实例
     *
     * @var \DAO\UserModel
     */
    private static $_instance = null;

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

        return self::$_instance;
    }


}
