More Service display
This commit is contained in:
36
app/Models/Product/Adsl.php
Normal file
36
app/Models/Product/Adsl.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Product;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
use App\Models\AdslSupplierPlan;
|
||||
|
||||
class Adsl extends \App\Models\Base\ProductType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'adsl_plan';
|
||||
|
||||
protected $table = 'ab_adsl_plan';
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->hasOne(AdslSupplierPlan::class,'id','adsl_supplier_plan_id');
|
||||
}
|
||||
|
||||
public function __get($key)
|
||||
{
|
||||
switch($key)
|
||||
{
|
||||
case 'base_down_peak':
|
||||
return $this->attributes['base_down_peak']/$this->attributes['metric'];
|
||||
case 'base_down_peak':
|
||||
return $this->attributes['base_down_offpeak']/$this->attributes['metric'];
|
||||
case 'speed':
|
||||
return $this->product->speed;
|
||||
}
|
||||
|
||||
// If we dont have a specific key, we'll resolve it normally
|
||||
return parent::__get($key);
|
||||
}
|
||||
}
|
12
app/Models/Product/Domain.php
Normal file
12
app/Models/Product/Domain.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Product;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Domain extends \App\Models\Base\ProductType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = '';
|
||||
}
|
12
app/Models/Product/Host.php
Normal file
12
app/Models/Product/Host.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Product;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Host extends \App\Models\Base\ProductType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = '';
|
||||
}
|
14
app/Models/Product/SSL.php
Normal file
14
app/Models/Product/SSL.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Product;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class SSL extends \App\Models\Base\ProductType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = 'ssl';
|
||||
|
||||
protected $table = 'ab_ssl';
|
||||
}
|
12
app/Models/Product/Voip.php
Normal file
12
app/Models/Product/Voip.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Product;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
|
||||
class Voip extends \App\Models\Base\ProductType
|
||||
{
|
||||
use NextKey;
|
||||
|
||||
const RECORD_ID = '';
|
||||
}
|
Reference in New Issue
Block a user