More works on products
This commit is contained in:
@@ -4,18 +4,13 @@ namespace App\Models\Product;
|
||||
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
use App\Interfaces\ProductSupplier;
|
||||
use App\Models\Base\ProductType;
|
||||
use App\Models\{Product,Supplier};
|
||||
use App\Interfaces\ProductItem;
|
||||
use App\Models\Supplier;
|
||||
use App\Models\Service\Broadband as ServiceBroadband;
|
||||
use App\Models\Supplier\Broadband as SupplierBroadband;
|
||||
use App\Traits\{OrderServiceOptions,SiteID};
|
||||
|
||||
class Broadband extends ProductType implements ProductSupplier
|
||||
final class Broadband extends Type implements ProductItem
|
||||
{
|
||||
use SiteID;
|
||||
use OrderServiceOptions;
|
||||
|
||||
protected $table = 'product_broadband';
|
||||
|
||||
// Information required during the order process
|
||||
@@ -34,20 +29,11 @@ class Broadband extends ProductType implements ProductSupplier
|
||||
],
|
||||
];
|
||||
|
||||
// The model that is referenced when this product is ordered
|
||||
protected string $order_model = ServiceBroadband::class;
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
/**
|
||||
* The product that sells this type
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\MorphOne
|
||||
*/
|
||||
public function product()
|
||||
{
|
||||
return $this->morphOne(Product::class, null,'model','model_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* The offering supplied with this product
|
||||
*
|
||||
@@ -123,6 +109,7 @@ class Broadband extends ProductType implements ProductSupplier
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
// @todo To check
|
||||
public function allowance_string(): string
|
||||
{
|
||||
$result = '';
|
||||
|
Reference in New Issue
Block a user