Work on SSL and Host accounts
This commit is contained in:
@@ -2,17 +2,45 @@
|
||||
|
||||
namespace App\Models\Service;
|
||||
|
||||
use App\Interfaces\ServiceItem;
|
||||
use App\Models\Base\ServiceType;
|
||||
use App\Models\DomainTld;
|
||||
use App\Models\HostServer;
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Host extends \App\Models\Base\ServiceType
|
||||
class Host extends ServiceType implements ServiceItem
|
||||
{
|
||||
use NextKey;
|
||||
const RECORD_ID = 'service__hosting';
|
||||
|
||||
protected $dates = [
|
||||
'host_expire',
|
||||
];
|
||||
protected $table = 'ab_service__hosting';
|
||||
|
||||
public function getNameAttribute()
|
||||
public function provider()
|
||||
{
|
||||
return sprintf('%s',$this->domain_name);
|
||||
return $this->belongsTo(HostServer::class,'host_server_id');
|
||||
}
|
||||
|
||||
public function tld()
|
||||
{
|
||||
return $this->belongsTo(DomainTld::class,'domain_tld_id');
|
||||
}
|
||||
|
||||
public function getServiceDescriptionAttribute(): string
|
||||
{
|
||||
// N/A
|
||||
return 'Hosting';
|
||||
}
|
||||
|
||||
public function getServiceNameAttribute(): string
|
||||
{
|
||||
return sprintf('%s.%s',strtoupper($this->domain_name),strtoupper($this->tld->name));
|
||||
}
|
||||
|
||||
public function inContract(): bool
|
||||
{
|
||||
return $this->host_expire->isFuture();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user