Start work on updating services
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Support\Collection;
|
||||
use App\Interfaces\SupplierItem;
|
||||
use App\Models\Product\Broadband as ProductBroadband;
|
||||
|
||||
// @todo does this need to extend Type? Perhaps have a SupplierType consistent with ServiceType.
|
||||
class Broadband extends Type implements SupplierItem
|
||||
{
|
||||
protected $casts = [
|
||||
@@ -37,7 +38,7 @@ class Broadband extends Type implements SupplierItem
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductBroadband::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductBroadband::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
public function getBillingIntervalAttribute(): int
|
||||
|
@@ -24,7 +24,7 @@ final class Domain extends Type implements SupplierItem
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductDomain::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductDomain::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
@@ -18,6 +18,6 @@ final class Email extends Type implements SupplierItem
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductEmail::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductEmail::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
}
|
@@ -13,7 +13,7 @@ final class Generic extends Type implements SupplierItem
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductGeneric::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductGeneric::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
public function getBillingIntervalAttribute(): int
|
||||
|
@@ -13,7 +13,7 @@ final class Host extends Type implements SupplierItem
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductHost::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductHost::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
public function getBillingIntervalAttribute(): int
|
||||
|
@@ -3,17 +3,17 @@
|
||||
namespace App\Models\Supplier;
|
||||
|
||||
use App\Interfaces\SupplierItem;
|
||||
use App\Models\Product\Voip as ProductVoip;
|
||||
use App\Models\Product\Phone as ProductVoip;
|
||||
|
||||
final class Voip extends Type implements SupplierItem
|
||||
final class Phone extends Type implements SupplierItem
|
||||
{
|
||||
protected $table = 'supplier_voip';
|
||||
protected $table = 'supplier_phone';
|
||||
|
||||
/* INTERFACES */
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductVoip::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductVoip::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
public function getBillingIntervalAttribute(): int
|
@@ -13,7 +13,7 @@ final class SSL extends Type implements SupplierItem
|
||||
|
||||
public function types()
|
||||
{
|
||||
return $this->belongsToMany(ProductSSL::class,$this->table,'id','id','id',$this->table.'_id');
|
||||
return $this->belongsToMany(ProductSSL::class,$this->table,'id','id','id','supplier_item_id');
|
||||
}
|
||||
|
||||
public function getBillingIntervalAttribute(): int
|
||||
|
Reference in New Issue
Block a user