Initial commit - Car Rental Management System

This commit is contained in:
Innovator committed 2026-02-19 22:05:20 +00:00
commit f72173377a
100 files changed
+15201

No files matched your search

@@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('services', function (Blueprint $table) {
$table->id();
$table->foreignId('car_id')->constrained()->onDelete('cascade');
$table->enum('type', ['oil_change', 'tire_rotation', 'brake_service', 'general_checkup', 'repair', 'insurance', 'other']);
$table->text('description');
$table->decimal('cost', 10, 2);
$table->date('service_date');
$table->date('next_service_date')->nullable();
$table->integer('mileage_at_service')->nullable();
$table->enum('status', ['scheduled', 'in_progress', 'completed'])->default('completed');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('services');
}
};