57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Product;
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
use App\Interfaces\ProductItem;
|
|
use App\Models\Invoice;
|
|
use App\Models\Service\Host as ServiceHost;
|
|
use App\Models\Supplier\Host as SupplierHost;
|
|
|
|
final class Host extends Type implements ProductItem
|
|
{
|
|
protected $table = 'product_host';
|
|
|
|
// The model that is referenced when this product is ordered
|
|
protected string $order_model = ServiceHost::class;
|
|
|
|
// When comparing billing/pricing/charging, what metric to normalise to
|
|
const DefaultBill = Invoice::BILL_MONTHLY;
|
|
// The model that the supplier supplies
|
|
const SupplierModel = SupplierHost::class;
|
|
|
|
/* INTERFACES */
|
|
|
|
public function getContractTermAttribute(): int
|
|
{
|
|
return 12;
|
|
}
|
|
|
|
public function hasUsage(): bool
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
public function allowance(): Collection
|
|
{
|
|
// TODO: Implement allowance() method.
|
|
}
|
|
|
|
public function allowance_string(): string
|
|
{
|
|
// TODO: Implement allowance_string() method.
|
|
return '';
|
|
}
|
|
|
|
public function getCostAttribute(): float
|
|
{
|
|
// TODO: Implement getCostAttribute() method.
|
|
return 0;
|
|
}
|
|
|
|
public function getSupplierAttribute()
|
|
{
|
|
// TODO: Implement getSupplierAttribute() method.
|
|
}
|
|
} |