osb/app/Models/Service/Phone.php

51 lines
872 B
PHP
Raw Normal View History

2022-04-19 07:07:39 +00:00
<?php
namespace App\Models\Service;
/**
* Class Phone (Service)
* Services that are Voice Telephony
*/
class Phone extends Type
2022-04-19 07:07:39 +00:00
{
protected $dates = [
'connect_at',
'expire_at',
];
protected $table = 'service_phone';
/* INTERFACES */
/**
* Return the service address
*
* @return string
*/
public function getServiceDescriptionAttribute(): string
{
return strtoupper($this->service_address) ?: '-';
}
/**
* Return the service number
*
* @return string
*/
public function getServiceNameAttribute(): string
{
return $this->service_number ?: ($this->service_address ?: '-');
}
/* ATTRIBUTES */
/**
* The type of technology used to provide this Internet Service
*
* @param $value
* @return null|string
*/
public function getTechnologyAttribute($value): ?string
{
return $value ?: $this->supplied()->technology;
}
}