<?php

namespace App\Http\Controllers\Fpdx;

use App\Models\User\Openid;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redis;
use App\Http\Controllers\Controller;
use App\Http\Controllers\Core\Auth;
use App\Http\Controllers\Wechat\Kfaccount;
use App\Models\Fpdx\ActivityModel;
use App\Models\Fpdx\NoticeModel;
use App\Models\Fpdx\NoticeReadModel;
use App\Models\Fpdx\RoomModel;
use App\Models\Fpdx\MessageModel;
use App\Models\Fpdx\RoomMasterModel;
use App\Models\Fpdx\RoomProfileModel;
use App\Models\Fpdx\RoomThumbModel;

/**
 * 公众号聊天
 * Class GroupChat
 * @package App\Http\Controllers\Fpdx
 * @deprecated
 */
class GroupChat extends Controller
{
    /**
     * 创建群聊房间
     * @param  Request  $request
     * @return array
     */
    public function createGroupRoom(Request $request)
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 获取某期第活动房间列表
     * @param  int  $stage_id
     * @return array
     */
    public function groupRooms(int $stage_id)
    {
        $data = RoomModel::where([
            ['stage_id', $stage_id],
            ['type', 3]
        ])->get();
        return array(
            "code" => 200,
            'message' => 'success',
            'data' => $data
        );
    }

    /**
     * 添加群主|管理员
     * @param  int  $room_id
     * @param  Request  $request
     * @return array
     * @throws \ApiException
     */
    public function joinMaster(int $room_id, Request $request)
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 用户加入房间
     * @param  int  $room_id
     * @param  int  $uid
     * @return array
     * @throws \ApiException
     */
    public function joinGroup(int $room_id, int $uid)
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 获取房主信息by房间
     * @param  int  $room_id
     * @return array
     * @throws \ApiException
     */
    public function getMasterByRoom(int $room_id)
    {
        return array(
            'code' => 200,
            'message' => 'success',
            'data' => []
        );
    }

    /**
     * 获取管理员列表by房间
     * @param  int  $room_id
     * @return array
     */
    public function getAdministrator(int $room_id)
    {
        return array(
            'code' => 200,
            'message' => 'success',
            'data' => [],
        );
    }

    /**
     * 删除发言
     * @param  int  $msg_id
     * @return array
     * @throws \Tymon\JWTAuth\Exceptions\JWTException
     */
    public function delMsg(int $msg_id)
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 屏蔽某人
     * @return array
     */
    public function forbid()
    {
        return [
            'code' => 200,
            'message' => 'success'
        ];
    }

    /**
     * 获取某人点赞状态
     * @param  int  $room_id
     * @return array
     * @throws \Tymon\JWTAuth\Exceptions\JWTException
     */
    public function thumbByUser(int $room_id)
    {
        return array(
            'code' => 200,
            'message' => 'success',
            'data' => [
                'thumb' => false
            ],
        );
    }

    /**
     * 点赞房主
     * @return array
     */
    public function thumb()
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 发送消息
     * @return array
     */
    public function sendMsg()
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 创建公告
     * @return array
     */
    public function createNotice()
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }


    /**
     * 删除公告
     * @param  int  $room_id
     * @return array
     * @throws \Exception
     */
    public function deleteNotice()
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }

    /**
     * 阅读公告
     * @param  int  $notice_id
     * @return array
     */
    public function readNotice()
    {
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }


    /**
     * 是否阅读公告
     * @param  int  $notice_id
     * @return array
     */
    public function isRead()
    {
        return array(
            'code' => 200,
            'message' => 'success',
            'data' => [
                'is_read' => true
            ],
        );
    }

    /**
     * 群公告列表
     * @return array
     */
    public function getNotices()
    {
        return array(
            'code' => 200,
            'message' => 'success',
            'data' => []
        );
    }

    /**
     * 群公告信息
     * @param  int  $notice_id
     * @return array
     */
    public function getNotice()
    {
        return array(
            'code' => 200,
            'message' => 'success',
            'data' => []
        );
    }
}
