feat:chef

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-01-07 18:04:43 +08:00
parent 98f765e797
commit ce9d16eeda
5 changed files with 333 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
<?php
declare(strict_types=1);
namespace App\Request\Admin;
use Hyperf\Validation\Request\FormRequest;
class ChefRequest 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_chef_name' =>'sometimes|string',
'query_chef_id' =>'sometimes|integer|exists:admin_user,id',
];
}
protected array $scenes = [
'chef_list' => [
'limit',
'query_chef_name',
'query_chef_id'
],
'chef_detail_list' => [
'query_chef_name',
],
'chefInfo' =>['id'],
'setting_chef' => [
'name',
'avatar_id',
'user_id',
'profile',
'specialties'
],
'delete' => ['id'],
];
}