<?php


namespace App\Services\Api;


use App\Exceptions\TencentImException;
use App\Models\ChatTeam;
use App\Services\TencentImGroupService;
use GuzzleHttp\Exception\GuzzleException;

class ChatTeamService
{

    //将群聊创建信息写入数据表
    public function saveGroupDataToTable($data)
    {
        $chatTeam = new ChatTeam();
        $chatTeam->user_id  = $data['user_id'];
        $chatTeam->Owner_Account = $data['tencent_im_user_id'];
        $chatTeam->group_name = $data['group_name'];
        $chatTeam->GroupId = $data['GroupId'];
        $chatTeam->FaceUrl = 'https://zhengda.oss-accelerate.aliyuncs.com/golf/images/7c352d1bd0c6545c9e2440548772468c.png';
        $chatTeam->MaxMemberCount = 20;
        $chatTeam->ApplyJoinOption = 'FreeAccess';
        $chatTeam->save();
    }

}
