<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->id();
            $table->foreignId('category_id');
            $table->decimal('unit_price', 20, 2);
            $table->text('description');
            $table->text('product_image');
            $table->json('image_views');
            $table->decimal('unit_profit', 20, 2);
            $table->text('ingredients');
            $table->text('nutritional_value');
            $table->decimal('cost_per_price', 20, 2);  
            $table->string('meal_type');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
};
