More works on products
This commit is contained in:
@@ -2,75 +2,56 @@
|
||||
|
||||
namespace App\Interfaces;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
interface ProductItem
|
||||
{
|
||||
/* RELATIONS */
|
||||
public function product();
|
||||
|
||||
public function supplied();
|
||||
|
||||
/**
|
||||
* Supplier that provides this offering
|
||||
* Return the traffic inclusion with the service
|
||||
*
|
||||
* @return BelongsTo
|
||||
* @return mixed
|
||||
*/
|
||||
//public function supplier_detail(): BelongsTo;
|
||||
public function allowance(): Collection;
|
||||
|
||||
/**
|
||||
* Available products created from this supplier offering
|
||||
* Render the traffic inclusion as a string
|
||||
*
|
||||
* @return BelongsToMany
|
||||
* @return mixed
|
||||
*/
|
||||
//public function types(): BelongsToMany;
|
||||
|
||||
/* ATTRIBUTES */
|
||||
public function allowance_string(): string;
|
||||
|
||||
/**
|
||||
* Return the billing interval base cost including tax
|
||||
* Return the contract term for this product when sold as a service
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getBaseCostTaxableAttribute(): float;
|
||||
|
||||
/**
|
||||
* Return the billing interval that the supplier charges
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBillingIntervalAttribute(): int;
|
||||
|
||||
/**
|
||||
* The term that the supplier imposes on this service being connected
|
||||
*
|
||||
* @return int
|
||||
* @return int Months
|
||||
*/
|
||||
public function getContractTermAttribute(): int;
|
||||
|
||||
/**
|
||||
* Suppliers offering name (short)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNameAttribute(): string;
|
||||
|
||||
/**
|
||||
* Suppliers offering name (long)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNameLongAttribute(): string;
|
||||
|
||||
/**
|
||||
* Return the setup cost including tax
|
||||
* Return the product cost
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getSetupCostTaxableAttribute(): float;
|
||||
public function getCostAttribute(): float;
|
||||
|
||||
/**
|
||||
* Return the type of offering this is.
|
||||
* Return the supplier class
|
||||
* If there is a model relationship return:
|
||||
* return $this->getRelationValue('supplier');
|
||||
* otherwise return a stdClass with name
|
||||
*
|
||||
* @return string
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTypeAttribute();
|
||||
public function getSupplierAttribute();
|
||||
|
||||
/**
|
||||
* Does this offering capture usage information
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasUsage(): bool;
|
||||
}
|
Reference in New Issue
Block a user