feat: Enhance service management and transaction handling
- Implemented client access token verification middleware to secure API endpoints. - Updated ServiceController to fetch active hosting services for authenticated users. - Refactored OrderController to ensure order retrieval is customer-specific. - Improved error logging in VmController for unexpected vCenter responses. - Disabled VNPay auto-deposit in TransactionController, switching to manual deposit flow. - Enhanced ServiceClientDetailResource to include Plesk credentials for hosting accounts. - Adjusted VpsServiceResource to dynamically set page type based on product type. - Added logging for PowerShellService to capture errors in RDP port changes. - Provisioning job now resolves service plans and logs relevant information for hosting accounts. - Updated database migrations to add necessary fields for service plans and DNS servers. - Refactored Service and ServicePlan models to establish relationships with hosting accounts and DNS servers.
This commit is contained in:
@@ -16,6 +16,7 @@ class DnsServer extends Model
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'ip_address',
|
||||
'panel_port',
|
||||
'password',
|
||||
'username',
|
||||
'api_key',
|
||||
|
||||
@@ -70,6 +70,12 @@ class Service extends Model
|
||||
return $this->belongsTo(ModuleVmware::class, 'vm_id');
|
||||
}
|
||||
|
||||
/** The Plesk hosting account associated with this service, if type = hosting. */
|
||||
public function hostingAccount()
|
||||
{
|
||||
return $this->hasOne(ModuleHostingAccount::class, 'service_id');
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Helpers
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@@ -12,10 +12,16 @@ class ServicePlan extends Model
|
||||
'ram',
|
||||
'disk',
|
||||
'domain',
|
||||
'dns_manager_server_id',
|
||||
];
|
||||
|
||||
public function plesk()
|
||||
{
|
||||
return $this->hasOne(ServicePlanPlesk::class);
|
||||
}
|
||||
|
||||
public function dnsServer()
|
||||
{
|
||||
return $this->belongsTo(DnsServer::class, 'dns_manager_server_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user