- Lịch sử thanh toán hoá đơn trả thêm `method` (tự động gia hạn / số dư / admin / chuyển khoản / hoàn tiền), bỏ đuôi `(method)` khỏi ghi chú - `DnsServer::panelUrl()` = https://<domain>/ dùng cho email cấp hosting và nút Plesk của khách - Order item trả thêm `uuid`/`type` của dịch vụ để FE dẫn tới trang quản lý - Yêu cầu huỷ dịch vụ, chứng chỉ SSL, lịch sử gia hạn, đổi mật khẩu hosting cho khách Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
40 lines
877 B
PHP
40 lines
877 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ModuleHostingPleskClient extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'module_hosting_plesk_clients';
|
|
|
|
protected $fillable = [
|
|
'customer_id',
|
|
'dns_manager_server_id',
|
|
'plesk_client_id',
|
|
'login',
|
|
'password',
|
|
];
|
|
|
|
public function customer()
|
|
{
|
|
return $this->belongsTo(Customer::class);
|
|
}
|
|
|
|
public function server()
|
|
{
|
|
return $this->belongsTo(DnsServer::class, 'dns_manager_server_id');
|
|
}
|
|
|
|
public static function forHosting($hosting): ?self
|
|
{
|
|
return static::query()
|
|
->where('customer_id', $hosting->customer_id)
|
|
->where('dns_manager_server_id', $hosting->dns_manager_server_id)
|
|
->first();
|
|
}
|
|
}
|