More works on products

This commit is contained in:
Deon George
2022-02-01 16:40:46 +11:00
parent 1e9f15b40f
commit b9b4416737
36 changed files with 952 additions and 312 deletions

View File

@@ -4,16 +4,30 @@ namespace App\Models\Product;
use Illuminate\Support\Collection;
use App\Interfaces\ProductSupplier;
use App\Models\Base\ProductType;
use App\Traits\NextKey;
use App\Interfaces\ProductItem;
use App\Models\Service\SSL as ServiceSSL;
use App\Models\Supplier\SSL as SupplierSSL;
class SSL extends ProductType implements ProductSupplier
final class SSL extends Type implements ProductItem
{
use NextKey;
const RECORD_ID = 'ssl';
protected $table = 'product_ssl';
protected $table = 'ab_ssl';
// The model that is referenced when this product is ordered
protected string $order_model = ServiceSSL::class;
/* RELATIONS */
/**
* The offering supplied with this product
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function supplied()
{
return $this->hasOne(SupplierSSL::class,'id','supplier_ssl_id');
}
/* INTERFACES */
public function allowance(): Collection
{