Files
hyperf_service/app/Request/Api/MaterialRequest.php
LAPTOP-7SGDREK0\shiweijun 33595961d8 feat:material_application
2025-02-07 15:29:56 +08:00

38 lines
882 B
PHP

<?php
declare(strict_types=1);
namespace App\Request\Api;
use Hyperf\Validation\Request\FormRequest;
class MaterialRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*/
public function rules(): array
{
return [
'limit' => 'required|integer',
'query_name' =>'sometimes|string',
];
}
protected array $scenes = [
'material_list' => ['limit','query_name'],
'material_application' => ['material_id','dish_id','number','processing','city_id','kitchen_id'],
'application_edit' => ['id','number','processing'],
'application_delete' => ['id'],
'application_list' => ['limit'],
];
}