id(); $table->foreignId('transaction_id')->constrained()->onDelete('cascade'); $table->foreignId('postcheck_by')->constrained('users')->onDelete('cascade'); $table->timestamp('postcheck_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', ['sudah dikerjakan', 'sudah diganti'])->nullable(); $table->string('ac_image')->nullable(); $table->enum('blower_condition', ['sudah dibersihkan atau dicuci', 'sudah diganti'])->nullable(); $table->string('blower_image')->nullable(); $table->enum('evaporator_condition', ['sudah dikerjakan', 'sudah diganti'])->nullable(); $table->string('evaporator_image')->nullable(); $table->enum('compressor_condition', ['sudah dikerjakan', 'sudah diganti'])->nullable(); $table->text('postcheck_notes')->nullable(); $table->timestamps(); $table->index(['transaction_id']); $table->index(['postcheck_by']); $table->index(['postcheck_at']); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('postchecks'); } }