Work on products, first completed broadband

This commit is contained in:
Deon George
2021-12-24 12:14:01 +11:00
parent 8f5293662e
commit 1e9f15b40f
62 changed files with 2139 additions and 894 deletions

View File

@@ -9,12 +9,12 @@ interface IDs
*
* @return mixed
*/
public function getLIDattribute(): string;
public function getLIDAttribute(): string;
/**
* Return the system ID of the item
*
* @return mixed
*/
public function getSIDattribute(): string;
public function getSIDAttribute(): string;
}

View File

@@ -0,0 +1,76 @@
<?php
namespace App\Interfaces;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
interface ProductItem
{
/* RELATIONS */
/**
* Supplier that provides this offering
*
* @return BelongsTo
*/
//public function supplier_detail(): BelongsTo;
/**
* Available products created from this supplier offering
*
* @return BelongsToMany
*/
//public function types(): BelongsToMany;
/* ATTRIBUTES */
/**
* Return the billing interval base cost including tax
*
* @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
*/
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 float
*/
public function getSetupCostTaxableAttribute(): float;
/**
* Return the type of offering this is.
*
* @return string
*/
public function getTypeAttribute();
}

View File

@@ -4,6 +4,9 @@ namespace App\Interfaces;
use Illuminate\Support\Collection;
/**
* @deprecated - rename to productItem if still required
*/
interface ProductSupplier
{
/**
@@ -20,6 +23,13 @@ interface ProductSupplier
*/
public function allowance_string(): string;
/**
* Return the contract term for this product when sold as a service
*
* @return int Months
*/
public function getContractTermAttribute(): int;
/**
* Return the product cost
*
@@ -36,4 +46,11 @@ interface ProductSupplier
* @return mixed
*/
public function getSupplierAttribute();
/**
* Does this offering capture usage information
*
* @return bool
*/
public function hasUsage(): bool;
}

View File

@@ -0,0 +1,90 @@
<?php
namespace App\Interfaces;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
interface SupplierItem
{
/* RELATIONS */
/**
* Supplier that provides this offering
*
* @return BelongsTo
*/
public function supplier_detail(): BelongsTo;
/**
* Available products created from this supplier offering
*
* @return BelongsToMany
*/
public function types(): BelongsToMany;
/* ATTRIBUTES */
/**
* Return the billing interval base cost including tax
*
* @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
*/
public function getContractTermAttribute(): int;
/**
* The minimum cost of ordering this offering
*
* @return float
*/
public function getMinCostAttribute(): float;
/**
* The minimum cost of ordering this offering including taxes
*
* @return float
*/
public function getMinCostTaxableAttribute(): float;
/**
* 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 float
*/
public function getSetupCostTaxableAttribute(): float;
/**
* Return the type of offering this is.
*
* @return string
*/
public function getTypeAttribute();
}