Merge branch 'dev' into branch-dev
This commit is contained in:
64
app/Request/Admin/DepotRequest.php
Normal file
64
app/Request/Admin/DepotRequest.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?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|exists:kitchen,id',
|
||||
'name' => 'required|string',
|
||||
'city_id' => 'required|integer|exists:system_city,id',
|
||||
'kitchen_id' => 'required|integer|exists:kitchen,id',
|
||||
'id' => 'required|integer',
|
||||
'purchase_price' => 'required|numeric',
|
||||
'number' => 'required|numeric',
|
||||
'depot_id' => 'required|integer|exists:depot,id',
|
||||
'material_id' => 'required|integer|exists:material,id',
|
||||
'supplier_id' => 'required|integer|exists:supplier,id',
|
||||
'application_id' => 'required|integer|exists:material_application,id',
|
||||
'sale_id' => 'required|integer|exists:depot_sale,id',
|
||||
'status' => 'required|integer',
|
||||
];
|
||||
}
|
||||
|
||||
protected array $scenes = [
|
||||
'depot_list' => ['limit','query_id','query_kitchen_id'],
|
||||
'depot_add' => ['name','city_id','kitchen_id'],
|
||||
'depot_edit' => ['id','name'],
|
||||
'depot_delete' => ['id'],
|
||||
'purchase' => ['depot_id','material_id','supplier_id','purchase_price','number','city_id','kitchen_id'],
|
||||
'purchase_update' => ['id','number'],
|
||||
'purchase_back' => ['id'],
|
||||
'purchase_list' => ['limit','query_id','query_kitchen_id','type'],
|
||||
'purchase_statistics' => ['city_id'],
|
||||
'sale' => ['depot_id','material_id','supplier_id','number','application_id','city_id','kitchen_id'],
|
||||
'sale_update' => ['id','number'],
|
||||
'sale_delete' => ['id'],
|
||||
'sale_list' => ['limit','query_id','query_kitchen_id'],
|
||||
'sale_statistics' => ['city_id'],
|
||||
'recycle' =>['material_id','supplier_id','number','sale_id','city_id','kitchen_id'],
|
||||
'recycle_update' => ['id','number'],
|
||||
'recycle_delete' => ['id'],
|
||||
'recycle_list' => ['limit','query_id','query_kitchen_id'],
|
||||
'recycle_audit' => ['id','status'],
|
||||
];
|
||||
}
|
||||
39
app/Request/Admin/DishRequest.php
Normal file
39
app/Request/Admin/DishRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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' => 'sometimes',
|
||||
'query_status' => 'sometimes|integer',
|
||||
'query_chef_id' => 'sometimes|integer',
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
protected array $scenes = [
|
||||
'list' => ['limit','query_id','query_dish_name','query_city_id','query_date','query_status','query_chef_id'],
|
||||
];
|
||||
}
|
||||
42
app/Request/Admin/MaterialCategoryRequest.php
Normal file
42
app/Request/Admin/MaterialCategoryRequest.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Request\Admin;
|
||||
|
||||
use Hyperf\Validation\Request\FormRequest;
|
||||
|
||||
class MaterialCategoryRequest 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 [
|
||||
'query_id' =>'required|integer|exists:material_category,id',
|
||||
'id' =>'required|integer',
|
||||
'name' =>'required|string',
|
||||
'parent_id' =>'sometimes|integer|exists:material_category,id',
|
||||
'city_id' =>'required|integer|exists:system_city,id',
|
||||
'kitchen_id' =>'required|integer|exists:kitchen,id',
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
protected array $scenes = [
|
||||
'material_category_info' => ['query_id'],
|
||||
'add' => ['name', 'parent_id', 'city_id', 'kitchen_id'],
|
||||
'edit' => ['id','name', 'parent_id'],
|
||||
'delete' => ['id'],
|
||||
'list' => ['city_id'],
|
||||
];
|
||||
}
|
||||
47
app/Request/Admin/MaterialRequest.php
Normal file
47
app/Request/Admin/MaterialRequest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Request\Admin;
|
||||
|
||||
use Hyperf\Validation\Request\FormRequest;
|
||||
|
||||
class MaterialRequest 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',
|
||||
'id' =>'required|integer',
|
||||
'category_id' =>'required|integer|exists:material_category,id',
|
||||
'name' =>'required|string',
|
||||
'standard' =>'string',
|
||||
'unit' =>'string',
|
||||
'bar_code' =>'string',
|
||||
'city_id' =>'required|integer|exists:system_city,id',
|
||||
'kitchen_id' =>'required|integer|exists:kitchen,id',
|
||||
];
|
||||
}
|
||||
|
||||
protected array $scenes = [
|
||||
'material_list' => ['limit','query_name','query_kitchen_id'],
|
||||
'material_add' => ['category_id', 'name', 'standard', 'unit', 'bar_code', 'city_id', 'kitchen_id'],
|
||||
'material_edit' => ['id','category_id', 'name', 'standard', 'unit', 'bar_code','status'],
|
||||
'material_delete' => ['id'],
|
||||
'materialStock_list' => ['limit','query_name','query_materialId','query_depotId','query_supplierId','query_kitchenId'],
|
||||
'materialStock_edit' => ['id', 'current_stock', 'unit_price'],
|
||||
'chef_cost_list' => ['limit','chef_name','date','query_kitchen_id'],
|
||||
];
|
||||
}
|
||||
39
app/Request/Admin/SupplierRequest.php
Normal file
39
app/Request/Admin/SupplierRequest.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Request\Admin;
|
||||
|
||||
use Hyperf\Validation\Request\FormRequest;
|
||||
|
||||
class SupplierRequest 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',
|
||||
'mobile' => 'digits:11',
|
||||
'city_id' => 'required|integer|exists:system_city,id',
|
||||
'kitchen_id' => 'required|integer|exists:kitchen,id',
|
||||
];
|
||||
}
|
||||
|
||||
protected array $scenes = [
|
||||
'list' => ['limit','query_name'],
|
||||
'add' => ['name','mobile','address','city_id','kitchen_id'],
|
||||
'edit' => ['id','name','mobile','address'],
|
||||
'delete' => ['id'],
|
||||
];
|
||||
}
|
||||
44
app/Request/Admin/WarehouseKeeperRequest.php
Normal file
44
app/Request/Admin/WarehouseKeeperRequest.php
Normal 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_keeper_list' => [
|
||||
'limit',
|
||||
'query_city_id',
|
||||
'query_name'
|
||||
],
|
||||
'setting_warehouse_keeper' => [
|
||||
'user_id',
|
||||
'kitchen_id',
|
||||
],
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user