Files

198 lines
6.5 KiB
PHP
Raw Permalink Normal View History

2026-03-15 17:08:23 +07:00
<?php
namespace Modules\Restaurant\Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class FoodVariantIngredientSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$now = Carbon::now();
$data = [
// 🍔 Beef Burger (variant_id = 1)
[
'restaurant_id' => 1,
'food_variant_id' => 1,
'ingredient_id' => 1, // Beef Patty
'quantity' => 1,
'wastage_percentage' => 2,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => '150g patty',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 1,
'ingredient_id' => 2, // Burger Bun
'quantity' => 1,
'wastage_percentage' => 1,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Fresh baked bun',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 1,
'ingredient_id' => 3, // Cheese Slice
'quantity' => 1,
'wastage_percentage' => 0,
'unit_conversion_factor' => 1,
'optional' => 'Y',
'notes' => 'Optional cheese topping',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 1,
'ingredient_id' => 4, // Tomato
'quantity' => 0.05,
'wastage_percentage' => 5,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Fresh tomato slices',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 1,
'ingredient_id' => 5, // Lettuce
'quantity' => 0.03,
'wastage_percentage' => 5,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Crisp lettuce leaves',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
// 🍟 French Fries (variant_id = 2)
[
'restaurant_id' => 1,
'food_variant_id' => 2,
'ingredient_id' => 6, // Potato
'quantity' => 0.25,
'wastage_percentage' => 8,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Peeled & sliced',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 2,
'ingredient_id' => 7, // Salt
'quantity' => 0.005,
'wastage_percentage' => 0,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Seasoning',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 2,
'ingredient_id' => 8, // Oil
'quantity' => 0.05,
'wastage_percentage' => 10,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'For deep frying',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
// 🍕 Margherita Pizza (variant_id = 3)
[
'restaurant_id' => 1,
'food_variant_id' => 3,
'ingredient_id' => 9, // Pizza Dough
'quantity' => 0.25,
'wastage_percentage' => 3,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Prepared dough base',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 3,
'ingredient_id' => 10, // Tomato Sauce
'quantity' => 0.10,
'wastage_percentage' => 2,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Base sauce',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 3,
'ingredient_id' => 11, // Mozzarella Cheese
'quantity' => 0.15,
'wastage_percentage' => 2,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Fresh mozzarella',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 3,
'ingredient_id' => 12, // Basil
'quantity' => 0.005,
'wastage_percentage' => 5,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Fresh basil leaves',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
[
'restaurant_id' => 1,
'food_variant_id' => 3,
'ingredient_id' => 13, // Olive Oil
'quantity' => 0.02,
'wastage_percentage' => 0,
'unit_conversion_factor' => 1,
'optional' => 'N',
'notes' => 'Drizzle after baking',
'status' => 1,
'created_at' => $now,
'updated_at' => $now,
],
];
DB::table('food_variant_ingredients')->insert($data);
}
}