<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cmms_forms', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('dedicated_number')->nullable();
            $table->string('chassis_number')->nullable();
            $table->bigInteger('province_id')->nullable();
            $table->string('province_fa')->nullable();
            $table->bigInteger('city_id')->nullable();
            $table->string('city_fa')->nullable();
            $table->string('device_name')->nullable();
            $table->string('operator_name')->nullable();
            $table->string('operator_nationalcode')->nullable();
            $table->string('form_number')->nullable();
            $table->enum('car_type', ['B', 'L', 'G', 'Ex'])->nullable();
            $table->string('motor')->nullable();
            $table->text('motor_description')->nullable();
            $table->integer('motor_score')->nullable();
            $table->string('power')->nullable();
            $table->text('power_description')->nullable();
            $table->integer('power_score')->nullable();
            $table->string('zirbandi')->nullable();
            $table->text('zirbandi_description')->nullable();
            $table->integer('zirbandi_score')->nullable();
            $table->string('chassis')->nullable();
            $table->text('chassis_description')->nullable();
            $table->integer('chassis_score')->nullable();
            $table->string('electrical')->nullable();
            $table->text('electrical_description')->nullable();
            $table->integer('electrical_score')->nullable();
            $table->string('safety')->nullable();
            $table->text('safety_description')->nullable();
            $table->integer('safety_score')->nullable();
            $table->string('gps')->nullable();
            $table->text('gps_description')->nullable();
            $table->integer('gps_score')->nullable();
            $table->string('color')->nullable();
            $table->text('color_description')->nullable();
            $table->integer('color_score')->nullable();
            $table->string('bucket')->nullable();
            $table->text('bucket_description')->nullable();
            $table->integer('bucket_score')->nullable();
            $table->string('hydraulic')->nullable();
            $table->text('hydraulic_description')->nullable();
            $table->integer('hydraulic_score')->nullable();
            $table->string('jolobandi')->nullable();
            $table->text('jolobandi_description')->nullable();
            $table->integer('jolobandi_score')->nullable();
            $table->string('ripper')->nullable();
            $table->text('ripper_description')->nullable();
            $table->integer('ripper_score')->nullable();
            $table->string('service_status')->nullable();
            $table->text('service_description')->nullable();
            $table->string('fuel_form')->nullable();
            $table->text('fuel_description')->nullable();
            $table->boolean('question1')->nullable();
            $table->boolean('question2')->nullable();
            $table->boolean('question3')->nullable();
            $table->boolean('question4')->nullable();
            $table->boolean('question5')->nullable();
            $table->string('auditor_name')->nullable();
            $table->string('auditor_position')->nullable();
            $table->string('member1_name')->nullable();
            $table->string('member1_position')->nullable();
            $table->string('member2_name')->nullable();
            $table->string('member2_position')->nullable();
            $table->string('member3_name')->nullable();
            $table->string('member3_position')->nullable();
            $table->bigInteger('total_points')->nullable();
            $table->string('image1')->nullable();
            $table->string('image2')->nullable();
            $table->string('image3')->nullable();
            $table->string('file1')->nullable();
            $table->timestamps();
            $table->string('gps_code')->nullable();
            $table->string('operator_phone')->nullable();
            $table->string('car_type_fa')->nullable();
            $table->string('created_at_fa')->nullable();
            $table->string('updated_at_fa')->nullable();
            $table->integer('user_id')->nullable();
        });
    }

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