id(); $table->string('entry_no')->unique(); // PAY-2024-001 $table->string('description'); $table->string('region'); $table->unsignedInteger('order_quantity')->default(0); // selected consolidated order count $table->decimal('amount', 12, 2); $table->decimal('pending_amount', 12, 2); // always <= amount $table->date('entry_date'); // auto-today default by controller // Toggle-based payment states $table->enum('payment_status', ['unpaid', 'pending', 'paid'])->default('unpaid'); $table->tinyInteger('toggle_pos')->default(0); // 0 left, 1 middle, 2 right // Dispatch state (for second table) $table->enum('dispatch_status', [ 'pending', 'loading', 'packed', 'dispatched', 'delivered' ])->default('pending'); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('entries'); } };