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,65 @@
<?php
namespace Modules\Restaurant\Http\Requests\FoodItem;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class FoodItemStoreRequest extends FormRequest
{
public function rules(): array
{
return [
'category_id' => 'required|exists:food_categories,id',
'menu_category_id' => 'nullable|exists:menu_categories,id',
'menu_section_id' => 'nullable|exists:menu_sections,id',
'name' => 'required|string|max:255',
'slug' => 'nullable|string|max:255|unique:food_items,slug',
'description' => 'nullable|string',
'points' => 'nullable',
'food_type' => 'required|in:Veg,Non-Veg',
'is_featured' => 'nullable',
'is_party' => 'nullable',
'is_dinner' => 'nullable',
'is_lunch' => 'nullable',
'is_popular_item' => 'nullable',
'is_chef_special' => 'nullable',
'prep_time' => [
'nullable',
'regex:/^\d{2}:\d{2}(:\d{2})?$/',
],
'cooking_time' => [
'nullable',
'regex:/^\d{2}:\d{2}(:\d{2})?$/',
],
'vat' => 'nullable',
'pst' => 'nullable',
'ingredients_cost' => 'nullable',
'allergens' => 'nullable|string|max:255',
'notes' => 'nullable|string',
'image' => 'nullable|image|mimes:jpg,jpeg,png|max:2048',
'variants' => 'required|array|min:1',
'variants.*.name' => 'required|string|max:255',
'variants.*.price' => 'required',
'variants.*.offer_price' => 'nullable',
'variants.*.discount' => 'nullable',
'variants.*.unit_id' => [
'required',
Rule::exists('units', 'id')->whereNull('deleted_at'),
],
'variants.*.is_default' => 'required',
'variants.*.stock_tracking' => 'nullable',
'variants.*.ingredients_cost' => 'nullable',
'variants.*.profit_margin' => 'nullable',
'variants.*.alert_stock_quantity' => 'nullable',
'variants.*.combo_type' => 'nullable|in:single,combo,add-on',
'variants.*.is_active_offer' => 'nullable',
];
}
public function authorize(): bool
{
return true;
}
}

View File

@@ -0,0 +1,41 @@
<?php
namespace Modules\Restaurant\Http\Requests\FoodItem;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class FoodItemUpdateRequest extends FormRequest
{
public function rules(): array
{
return [
'category_id' => 'required|exists:food_categories,id',
'menu_category_id' => 'nullable|exists:menu_categories,id',
'menu_section_id' => 'nullable|exists:menu_sections,id',
'name' => 'required|string|max:255',
'points' => 'nullable',
'food_type' => 'required|in:Veg,Non-Veg',
'is_party' => 'nullable',
'is_dinner' => 'nullable',
'is_lunch' => 'nullable',
'is_popular_item' => 'nullable',
'is_chef_special' => 'nullable',
'cooking_time' => 'required',
'components' => 'nullable|string',
'variants' => 'required|array|min:1',
'variants.*.name' => 'required|string|max:255',
'variants.*.price' => 'required',
'variants.*.unit_id' => [
'required',
Rule::exists('units', 'id')->whereNull('deleted_at'),
],
'variants.*.is_default' => 'required',
];
}
public function authorize(): bool
{
return true;
}
}