<?php

namespace  App\Http\Requests\Company\Statistics;

use App\Http\Requests\BaseRequest;

/**
 * 自定义表单统计校验规则
 * @author  唐远望
 * @date    2025-10-29
 * */
class CustomFormStatistics extends BaseRequest
{

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

    // 场景列表
    protected   $scenes           = [
        'overview'                => ['company_id','form_id'],
        'detail'                  => ['company_id','form_id'],
        'user_form_list'          => ['company_id','form_id'],
        'user_form_detail'        => ['company_id','form_id','id'],

    ];

    /**
     *
     * @return  array
     */
    public  function  messages()
    {
        return [
            'company_id.required'     => '公司company_id不能为空',
            'limit.integer'       => '每页记录数必须为整数',
            'form_id.required'         => '表单id不能为空',
            'form_id.integer'          => '表单id必须为整数',
            'id.required'          => '记录id不能为空',
            'id.integer'           => '记录id必须为整数',
        ];
    }
}
