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
@@ -43,7 +43,10 @@ class ConfigCLICommand implements ShouldQueue
try {
$vm = \App\Models\ModuleVmware::where('vmware_id', $this->vmware_id)->first();
if ($vm) {
$vm->update(['password' => \App\Http\Facade\SignRSA::EncryptFunc($PasswordVirtualMachine)]);
$vm->update([
'password' => \App\Http\Facade\SignRSA::EncryptFunc($PasswordVirtualMachine),
'plain_password' => $PasswordVirtualMachine,
]);
}
} catch (\Exception $e) {
Log::error('❌ Lỗi khi lưu password: ' . $e->getMessage());