Model and Migration files

This commit is contained in:
2026-06-25 11:07:59 +07:00
parent aecca02269
commit 7d40bcfb53
13 changed files with 119 additions and 40 deletions
@@ -6,15 +6,17 @@ use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void {
Schema::create('inspeksi_lahan', function (Blueprint $table) {
Schema::create('lahan_inspeksi', function (Blueprint $table) {
$table->id();
$table->foreignId('petani_id')->nullable()->constrained('users')->onDelete('set null');
$table->unsignedBigInteger('lahan_id')->nullable();
$table->string('lahan_uid');
$table->double('kadar_air')->nullable();
$table->double('ph')->nullable();
$table->double('kelembapan')->nullable();
$table->double('temperatur')->nullable();
$table->string('kondisi_tanaman')->nullable();
$table->date('tgl_inspeksi');
$table->text('catatan')->nullable();
$table->string('foto_url')->nullable();
$table->string('sync_status')->default('pending');