<?php

namespace  App\Http\Requests\OpenWork\Corp;

use App\Http\Requests\BaseRequest;

/**
 * 订单管理接口校验规则
 * @author  唐远望
 * @date    2025-04-09
 * */
class LicenseOrder extends BaseRequest
{

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

    // 场景列表
    protected   $scenes         = [
        'order_list'                      => ['corpid', 'page','limit'],
        'order_info'                      => ['corpid', 'order_id'],
        'order_pay_status'                => ['corpid', 'order_id'],
    ];

    /**
     *
     * @return  array
     */
    public  function  messages()
    {
        return [
            'corpid.required'     => '授权方corpid不能为空',
            'order_id.required'     => '订单号不能为空',
            'order_id.string'     => '订单号必须为字符串',
            'page.integer'     => '页码必须为整数',
            'page.min'     => '页码最小为1',
            'limit.integer'     => '每页数量必须为整数',
            'limit.min'     => '每页数量最小为1',
        ];
    }
}
