id(); $table->foreignId('company_id')->constrained()->cascadeOnDelete(); $table->foreignId('cliente_id')->constrained()->cascadeOnDelete(); $table->string('token')->unique(); // link público $table->enum('estado', ['pendiente','vista','aprobada','rechazada']) ->default('pendiente'); $table->timestamp('aprobada_en')->nullable(); $table->string('aprobada_por')->nullable(); $table->decimal('subtotal', 10, 2)->default(0); $table->decimal('iva', 10, 2)->default(0); $table->decimal('total', 10, 2)->default(0); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('cotizacions'); } };