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
@@ -20,7 +20,7 @@ class ServiceClientDetailResource extends JsonResource
$orderItem = $this->orderItem;
$order = $orderItem?->order;
$vm = $order?->vmWare?->first();
$vm = $this->resource->vmware;
$product = $orderItem?->product;
return [
@@ -52,9 +52,11 @@ class ServiceClientDetailResource extends JsonResource
'ip_address' => $vm->ipAddress?->ip,
'hostname' => $vm->hostname,
'username' => $vm->user,
'password' => $vm->getRawOriginal('password'),
'password' => $vm->plain_password ?? null,
'port' => $vm->port,
'status' => $vm->status,
'ip' => $vm->ip ?? null,
'dns' => $vm->dns ?? null,
] : null,
];
}