2019-07-02 05:28:27 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models\Product;
|
|
|
|
|
2020-02-18 11:35:20 +00:00
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
|
|
|
use App\Interfaces\ProductSupplier;
|
|
|
|
use App\Models\Base\ProductType;
|
2019-07-02 05:28:27 +00:00
|
|
|
use App\Traits\NextKey;
|
|
|
|
|
2020-02-18 11:35:20 +00:00
|
|
|
class SSL extends ProductType implements ProductSupplier
|
2019-07-02 05:28:27 +00:00
|
|
|
{
|
|
|
|
use NextKey;
|
|
|
|
const RECORD_ID = 'ssl';
|
|
|
|
|
|
|
|
protected $table = 'ab_ssl';
|
2020-02-18 11:35:20 +00:00
|
|
|
|
|
|
|
public function allowance(): Collection
|
|
|
|
{
|
|
|
|
// N/A
|
|
|
|
return collect();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function allowance_string(): string
|
|
|
|
{
|
|
|
|
// N/A
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
2021-12-24 01:14:01 +00:00
|
|
|
public function getContractTermAttribute(): int
|
|
|
|
{
|
|
|
|
return 12;
|
|
|
|
}
|
|
|
|
|
2020-02-18 11:35:20 +00:00
|
|
|
public function getCostAttribute(): float
|
|
|
|
{
|
|
|
|
// N/A
|
|
|
|
return 0;
|
|
|
|
}
|
2020-02-20 11:54:28 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2021-12-24 01:14:01 +00:00
|
|
|
|
|
|
|
public function getTypeAttribute()
|
|
|
|
{
|
|
|
|
return 'SSL Certificate';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasUsage(): bool
|
|
|
|
{
|
|
|
|
return FALSE;
|
|
|
|
}
|
2019-07-02 05:28:27 +00:00
|
|
|
}
|