<?php

namespace  App\Http\Requests\OpenWork\Statistics;

use App\Http\Requests\BaseRequest;

/**
 * 客户群群发校验规则
 * @author  唐远望
 * @date    2025-08-13
 * */
class CustomerGroupPosting extends BaseRequest
{

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

    // 场景列表
    protected   $scenes           = [
        'sendStatistics'                => ['corpid','id'],
        'sendUserList' => ['corpid','id','limit'],
        'groupPostUserList'       => ['corpid','id','limit','userid'],
        'receiveUserList'  => ['corpid','id','limit'],

    ];

    /**
     *
     * @return  array
     */
    public  function  messages()
    {
        return [
            'corpid.required'     => '授权方corpid不能为空',
            'limit.integer'       => '每页记录数必须为整数',
            'id.required'               => '模板ID不能为空',
            'id.integer'               => '模板ID格式错误',
            'userid.required'           => '群主用户ID不能为空',
        ];
    }
}
