created Oder Model

This commit is contained in:
2025-04-23 16:29:39 +02:00
parent 995f61632b
commit bd75ace0c6
2 changed files with 54 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('orders', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained();
$table->foreignId('order_status_id')->constrained();
$table->json('items');
$table->integer('total_price');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('orders');
}
};