<?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('cars', function (Blueprint $table) {
            $table->id();

            // Car Details from Form
            $table->string('make');
            $table->string('model');
            $table->string('reg_year');
            $table->string('varient');
            $table->string('engine_capacity')->nullable();
            $table->string('mileage')->nullable();
            $table->string('fuel_type')->nullable();
            $table->date('inspection_date');
            $table->string('chassis_no')->nullable();
            $table->string('engine_no')->nullable();
            $table->string('registration_no');
            $table->string('location')->nullable();
            $table->string('registered_city')->nullable();
            $table->string('transmission')->nullable();
            $table->string('color')->nullable();

            // Ratings, Comments, Sketch & Demand
            $table->json('ratings')->nullable();
            $table->text('inspector_comments')->nullable();
            $table->text('general_comments')->nullable();
            $table->json('exterior_sketch_data')->nullable();
            $table->string('demond')->nullable();

            // Image Fields
            $table->string('picture1')->nullable();
            $table->string('picture2')->nullable();
            $table->string('picture3')->nullable();
            $table->string('picture4')->nullable();
            $table->string('picture5')->nullable();
            $table->string('picture6')->nullable();
            $table->string('picture7')->nullable();
            $table->string('picture8')->nullable();
            $table->string('picture9')->nullable();
            $table->string('picture10')->nullable();


            $table->timestamps();
        });
    }

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