Init: Hoan thanh kien truc V3 va Filament UI
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
return new class extends Migration {
|
||||
public function up(): void {
|
||||
Schema::create('settlements', function (Blueprint $table) {
|
||||
$table->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'); }
|
||||
};
|
||||
Reference in New Issue
Block a user