id(); $table->foreignId('produksi_id')->nullable()->constrained('produksi')->onDelete('set null'); $table->foreignId('profile_id')->nullable()->constrained('profiles')->onDelete('set null'); $table->foreignId('lahan_id')->nullable()->constrained('map_lahan')->onDelete('set null'); $table->foreignId('komoditas_id')->nullable()->constrained('master_komoditas')->onDelete('set null'); $table->date('tanggal_pemeriksaan')->nullable(); $table->string('grade')->nullable(); $table->decimal('kadar_air', 8, 2)->nullable(); $table->decimal('berat_bersih', 12, 2)->nullable(); $table->decimal('berat_rusak', 12, 2)->nullable(); $table->decimal('persentase_kerusakan', 8, 2)->nullable(); $table->string('standar_mutu')->nullable(); $table->string('status_kelayakan')->default('layak'); $table->string('pemeriksa')->nullable(); $table->text('catatan')->nullable(); $table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null'); $table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null'); $table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null'); $table->timestamps(); $table->softDeletes(); }); } public function down(): void { Schema::dropIfExists('kualitas'); } };