2020-02-18 11:35:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Interfaces;
|
|
|
|
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
2021-06-29 06:36:34 +00:00
|
|
|
interface ProductSupplier
|
|
|
|
{
|
2020-02-18 11:35:20 +00:00
|
|
|
/**
|
|
|
|
* Return the traffic inclusion with the service
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function allowance(): Collection;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Render the traffic inclusion as a string
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function allowance_string(): string;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the product cost
|
|
|
|
*
|
|
|
|
* @return float
|
|
|
|
*/
|
|
|
|
public function getCostAttribute(): float;
|
2020-02-20 11:54:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the supplier class
|
|
|
|
* If there is a model relationship return:
|
|
|
|
* return $this->getRelationValue('supplier');
|
|
|
|
* otherwise return a stdClass with name
|
|
|
|
*
|
|
|
|
* @return mixed
|
|
|
|
*/
|
|
|
|
public function getSupplierAttribute();
|
2020-02-18 11:35:20 +00:00
|
|
|
}
|