Initial commit - Car Rental Management System
This commit is contained in:
commit
f72173377a
100 files changed
+15201
No files matched your search
@@ -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
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('cars', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('brand');
|
||||
$table->string('model');
|
||||
$table->string('year');
|
||||
$table->string('license_plate')->unique();
|
||||
$table->string('color');
|
||||
$table->decimal('daily_rate', 10, 2);
|
||||
$table->enum('status', ['available', 'rented', 'maintenance', 'sold'])->default('available');
|
||||
$table->string('image')->nullable();
|
||||
$table->integer('mileage')->default(0);
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cars');
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user