id(); $table->string('nr')->unique()->nullable(); $table->date('invoice_date'); $table->date('due_date')->nullable(); $table->date('service_start_date')->nullable(); $table->date('service_end_date')->nullable(); $table->boolean('is_recurring')->default(false); $table->boolean('is_partial_service')->default(false); $table->foreignId('customer_id')->nullable()->constrained()->onDelete('cascade'); $table->string('payment_status')->default('draft'); $table->decimal('total_amount', 10, 2); $table->text('title')->nullable(); $table->text('text')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('invoices'); } };