Xu ly giao dien San Pham

This commit is contained in:
2026-04-19 23:50:21 +00:00
parent 10eac55520
commit 91ff4a5e4d
18 changed files with 744 additions and 196 deletions

View File

@@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void {
Schema::create('contract_customers', function (Blueprint $table) {
$table->id();
$table->uuid('id')->primary();
$table->foreignUuid('contract_id')->constrained('contracts')->cascadeOnDelete();
$table->foreignUuid('customer_id')->constrained('customers')->cascadeOnDelete();
$table->string('role')->default('CHỦ SH 1'); // Đồng sở hữu

View File

@@ -0,0 +1,21 @@
<?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::table('projects', function (Blueprint $table) {
$table->string('type')->nullable(); // Thêm cột loại hình dự án
$table->foreignUuid('payment_template_id')->nullable()->constrained('payment_templates')->nullOnDelete();
});
}
public function down(): void {
Schema::table('projects', function (Blueprint $table) {
$table->dropForeign(['payment_template_id']);
$table->dropColumn(['payment_template_id', 'type']);
});
}
};