id(); $table->integer('fiscal_year')->comment('Fiscal year (e.g., 2025)'); $table->string('name')->comment('Budget name'); $table->enum('period_type', ['annual', 'quarterly', 'monthly'])->default('annual')->comment('Budget period type'); $table->date('period_start')->comment('Period start date'); $table->date('period_end')->comment('Period end date'); $table->enum('status', ['draft', 'submitted', 'approved', 'active', 'closed'])->default('draft')->comment('Budget status'); $table->foreignId('created_by_user_id')->constrained('users')->cascadeOnDelete()->comment('Created by user'); $table->foreignId('approved_by_user_id')->nullable()->constrained('users')->nullOnDelete()->comment('Approved by user'); $table->timestamp('approved_at')->nullable()->comment('Approval timestamp'); $table->text('notes')->nullable()->comment('Budget notes'); $table->timestamps(); $table->index('fiscal_year'); $table->index('status'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('budgets'); } };