id(); $table->string('number')->unique(); $table->string('title'); $table->string('destinataire_type'); // 'commune', 'service_interne' $table->string('destinataire_nom'); $table->string('referent')->nullable(); $table->date('date_devis'); $table->string('status')->default('draft'); // 'draft', 'sent', 'accepted', 'rejected' $table->json('items')->nullable(); // details of items (type, designation, quantity, unit_price, total_price) $table->decimal('total_ht', 15, 2)->default(0.00); $table->decimal('tva_rate', 5, 2)->default(20.00); $table->decimal('total_ttc', 15, 2)->default(0.00); $table->text('notes')->nullable(); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('devis'); } };