osb/app/Models/Product/SSL.php

69 lines
1014 B
PHP
Raw Normal View History

2019-07-02 05:28:27 +00:00
<?php
namespace App\Models\Product;
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;
class SSL extends ProductType implements ProductSupplier
2019-07-02 05:28:27 +00:00
{
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 getContractTermAttribute(): int
{
return 12;
}
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;
}
public function getTypeAttribute()
{
return 'SSL Certificate';
}
public function hasUsage(): bool
{
return FALSE;
}
2019-07-02 05:28:27 +00:00
}