id(); $table->foreignId('tenant_id')->constrained()->cascadeOnDelete(); $table->foreignId('project_id')->constrained()->cascadeOnDelete(); $table->foreignId('petty_cash_id')->nullable()->constrained()->nullOnDelete(); $table->foreignId('employee_id')->nullable()->constrained()->nullOnDelete(); $table->decimal('amount', 15, 0); $table->foreignId('currency_id')->constrained('currencies')->cascadeOnDelete(); $table->decimal('original_amount', 15, 0)->nullable(); $table->text('description')->nullable(); $table->date('expense_date'); $table->string('category')->nullable(); $table->string('receipt_path')->nullable(); $table->enum('status', ['pending', 'approved', 'rejected'])->default('pending'); $table->foreignId('approved_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamps(); $table->softDeletes(); $table->index('tenant_id'); $table->index('project_id'); $table->index('status'); $table->index('expense_date'); }); } public function down(): void { Schema::dropIfExists('expenses'); } };