Enhance VM service management: add service_id and plain_password fields, sync service records, and update related migrations
This commit is contained in:
@@ -13,14 +13,14 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
|
||||
}
|
||||
|
||||
/**
|
||||
* Lấy danh sách sản phẩm đang hoạt động
|
||||
* Lấy toàn bộ dịch vụ của customer (mọi trạng thái)
|
||||
*/
|
||||
public function getActiveServices(int $limit = 10)
|
||||
{
|
||||
return $this->model
|
||||
->with(['orderItem' => fn($q) => $q->with('product')])
|
||||
->where('status', 'active')
|
||||
->orderBy('started_at', 'asc')
|
||||
->orderByRaw("FIELD(status, 'active', 'pending', 'suspended', 'expired', 'cancelled', 'terminated')")
|
||||
->orderBy('started_at', 'desc')
|
||||
->paginate($limit);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ class ServiceClientRepository extends BaseApiRepository implements ServiceClient
|
||||
->with([
|
||||
'orderItem.os.osGroup',
|
||||
'orderItem.product',
|
||||
'orderItem.order.vmWare.ipAddress',
|
||||
'orderItem.order',
|
||||
'vmware.ipAddress',
|
||||
])
|
||||
->where('uuid', $uuid)
|
||||
->first();
|
||||
|
||||
Reference in New Issue
Block a user