osb/app/Models/Product/SSL.php
2020-02-20 22:54:28 +11:00

54 lines
817 B
PHP

<?php
namespace App\Models\Product;
use Illuminate\Support\Collection;
use App\Interfaces\ProductSupplier;
use App\Models\Base\ProductType;
use App\Traits\NextKey;
class SSL extends ProductType implements ProductSupplier
{
use NextKey;
const RECORD_ID = 'ssl';
protected $table = 'ab_ssl';
public function allowance(): Collection
{
// N/A
return collect();
}
public function allowance_string(): string
{
// N/A
return '';
}
public function getCostAttribute(): float
{
// N/A
return 0;
}
public function getProductAttribute()
{
$o = new \stdClass();
$o->product_id = 'INT';
$o->setup_cost = 0;
$o->base_cost = 0;
$o->contract_term = 0; // @todo
return $o;
}
public function getSupplierAttribute()
{
$o = new \stdClass();
$o->name = 'Internal';
return $o;
}
}