update route customer

This commit is contained in:
pbao9
2026-01-29 16:55:29 +07:00
parent 73c5b6752f
commit a3c3f4a577
5 changed files with 149 additions and 141 deletions
@@ -16,14 +16,17 @@ return new class extends Migration {
$table->string('vm_id')->unique();
$table->string('name');
$table->string('power_state')->nullable();
$table->string('folder')->nullable();
$table->boolean('is_template')->default(false);
// Specs snapshot
$table->integer('cpu')->nullable();
$table->integer('ram_mb')->nullable();
$table->integer('disk_gb')->nullable();
// Mapping
$table->boolean('is_system')->default(false); // vCLS, system VM
$table->timestamp('last_synced_at')->nullable();
$table->foreignId('datacenter_id')->constrained('module_datacenter')->nullable();
$table->foreignId('host_id')->nullable();
$table->foreignId('host_id')->constrained('module_host')->nullable();
$table->timestamps();
});
}
@@ -11,9 +11,9 @@ return new class extends Migration
*/
public function up(): void
{
Schema::create('product_v_m_templates', function (Blueprint $table) {
$table->id();
$table->timestamps();
Schema::create('product_vm_templates', function (Blueprint $table) {
$table->foreignId('product_id')->constrained('products')->cascadeOnDelete();
$table->foreignId('vm_template_id')->constrained('vm_templates')->cascadeOnDelete();
});
}
@@ -22,6 +22,6 @@ return new class extends Migration
*/
public function down(): void
{
Schema::dropIfExists('product_v_m_templates');
Schema::dropIfExists('product_vm_templates');
}
};