This commit is contained in:
baodev0
2026-07-06 08:00:23 +07:00
parent 3bb59feba3
commit 9a16a5c313
9 changed files with 782 additions and 0 deletions
@@ -0,0 +1,54 @@
<?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('web_design_quotes', function (Blueprint $table) {
$table->id();
$table->string('quote_number', 30)->unique();
$table->string('status', 20)->default('draft')->index();
// Thông tin khách hàng
$table->string('customer_name', 150);
$table->string('customer_email', 150)->nullable();
$table->string('customer_phone', 30)->nullable();
$table->string('customer_company', 200)->nullable();
// Thông tin website
$table->string('website_name', 200);
$table->string('website_category', 100)->index();
$table->text('description')->nullable();
$table->text('requirements')->nullable();
$table->json('reference_websites')->nullable();
// Nền tảng
$table->string('platform', 50)->index();
$table->string('frontend_framework', 50)->nullable();
$table->boolean('custom_admin')->default(false);
// Báo giá
$table->json('items');
$table->decimal('subtotal', 15, 2)->default(0);
$table->decimal('discount', 15, 2)->default(0);
$table->decimal('vat_percent', 5, 2)->default(0);
$table->decimal('total', 15, 2)->default(0);
$table->string('currency', 10)->default('VND');
$table->date('valid_until')->nullable();
$table->text('note')->nullable();
$table->foreignId('created_by')->nullable()->constrained('user')->nullOnDelete();
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('web_design_quotes');
}
};