Files
portal-api/app/Models/ModuleHostingAccount.php
T
baodev0 d6d63e5152 feat: Implement Plesk domain and hosting services
- Added PleskDomainService for managing domain operations (create, update, remove, get info).
- Introduced PleskHostingService for provisioning hosting accounts and notifying customers.
- Created PleskService for handling API requests to Plesk.
- Added migration to include 'type' column in dns_manager_servers table.
- Created migration for module_hosting_accounts table to track hosting subscriptions.
- Created migration for module_hosting_plesk_clients table to manage Plesk client credentials.
- Added email templates for notifying customers and admins about hosting account creation.
2026-08-06 17:24:01 +07:00

50 lines
1.0 KiB
PHP

<?php
namespace App\Models;
use App\Traits\LogsActivity;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ModuleHostingAccount extends Model
{
use HasFactory, LogsActivity;
protected $table = 'module_hosting_accounts';
protected $fillable = [
'customer_id',
'service_id',
'dns_manager_server_id',
'dns_manager_domain_id',
'plesk_client_id',
'plesk_subscription_id',
'plesk_guid',
'hosting_plan',
'ftp_username',
'system_username',
'document_root',
'status',
];
public function customer()
{
return $this->belongsTo(Customer::class);
}
public function service()
{
return $this->belongsTo(Service::class);
}
public function server()
{
return $this->belongsTo(DnsServer::class, 'dns_manager_server_id');
}
public function domain()
{
return $this->belongsTo(DnsDomain::class, 'dns_manager_domain_id');
}
}