uuid('id')->primary(); $table->foreignUuid('product_id')->constrained('products')->cascadeOnDelete(); $table->string('type'); // "MÓNG", "THÂN", "CP THI CÔNG" $table->decimal('temp_value', 15, 2)->default(0); $table->decimal('final_value', 15, 2)->default(0); $table->decimal('difference', 15, 2)->virtualAs('final_value - temp_value'); $table->string('red_book_status')->nullable(); $table->date('issue_date')->nullable(); $table->timestamps(); }); } public function down(): void { Schema::dropIfExists('settlements'); } };