2018-05-20 22:53:14 +10:00
|
|
|
<?php
|
|
|
|
|
2019-06-07 16:54:27 +10:00
|
|
|
namespace App\Models\Service;
|
2018-05-20 22:53:14 +10:00
|
|
|
|
2019-06-07 16:54:27 +10:00
|
|
|
class Adsl extends \App\Models\Base\ServiceType
|
2018-05-20 22:53:14 +10:00
|
|
|
{
|
2019-06-07 16:54:27 +10:00
|
|
|
// @todo column service_id can be removed.
|
2018-05-20 22:53:14 +10:00
|
|
|
protected $table = 'ab_service__adsl';
|
|
|
|
|
2018-11-21 14:37:17 +11:00
|
|
|
public function getFullNameAttribute()
|
|
|
|
{
|
|
|
|
return ($this->service_number AND $this->service_address)
|
|
|
|
? sprintf('%s: %s',$this->service_number, $this->service_address)
|
|
|
|
: $this->name;
|
|
|
|
}
|
|
|
|
|
2018-05-20 22:53:14 +10:00
|
|
|
public function getNameAttribute()
|
|
|
|
{
|
2018-08-11 15:09:41 +10:00
|
|
|
return $this->service_number ?: $this->service_address;
|
2018-05-20 22:53:14 +10:00
|
|
|
}
|
|
|
|
}
|