feat:dish depot

This commit is contained in:
LAPTOP-7SGDREK0\shiweijun
2025-01-14 17:04:48 +08:00
parent 99b95b76e9
commit 6b38a6b732
11 changed files with 523 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace App\Request\Admin;
use Hyperf\Validation\Request\FormRequest;
class DepotRequest 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_kitchen_id' => 'sometimes|integer',
'name' => 'required|string',
'city_id' => 'required|integer|exists:system_city,id',
'kitchen_id' => 'required|integer|exists:kitchen,id',
'id' => 'required|integer',
];
}
protected array $scenes = [
'depot_list' => ['limit','query_id','query_kitchen_id'],
'depot_add' => ['name','city_id','kitchen_id'],
'depot_edit' => ['id','name','city_id','kitchen_id'],
'depot_delete' => ['id'],
];
}