<?php

namespace  App\Http\Requests\OpenWork\Corp;

use App\Http\Requests\BaseRequest;

/**
 * 企业管理接口校验规则
 * @author  唐远望
 * @date    2025-04-02
 * */
class AuthCorp extends BaseRequest
{

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

    // 场景列表
    protected   $scenes         = [
        'enterpriseList'                      => ['page', 'limit'],
        'enterpriseDetail'                    => ['corpid'],
    ];

    /**
     *
     * @return  array
     */
    public  function  messages()
    {
        return [
            'corpid.required'     => '授权方corpid不能为空',
            'page.required'     => '页码不能为空',
            'limit.required'     => '每页数量不能为空',
            'id.required'     => '企业ID不能为空',
        ];
    }
}
