Enhance VM service management: add service_id and plain_password fields, sync service records, and update related migrations

This commit is contained in:
pbao9
2026-04-16 09:39:52 +07:00
parent bb73d6c5a2
commit d68fda2cf0
11 changed files with 206 additions and 104 deletions
+2 -2
View File
@@ -61,10 +61,10 @@ class Service extends Model
return $this->hasMany(ServiceAddon::class, 'service_id');
}
/** The VPS/VM associated with this service (if applicable). */
/** The VPS/VM associated with this service — FK: services.vm_id → module_vmware.id */
public function vmware()
{
return $this->belongsTo(ModuleVmware::class, 'vm_id', 'vmware_id');
return $this->belongsTo(ModuleVmware::class, 'vm_id');
}
// -------------------------------------------------------------------------