Files
hyperf_service/app/Request/Admin/DishRequest.php
LAPTOP-7SGDREK0\shiweijun 6b38a6b732 feat:dish depot
2025-01-14 17:04:48 +08:00

40 lines
1002 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_id' => 'sometimes|integer|exists:cycle,id',
'query_status' => 'sometimes|integer',
'query_chef_id' => 'sometimes|integer',
];
}
protected array $scenes = [
'list' => ['limit','query_id','query_dish_name','query_city_id','query_date_id','query_status','query_chef_id'],
];
}