Files
hyperf_service/app/Request/Admin/WarehouseKeeperRequest.php
LAPTOP-7SGDREK0\shiweijun 8d5dc6ef22 feat:warehouse_keeper
2025-02-12 14:46:22 +08:00

45 lines
1021 B
PHP

<?php
declare(strict_types=1);
namespace App\Request\Admin;
use Hyperf\Validation\Request\FormRequest;
class WarehouseKeeperRequest 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',
'query_city_id' =>'sometimes|integer|exists:system_city,id',
'user_id' =>'required|integer|exists:warehouse_keeper,user_id',
'kitchen_id' =>'integer|exists:kitchen,id',
];
}
protected array $scenes = [
'warehouse_keeper_list' => [
'limit',
'query_city_id',
'query_name'
],
'setting_warehouse_keeper' => [
'user_id',
'kitchen_id',
],
];
}