feat:warehouseKeeper

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-02-11 17:54:00 +08:00
parent 8321940169
commit c96ecc2594
6 changed files with 227 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ class ChefRequest extends FormRequest
'user_id' =>'required|integer|exists:chef,user_id',
'profile' =>'sometimes',
'specialties' =>'sometimes',
'query_city_id' => 'sometimes|integer|exists:system_city,id',
];
}
@@ -39,7 +40,9 @@ class ChefRequest extends FormRequest
'query_chef_id'
],
'chef_detail_list' => [
'chef_id',
'limit',
'query_city_id',
'query_chef_name'
],
'setting_chef' => [
'user_id',

View File

@@ -0,0 +1,44 @@
<?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_list' => [
'limit',
'query_city_id',
'query_name'
],
'setting_warehouse' => [
'user_id',
'kitchen_id',
],
];
}