id(); $table->foreignId('transaction_id')->constrained()->onDelete('cascade'); $table->foreignId('precheck_by')->constrained('users')->onDelete('cascade'); $table->timestamp('precheck_at')->nullable(); $table->string('police_number'); $table->string('spk_number'); $table->string('front_image'); $table->decimal('kilometer', 10, 2); $table->decimal('pressure_high', 10, 2); $table->decimal('pressure_low', 10, 2)->nullable(); $table->decimal('cabin_temperature', 10, 2)->nullable(); $table->string('cabin_temperature_image')->nullable(); $table->enum('ac_condition', ['kotor', 'rusak', 'baik', 'tidak ada'])->nullable(); $table->string('ac_image')->nullable(); $table->enum('blower_condition', ['kotor', 'rusak', 'baik', 'tidak ada'])->nullable(); $table->string('blower_image')->nullable(); $table->enum('evaporator_condition', ['kotor', 'berlendir', 'bocor', 'bersih'])->nullable(); $table->string('evaporator_image')->nullable(); $table->enum('compressor_condition', ['kotor', 'rusak', 'baik', 'tidak ada'])->nullable(); $table->text('precheck_notes')->nullable(); $table->timestamps(); $table->index(['transaction_id']); $table->index(['precheck_by']); $table->index(['precheck_at']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('prechecks'); } }