<!-- // database/migrations/xxxx_xx_xx_create_products_table.php

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

class CreateProductsTable extends Migration
{
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->id();
            $table->foreignId('product_class_id')->constrained('product_classes')->onDelete('cascade');
            $table->string('code')->unique();
            $table->string('description');
            $table->decimal('product_standard_price', 10, 2);
            $table->foreignId('masterproductid')->nullable()->constrained('products'); // Reference to another product if applicable
            $table->timestamps();
        });
    }

    public function down()
    {
        Schema::dropIfExists('products');
    }
} -->
