Files
hyperf_service/app/Request/Admin/DishRequest.php
LAPTOP-7SGDREK0\shiweijun 39924b5780 fix:dish
2025-02-18 17:15:00 +08:00

40 lines
972 B
PHP

<?php
declare(strict_types=1);
namespace App\Request\Admin;
use Hyperf\Validation\Request\FormRequest;
class DishRequest 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_id' => 'sometimes|integer',
'query_dish_name' => 'sometimes|string',
'query_city_id' => 'sometimes|integer|exists:system_city,id',
'query_date' => 'sometimes',
'query_status' => 'sometimes|integer',
'query_chef_id' => 'sometimes|integer',
];
}
protected array $scenes = [
'list' => ['limit','query_id','query_dish_name','query_city_id','query_date','query_status','query_chef_id'],
];
}