public function getTableName($shopId = null)
    {
        $tableName = parent::getTableName();

        if ($shopId === null) {
            $shopId = $this->getActiveShopId();
        }

        if (!$this->isShopValid($shopId)) {
            throw new InvalidArgumentException("Shop id \"{$shopId}\" is invalid.");
        }

        $tableName .= '_' . $shopId;

        try {
            SqlValidator::validateTableName($tableName);
        } catch (InvalidArgumentException $e) {
            throw new InvalidArgumentException("Shop id \"{$shopId}\" is invalid.", 0, $e);
        }

        return $tableName;
    }