<?php

namespace  App\Http\Requests\OpenWork\Group;

use App\Http\Requests\BaseRequest;

/**
 * 群成员校验规则
 * @author  唐远望
 * @date    2025-04-10
 * */
class Member extends BaseRequest
{

    /**
     *
     * @return  array
     */
    public  function  rules()
    {
        // 规则
        return [
            'corpid'              => 'required',
            'external_userid'     => 'required',
            'limit'               => 'required|integer',
        ];
    }

    // 场景列表
    protected   $scenes         = [
        'get_info'                      => ['external_userid'],
        'get_list'                      => ['corpid','limit'],
        'export_excel'                  => ['corpid','chat_id'],
    ];

    /**
     *
     * @return  array
     */
    public  function  messages()
    {
        return [
            'corpid.required'     => '授权方corpid不能为空',
            'external_userid.required'     => '外部成员ID不能为空',
            'limit.required'      => '每页记录数不能为空',
            'limit.integer'       => '每页记录数必须为整数',
        ];
    }
}
