migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\Ingredient;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class IngredientStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// ===== Basic Info =====
|
||||
'name' => 'required|string|max:255',
|
||||
'unit_id' => 'required|exists:units,id',
|
||||
'stock_quantity' => 'nullable|numeric|min:0',
|
||||
'cost_per_unit' => 'nullable|numeric|min:0',
|
||||
'low_stock_alert' => 'nullable|numeric|min:0',
|
||||
'image' => 'nullable|image',
|
||||
|
||||
// ===== Supplier & Purchase Info =====
|
||||
'supplier_id' => 'nullable|exists:suppliers,id',
|
||||
'last_purchase_price' => 'nullable|numeric|min:0',
|
||||
'last_purchase_date' => 'nullable|date',
|
||||
|
||||
// ===== Units & Conversions =====
|
||||
'conversion_factor' => 'nullable|numeric|min:0.01',
|
||||
|
||||
// ===== Stock & Inventory =====
|
||||
'reserved_quantity' => 'nullable|numeric|min:0',
|
||||
'wastage_quantity' => 'nullable|numeric|min:0',
|
||||
|
||||
// ===== Categorization =====
|
||||
'category' => 'nullable|string|max:100',
|
||||
'notes' => 'nullable|string|max:2000',
|
||||
|
||||
// ===== Status =====
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\Ingredient;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class IngredientUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// ===== Basic Info =====
|
||||
'name' => 'required|string|max:255',
|
||||
'unit_id' => 'required|exists:units,id',
|
||||
'stock_quantity' => 'nullable|numeric|min:0',
|
||||
'cost_per_unit' => 'nullable|numeric|min:0',
|
||||
'low_stock_alert' => 'nullable|numeric|min:0',
|
||||
'image' => 'nullable|image',
|
||||
|
||||
// ===== Supplier & Purchase Info =====
|
||||
'supplier_id' => 'nullable|exists:suppliers,id',
|
||||
'last_purchase_price' => 'nullable|numeric|min:0',
|
||||
'last_purchase_date' => 'nullable|date',
|
||||
|
||||
// ===== Units & Conversions =====
|
||||
'conversion_factor' => 'nullable|numeric|min:0.01',
|
||||
|
||||
// ===== Stock & Inventory =====
|
||||
'reserved_quantity' => 'nullable|numeric|min:0',
|
||||
'wastage_quantity' => 'nullable|numeric|min:0',
|
||||
|
||||
// ===== Categorization =====
|
||||
'category' => 'nullable|string|max:100',
|
||||
'notes' => 'nullable|string|max:2000',
|
||||
|
||||
// ===== Status =====
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user