migrate to gtea from bistbucket

This commit is contained in:
2026-03-15 17:08:23 +07:00
commit 129ca2260c
3716 changed files with 566316 additions and 0 deletions

View File

@@ -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;
}
}

View File

@@ -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;
}
}