<?php

namespace App\JsonRpc;

use Hyperf\RpcClient\AbstractServiceClient;

class WebsiteService extends AbstractServiceClient implements WebsiteServiceInterface
{
    /**
     * 定义对应服务提供者的服务名称
     * @var string
     */
    protected string $serviceName = 'WebsiteService';
    /**
     * 定义对应服务提供者的服务协议
     * @var string
     */
    protected string $protocol = 'jsonrpc-http';


    /**
     * @param string $keyword
     * @param int $page
     * @param int $pageSize
     * @return mixed
     */
    public function getWebsitetList(string $keyword, int $page, int $pageSize)
    {
        return $this->__request(__FUNCTION__, compact('keyword','page','pageSize'));
    }

    /**
     * @param array $data
     * @return mixed
     */
    public function createWebsite(array $data)
    {
        return $this->__request(__FUNCTION__, $data);
    }

    /**
     * @param int $id
     * @param array $data
     * @return mixed
     */
    public function updateWebsite(int $id, array $data)
    {
        return $this->__request(__FUNCTION__,$id, $data);
    }

    /**
     * @param int $id
     * @return mixed
     */
    public function delWebsite(int $id)
    {
        return $this->__request(__FUNCTION__,$id);
    }

    /**
     * @param int $id
     * @return mixed
     */
    public function getWebsiteInfo(int $id)
    {
        return $this->__request(__FUNCTION__,$id);
    }

    /**
     * @param array $data
     * @return array
     */
    public function getWebsiteColumn(array $data): array
    {
        return $this->__request(__FUNCTION__, $data);
    }


    /**
     * @param string $keyword
     * @param int $page
     * @param int $pageSize
     * @return mixed
     */
    public function getWebsiteColumnList(string $keyword, int $page, int $pageSize)
    {
        return $this->__request(__FUNCTION__, compact('keyword','page','pageSize'));
    }

    /**
     * @param array $data
     * @return mixed
     */
    public function createWebsiteColumn(array $data)
    {
        return $this->__request(__FUNCTION__, $data);
    }

    /**
     * @param int $id
     * @param array $data
     * @return mixed
     */
    public function updateWebsiteColumn(int $id, array $data)
    {
        return $this->__request(__FUNCTION__,$id, $data);
    }

    /**
     * @param int $id
     * @return mixed
     */
    public function delWebsiteColumn(int $id)
    {
        return $this->__request(__FUNCTION__,$id);
    }

    /**
     * @param string $keyword
     * @param int $page
     * @param int $pageSize
     * @return mixed
     */
    public function getWebsiteRoleList(string $keyword, int $page, int $pageSize,int $websiteId)
    {
        return $this->__request(__FUNCTION__, compact('keyword','page','pageSize','websiteId'));
    }
    /**
     * @param array $data
     * @return mixed
     */
    public function createWebsiteRole(array $data)
    {
        return $this->__request(__FUNCTION__, $data);
    }

    /**
     * @param int $id
     * @param array $data
     * @return mixed
     */
    public function updateWebsiteRole(int $id, array $data)
    {
        return $this->__request(__FUNCTION__,$id, $data);
    }

    /**
     * @param int $id
     * @return mixed
     */
    public function delWebsiteRole(int $id)
    {
        return $this->__request(__FUNCTION__,$id);
    }
    /**
     * @param string $keyword
     * @param int $page
     * @param int $pageSize
     * @return mixed
     */
    public function getWebsiteRoleUserList(string $keyword, int $page, int $pageSize,int $websiteId,int $roleId)
    {
        return $this->__request(__FUNCTION__, compact('keyword','page','pageSize','websiteId','roleId'));
    }

    /**
     * @param array $data
     * @return mixed
     */
    public function createWebsiteRoleUser(array $data)
    {
        return $this->__request(__FUNCTION__, $data);
    }

    /**
     * @param int $id
     * @param array $data
     * @return mixed
     */
    public function updateWebsiteRoleUser(int $id, array $data)
    {
        return $this->__request(__FUNCTION__,$id, $data);
    }

    /**
     * @param int $id
     * @return mixed
     */
    public function delWebsiteRoleUser(int $id)
    {
        return $this->__request(__FUNCTION__,$id);
    }
}