osb/app/Models/Product/Host.php

66 lines
1.2 KiB
PHP
Raw Normal View History

2019-07-02 05:28:27 +00:00
<?php
namespace App\Models\Product;
2022-02-01 05:40:46 +00:00
use Illuminate\Support\Collection;
2019-07-02 05:28:27 +00:00
2022-02-01 05:40:46 +00:00
use App\Interfaces\ProductItem;
use App\Models\Service\Host as ServiceHost;
use App\Models\Supplier\Host as SupplierHost;
final class Host extends Type implements ProductItem
2019-07-02 05:28:27 +00:00
{
2022-02-01 05:40:46 +00:00
protected $table = 'product_host';
// The model that is referenced when this product is ordered
protected string $order_model = ServiceHost::class;
/* RELATIONS */
/**
* The offering supplied with this product
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function supplied()
{
return $this->hasOne(SupplierHost::class,'id','supplier_host_id');
}
/* INTERFACES */
public function getContractTermAttribute(): int
{
return 12;
}
public function getTypeAttribute()
{
return 'Hosting';
}
public function hasUsage(): bool
{
return FALSE;
}
2022-02-01 05:40:46 +00:00
public function allowance(): Collection
{
// TODO: Implement allowance() method.
}
public function allowance_string(): string
{
// TODO: Implement allowance_string() method.
}
public function getCostAttribute(): float
{
// TODO: Implement getCostAttribute() method.
}
public function getSupplierAttribute()
{
// TODO: Implement getSupplierAttribute() method.
}
2019-07-02 05:28:27 +00:00
}