id(); $table->foreignId('company_id')->constrained()->cascadeOnDelete(); $table->string('name'); $table->date('start_date'); $table->date('end_date'); $table->string('status')->default('draft'); // draft, active, closed $table->string('interval_type')->default('month'); // day, week, month, quarter, year $table->text('notes')->nullable(); $table->timestamp('approved_at')->nullable(); $table->timestamp('closed_at')->nullable(); $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete(); $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('budgets'); } };